lkml.org 
[lkml]   [2010]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/2] cfq-iosched: RQ_NOIDLE enabled for SYNC_WORKLOAD
    Date
    RQ_NOIDLE flag is meaningful and should be honored for SYNC_WORKLOAD,
    without further checks.
    RQ_NOIDLE can be used to mark the last request of a sequence for which
    - we want to idle between the requests of the sequence, to keep locality
    - we don't want to idle after the sequence, because we know that no new
    nearby requests will follow, so we should switch servicing other
    queues.
    This patch fixes this behaviour, making it similar to how it behaved
    before 8e55063, but still fixing the corner cases that were the
    motivation for it.

    Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
    ---
    block/cfq-iosched.c | 16 ++++++++++------
    1 files changed, 10 insertions(+), 6 deletions(-)

    diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
    index 596b747..bc5c0f9 100644
    --- a/block/cfq-iosched.c
    +++ b/block/cfq-iosched.c
    @@ -3428,13 +3428,17 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
    cfqd->noidle_tree_requires_idle |= bitmask;

    /*
    - * Idling is enabled for SYNC_WORKLOAD.
    - * SYNC_NOIDLE_WORKLOAD idles at the end of the tree
    - * only if at least one queue sent !RQ_NOIDLE requests
    - * not followed by at least one RQ_NOIDLE request.
    + * Idling is enabled for:
    + * - the last sync queue of a group
    + * - SYNC_WORKLOAD queues, for !RQ_NOIDLE requests
    + * - SYNC_NOIDLE_WORKLOAD "at the end of the tree"
    + * if at least one queue sent !RQ_NOIDLE requests
    + * not followed by at least one RQ_NOIDLE request.
    */
    - if (cfqd->serving_type == SYNC_WORKLOAD
    - || cfqd->noidle_tree_requires_idle
    + if ((cfqd->serving_type == SYNC_WORKLOAD
    + && !(rq->cmd_flags & REQ_NOIDLE))
    + || (cfqd->serving_type == SYNC_NOIDLE_WORKLOAD
    + && cfqd->noidle_tree_requires_idle)
    || cfqq->cfqg->nr_cfqq == 1)
    cfq_arm_slice_timer(cfqd);
    }
    --
    1.6.4.4


    \
     
     \ /
      Last update: 2010-07-07 17:59    [W:0.023 / U:125.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site