diff options
author | Bart Van Assche <[email protected]> | 2014-12-09 16:59:21 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2014-12-09 09:08:21 -0700 |
commit | 959f5f5b2fa7ac3bdd37c91076e560c06513f1e6 (patch) | |
tree | a8a58d0da07019e2c75a0e236502cdd81c646336 /lib/mpi/mpiutil.c | |
parent | 52f7eb945f2ba62b324bb9ae16d945326a961dcf (diff) |
blk-mq: Use all available hardware queues
Suppose that a system has two CPU sockets, three cores per socket,
that it does not support hyperthreading and that four hardware
queues are provided by a block driver. With the current algorithm
this will lead to the following assignment of CPU cores to hardware
queues:
HWQ 0: 0 1
HWQ 1: 2 3
HWQ 2: 4 5
HWQ 3: (none)
This patch changes the queue assignment into:
HWQ 0: 0 1
HWQ 1: 2
HWQ 2: 3 4
HWQ 3: 5
In other words, this patch has the following three effects:
- All four hardware queues are used instead of only three.
- CPU cores are spread more evenly over hardware queues. For the
above example the range of the number of CPU cores associated
with a single HWQ is reduced from [0..2] to [1..2].
- If the number of HWQ's is a multiple of the number of CPU sockets
it is now guaranteed that all CPU cores associated with a single
HWQ reside on the same CPU socket.
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Ming Lei <[email protected]>
Cc: Alexander Gordeev <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions