lkml.org 
[lkml]   [2009]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 21/25] io-controller: Per cgroup request descriptor support
    Vivek Goyal wrote:
    ...
    > }
    > +#ifdef CONFIG_GROUP_IOSCHED
    > +static ssize_t queue_group_requests_show(struct request_queue *q, char *page)
    > +{
    > + return queue_var_show(q->nr_group_requests, (page));
    > +}
    > +
    > +static ssize_t
    > +queue_group_requests_store(struct request_queue *q, const char *page,
    > + size_t count)
    > +{
    > + unsigned long nr;
    > + int ret = queue_var_store(&nr, page, count);
    > + if (nr < BLKDEV_MIN_RQ)
    > + nr = BLKDEV_MIN_RQ;
    > +
    > + spin_lock_irq(q->queue_lock);
    > + q->nr_group_requests = nr;
    > + spin_unlock_irq(q->queue_lock);
    > + return ret;
    > +}
    > +#endif

    Hi Vivek,

    Do we need to update the congestion thresholds for allocated io groups?

    Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
    ---
    block/blk-sysfs.c | 15 +++++++++++++++
    1 files changed, 15 insertions(+), 0 deletions(-)

    diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
    index 577ed42..92b9f25 100644
    --- a/block/blk-sysfs.c
    +++ b/block/blk-sysfs.c
    @@ -83,17 +83,32 @@ static ssize_t queue_group_requests_show(struct request_queue *q, char *page)
    return queue_var_show(q->nr_group_requests, (page));
    }

    +extern void elv_io_group_congestion_threshold(struct request_queue *q,
    + struct io_group *iog);
    +
    static ssize_t
    queue_group_requests_store(struct request_queue *q, const char *page,
    size_t count)
    {
    + struct hlist_node *n;
    + struct io_group *iog;
    + struct elv_fq_data *efqd;
    unsigned long nr;
    int ret = queue_var_store(&nr, page, count);
    +
    if (nr < BLKDEV_MIN_RQ)
    nr = BLKDEV_MIN_RQ;

    spin_lock_irq(q->queue_lock);
    +
    q->nr_group_requests = nr;
    +
    + efqd = &q->elevator->efqd;
    +
    + hlist_for_each_entry(iog, n, &efqd->group_list, elv_data_node) {
    + elv_io_group_congestion_threshold(q, iog);
    + }
    +
    spin_unlock_irq(q->queue_lock);
    return ret;
    }
    --
    1.5.4.rc3


    \
     
     \ /
      Last update: 2009-07-08 05:31    [W:0.023 / U:29.900 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site