• Suparna Bhattacharya's avatar
    [PATCH] AIO: Splice runlist for fairness across io contexts · 068b52c1
    Suparna Bhattacharya authored
    This patch tries be a little fairer across multiple io contexts in handling
    retries, helping make sure progress happens uniformly across different io
    contexts (especially if they are acting on independent queues).
    
    It splices the ioctx runlist before processing it in __aio_run_iocbs.  If
    new iocbs get added to the ctx in meantime, it queues a fresh workqueue
    entry instead of handling them righaway, so that other ioctxs' retries get
    a chance to be processed before the newer entries in the queue.
    
    This might make a difference in a situation where retries are getting
    queued very fast on one ioctx, while the workqueue entry for another ioctx
    is stuck behind it.  I've only seen this occasionally earlier and can't
    recreate it consistently, but may be worth including anyway.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    068b52c1
aio.c 43.1 KB