[lkml]   [2011]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[PATCHSET block:for-3.2/core] cleanup io_context interface

    Over time, cfq and io_context has grown into each other and currently
    it isn'tq clear which part belongs where. Some of cfq internals live
    in io_context code and vice-versa. This makes the code error-prone,
    difficult to understand.

    With locking simplified, io_context interface can be cleaned up now.
    This patchset moves bulk of io_cq management from cfq to block core.
    This provides clean separation between iosched algorithm
    implementation and ioc / ioc-q association (icq, formerly cic's)
    management which is a bit complex due to the locking requirements.

    Elevators now can simply set .icq_size and align in elevator_type and
    block layer will automatically manage icq's and guarantee correct
    behavior across ioc, q exits and elevator switches.

    Comments are added to iocontext.h to explain the rules for using icq.


    This patchset is on top of

    block:for-3.2/core 334c2b0b8b "blk-throttle: use queue_is_locked() instead..."
    + [1] patchset "further updates to blk_cleanup_queue(), take#2"
    + [2] patchset "rescue cfq from RCU death spiral"

    and available in the following git branch.

    git:// block-ioc

    Jens, this patchset is the last of io_context related updates;
    however, as I wrote earlier, I'm thinking about doing similar updates
    to blkcg code which has basically the same issues. I'll wait for
    reviews on the pending patchsets and then proceed.

    diffstat follows. Added lines are from comments. Without them total
    LOC is negative.

    block/blk-core.c | 72 ++++++--
    block/blk-ioc.c | 282 ++++++++++++++++++++++---------
    block/blk-sysfs.c | 6
    block/blk.h | 49 ++++-
    block/cfq-iosched.c | 408 +++++++++++-----------------------------------
    block/deadline-iosched.c | 4
    block/elevator.c | 203 ++++++++++++----------
    block/noop-iosched.c | 4
    include/linux/blkdev.h | 10 -
    include/linux/elevator.h | 23 ++
    include/linux/iocontext.h | 114 +++++++++---
    11 files changed, 630 insertions(+), 545 deletions(-)

    Thank you.



     \ /
      Last update: 2011-10-30 01:55    [W:0.021 / U:318.468 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site