]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm: optimize dm_mq_queue_rq to _not_ use kthread if using pure blk-mq
authorMike Snitzer <snitzer@redhat.com>
Wed, 11 Mar 2015 03:49:26 +0000 (23:49 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 31 Mar 2015 16:06:29 +0000 (12:06 -0400)
commit1efbe676a16234e53aa9cfed78e85c228f963478
treef7c4859b141d04fd1f3e104d917ed678e004f032
parent75c8552721dad3b1129be36e99800138688607cb
dm: optimize dm_mq_queue_rq to _not_ use kthread if using pure blk-mq

dm_mq_queue_rq() is in atomic context so care must be taken to not
sleep -- as such GFP_ATOMIC is used for the md->bs bioset allocations
and dm-mpath's call to blk_get_request().  In the future the bioset
allocations will hopefully go away (by removing support for partial
completions of bios in a cloned request).

Also prepare for supporting DM blk-mq ontop of old-style request_fn
device(s) if a new dm-mod 'use_blk_mq' parameter is set.  The kthread
will still be used to queue work if blk-mq is used ontop of old-style
request_fn device(s).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c
drivers/md/dm.c