[PATCH V2 0/3] genriq/affinity: Make vectors allocation fair

From: Ming Lei
Date: Mon Aug 12 2019 - 05:57:20 EST


The 1st patch makes __irq_build_affinity_masks() more reliable, such as,
all nodes can be covered in the spread.

The 2nd patch spread vectors on node according to the ratio of this node's
CPU number to number of all remaining CPUs, then vectors assignment can
become more fair. Meantime, the warning report from Jon Derrick can be

The 3rd patch enhances one warning check.

Please review & comment!

- add patch3
- start to allocate vectors from node with minimized CPU number,
then every node is guaranteed to be allocated at least one vector.
- avoid cross node spread

Ming Lei (3):
genirq/affinity: Improve __irq_build_affinity_masks()
genirq/affinity: Spread vectors on node according to nr_cpu ratio
genirq/affinity: Enhance warning check

kernel/irq/affinity.c | 140 ++++++++++++++++++++++++++++++++++++------
1 file changed, 121 insertions(+), 19 deletions(-)

Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Keith Busch <kbusch@xxxxxxxxxx>
Cc: linux-nvme@xxxxxxxxxxxxxxxxxxx,
Cc: Jon Derrick <jonathan.derrick@xxxxxxxxx>