OSDN Git Service

null_blk: support submit_queues on use_per_node_hctx
authorMatias Bjørling <m@bjorling.me>
Fri, 20 Dec 2013 23:11:01 +0000 (00:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 21 Dec 2013 16:30:34 +0000 (09:30 -0700)
commitfc1bc35443741e132dd0118e8dbac53f69a6f76e
treeba0da257a26bc61ea8bef1f8f2b76828f3e539fd
parent200052440d3b56f593038a35b7c14bdc780184a9
null_blk: support submit_queues on use_per_node_hctx

In the case of both the submit_queues param and use_per_node_hctx param
are used. We limit the number af submit_queues to the number of online
nodes.

If the submit_queues is a multiple of nr_online_nodes, its trivial. Simply map
them to the nodes. For example: 8 submit queues are mapped as node0[0,1],
node1[2,3], ...
If uneven, we are left with an uneven number of submit_queues that must be
mapped. These are mapped toward the first node and onward. E.g. 5
submit queues mapped onto 4 nodes are mapped as node0[0,1], node1[2], ...

Signed-off-by: Matias Bjorling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.c