• Tejun Heo's avatar
    block: allocate io_context upfront · 7f4b35d1
    Tejun Heo authored
    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: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    7f4b35d1
blk-throttle.c 31 KB