[PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-07-04 Thread Christoph Hellwig
This is lifted from the blk-mq code and adopted to use the affinity mask concept just introduced in the irq handling code. It tries to keep the algorithm the same as the one current used by blk-mq, but improvements like assining vectors on a per-node basis instead of just per sibling are possible

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-07-01 Thread Alexander Gordeev
On Thu, Jun 30, 2016 at 07:48:54PM +0200, Christoph Hellwig wrote: > On Sat, Jun 25, 2016 at 10:05:19PM +0200, Alexander Gordeev wrote: > > > + * and generate an output cpumask suitable for spreading MSI/MSI-X > > > vectors > > > + * so that they are distributed as good as possible around the CPUs

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-30 Thread Christoph Hellwig
On Sat, Jun 25, 2016 at 10:05:19PM +0200, Alexander Gordeev wrote: > > + * and generate an output cpumask suitable for spreading MSI/MSI-X vectors > > + * so that they are distributed as good as possible around the CPUs. If > > + * more vectors than CPUs are available we'll map one to each CPU, >

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-25 Thread Alexander Gordeev
On Tue, Jun 14, 2016 at 09:58:59PM +0200, Christoph Hellwig wrote: > This is lifted from the blk-mq code and adopted to use the affinity mask > concept just intruced in the irq handling code. > > Signed-off-by: Christoph Hellwig > --- > include/linux/interrupt.h | 11 + > kernel/irq/Make

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-16 Thread Christoph Hellwig
> > ...but now I'll focus on the common/general case! Thanks for the suggestion > Christoph. I guess would be even better to have a generic function that > retrieves an optimal mask, something like topology_get_optimal_mask(n, > *cpumask), in which we get the best distribution of n CPUs among al

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-15 Thread Guilherme G. Piccoli
Thanks for the responses Bart and Christoph. On 06/15/2016 07:10 AM, Christoph Hellwig wrote: On Tue, Jun 14, 2016 at 06:54:22PM -0300, Guilherme G. Piccoli wrote: On 06/14/2016 04:58 PM, Christoph Hellwig wrote: This is lifted from the blk-mq code and adopted to use the affinity mask concept

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-15 Thread Christoph Hellwig
On Tue, Jun 14, 2016 at 06:54:22PM -0300, Guilherme G. Piccoli wrote: > On 06/14/2016 04:58 PM, Christoph Hellwig wrote: >> This is lifted from the blk-mq code and adopted to use the affinity mask >> concept just intruced in the irq handling code. > > Very nice patch Christoph, thanks. There's a li

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-15 Thread Bart Van Assche
On 06/14/2016 11:54 PM, Guilherme G. Piccoli wrote: On 06/14/2016 04:58 PM, Christoph Hellwig wrote: I take this opportunity to ask you something, since I'm working in a related code in a specific driver - sorry in advance if my question is silly or if I misunderstood your code. The function irq

Re: [PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-14 Thread Guilherme G. Piccoli
On 06/14/2016 04:58 PM, Christoph Hellwig wrote: This is lifted from the blk-mq code and adopted to use the affinity mask concept just intruced in the irq handling code. Very nice patch Christoph, thanks. There's a little typo above, on "intruced". Signed-off-by: Christoph Hellwig --- i

[PATCH 06/13] irq: add a helper spread an affinity mask for MSI/MSI-X vectors

2016-06-14 Thread Christoph Hellwig
This is lifted from the blk-mq code and adopted to use the affinity mask concept just intruced in the irq handling code. Signed-off-by: Christoph Hellwig --- include/linux/interrupt.h | 11 + kernel/irq/Makefile | 1 + kernel/irq/affinity.c | 60 +++