]> git.baikalelectronics.ru Git - kernel.git/commit
block: allocate io_context upfront
authorTejun Heo <tj@kernel.org>
Tue, 5 Jun 2012 03:40:56 +0000 (20:40 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jun 2012 09:53:50 +0000 (11:53 +0200)
commit196b0b292de7b57c0d5b1aed0ef60e45d006aa98
tree9e26e52852cd6b364d413b02b9c5379c5372be7e
parent6b96b41ff37268481b0eac3c617d6a86d4140843
block: allocate io_context upfront

Block layer very lazy allocation of ioc.  It waits until the moment
ioc is absolutely necessary; unfortunately, that time could be inside
queue lock and __get_request() performs unlock - try alloc - retry
dancing.

Just allocate it up-front on entry to block layer.  We're not saving
the rain forest by deferring it to the last possible moment and
complicating things unnecessarily.

This patch is to prepare for further updates to request allocation
path.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-throttle.c