Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1613874

Re: [PATCH] irq/affinity: Assign all CPUs a vector

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] irq/affinity: Assign all CPUs a vector
Date 2017-03-31 13:10 +0200
Message-ID <tr2Bk-3PV-25@gated-at.bofh.it> (permalink)
References <tq8z7-6vF-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 28 Mar 2017, Keith Busch wrote:

> The number of vectors to assign needs to be adjusted for each node such
> that it doesn't exceed the number of CPUs in that node. This patch
> recalculates the vector assignment per-node so that we don't try to
> assign more vectors than there are CPUs. When that previously happened,
> the cpus_per_vec was calculated to be 0, so many vectors had no CPUs
> assigned. This then goes on to fail to allocate descriptors due to
> empty masks, leading to an unoptimal spread.

To be honest: This changelog sucks. I really have a hard time to figure out
what's wrong. Can you please structure and rephrase this so it's
understandable for people who did not debug the issue five days ago? That
includes yourself when you have to look at that patch 3 month from now.

A proper structure would be: Context - Problem - Solution. e.g.

  irq_create_affinity_masks() spreads the interrupt vectors of a multi
  queue device across CPUs.

  The algorithm fails to do X, which causes problem Y

  Make it do frotz so the blas are properly assigned.

> Not only does this patch get the intended spread, this also fixes
> other subsystems that depend on every CPU being assigned to something:
> blk_mq_map_swqueue dereferences NULL while mapping s/w queues when CPUs
> are unnassigned, so making sure all CPUs are assigned fixes that.

That's hardly a justification for that change. If blk_mq_map_swqueue()
lacks sanity checks, then blk_mq_map_swqueue() is broken and needs to be
fixed independently of this.

Thanks,

	tglx

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] irq/affinity: Assign all CPUs a vector Keith Busch <keith.busch@intel.com> - 2017-03-29 01:20 +0200
  Re: [PATCH] irq/affinity: Assign all CPUs a vector Sagi Grimberg <sagi@grimberg.me> - 2017-03-29 19:20 +0200
    Re: [PATCH] irq/affinity: Assign all CPUs a vector Keith Busch <keith.busch@intel.com> - 2017-03-29 19:50 +0200
      Re: [PATCH] irq/affinity: Assign all CPUs a vector Sagi Grimberg <sagi@grimberg.me> - 2017-03-29 20:00 +0200
  Re: [PATCH] irq/affinity: Assign all CPUs a vector Christoph Hellwig <hch@lst.de> - 2017-03-30 10:30 +0200
    Re: [PATCH] irq/affinity: Assign all CPUs a vector Keith Busch <keith.busch@intel.com> - 2017-03-30 19:10 +0200
  Re: [PATCH] irq/affinity: Assign all CPUs a vector Thomas Gleixner <tglx@linutronix.de> - 2017-03-31 13:10 +0200

csiph-web