Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967095Ab0GSWQz (ORCPT ); Mon, 19 Jul 2010 18:16:55 -0400 Received: from smtp-out.google.com ([216.239.44.51]:50419 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966632Ab0GSWQy convert rfc822-to-8bit (ORCPT ); Mon, 19 Jul 2010 18:16:54 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:content-transfer-encoding:x-system-of-record; b=g47ZSCsTs5caY/ouViA3E9vYxVcENhXXNLac2Rn1xo1uGnGCfwpGBQXRv8ycVJg0Y 6oC16ueHidhu+tOyTL39w== MIME-Version: 1.0 In-Reply-To: <1279560008-2905-4-git-send-email-vgoyal@redhat.com> References: <1279560008-2905-1-git-send-email-vgoyal@redhat.com> <1279560008-2905-4-git-send-email-vgoyal@redhat.com> From: Divyesh Shah Date: Mon, 19 Jul 2010 15:16:29 -0700 Message-ID: Subject: Re: [PATCH 3/3] cfq-iosched: Print per slice sectors dispatched in blktrace To: Vivek Goyal Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, nauman@google.com, guijianfeng@cn.fujitsu.com, jmoyer@redhat.com, czoccolo@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2340 Lines: 62 Looks good to me. Reviewed-by: Divyesh Shah On Mon, Jul 19, 2010 at 10:20 AM, Vivek Goyal wrote: > - Divyesh had gotten rid of this code in the past. I want to re-introduce it > ?back as it helps me a lot during debugging. > > Signed-off-by: Vivek Goyal > --- > ?block/cfq-iosched.c | ? ?8 ++++++-- > ?1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c > index b23d7f4..1f0d4ea 100644 > --- a/block/cfq-iosched.c > +++ b/block/cfq-iosched.c > @@ -148,6 +148,8 @@ struct cfq_queue { > ? ? ? ?struct cfq_queue *new_cfqq; > ? ? ? ?struct cfq_group *cfqg; > ? ? ? ?struct cfq_group *orig_cfqg; > + ? ? ? /* Number of sectors dispatched from queue in single dispatch round */ > + ? ? ? unsigned long nr_sectors; > ?}; > > ?/* > @@ -926,8 +928,8 @@ static inline unsigned int cfq_cfqq_slice_usage(struct cfq_queue *cfqq) > ? ? ? ? ? ? ? ? ? ? ? ?slice_used = cfqq->allocated_slice; > ? ? ? ?} > > - ? ? ? cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u, sl_disp=%u", slice_used, > - ? ? ? ? ? ? ? ? ? ? ? cfqq->slice_dispatch); > + ? ? ? cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u, disp=%u sect=%u", > + ? ? ? ? ? ? ? ? ? ? ? slice_used, cfqq->slice_dispatch, cfqq->nr_sectors); > ? ? ? ?return slice_used; > ?} > > @@ -1608,6 +1610,7 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd, > ? ? ? ? ? ? ? ?cfqq->allocated_slice = 0; > ? ? ? ? ? ? ? ?cfqq->slice_end = 0; > ? ? ? ? ? ? ? ?cfqq->slice_dispatch = 0; > + ? ? ? ? ? ? ? cfqq->nr_sectors = 0; > > ? ? ? ? ? ? ? ?cfq_clear_cfqq_wait_request(cfqq); > ? ? ? ? ? ? ? ?cfq_clear_cfqq_must_dispatch(cfqq); > @@ -1970,6 +1973,7 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq) > ? ? ? ?elv_dispatch_sort(q, rq); > > ? ? ? ?cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; > + ? ? ? cfqq->nr_sectors += blk_rq_sectors(rq); > ? ? ? ?cfq_blkiocg_update_dispatch_stats(&cfqq->cfqg->blkg, blk_rq_bytes(rq), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rq_data_dir(rq), rq_is_sync(rq)); > ?} > -- > 1.7.1.1 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/