All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Ricky Benitez <rickyb@google.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Corrado Zoccolo <czoccolo@gmail.com>,
	Jeff Moyer <jmoyer@redhat.com>,
	Gui Jianfeng <guijianfeng@cn.fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Expose the statistics in blkio.time and blkio.sectors for the root cgroup
Date: Wed, 24 Mar 2010 20:52:28 -0400	[thread overview]
Message-ID: <20100325005228.GA13225@redhat.com> (raw)
In-Reply-To: <1269473756-30327-1-git-send-email-rickyb@google.com>

On Wed, Mar 24, 2010 at 04:35:56PM -0700, Ricky Benitez wrote:
> Currently, the io statistics for the root cgroup are maintained, but
> they are not shown because the device information is not available at
> the point that the root blkio cgroup is created. This patch updates
> the device information when the statistics are updated so that the
> statistics become visible.
> 

Ok, root group is created when request queue is being initialized and
device information like major/minor number is not available. This is
not the cleanest solution but can't think of something better right now.

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Thanks
Vivek

> Signed-off-by: Ricky Benitez <rickyb@google.com>
> ---
>  block/cfq-iosched.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index dee9d93..4a3579a 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -947,6 +947,11 @@ cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create)
>  	unsigned int major, minor;
>  
>  	cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key));
> +	if (cfqg && !cfqg->blkg.dev && bdi->dev && dev_name(bdi->dev)) {
> +		sscanf(dev_name(bdi->dev), "%u:%u", &major, &minor);
> +		cfqg->blkg.dev = MKDEV(major, minor);
> +		goto done;
> +	}
>  	if (cfqg || !create)
>  		goto done;
>  
> -- 
> 1.7.0.1

  reply	other threads:[~2010-03-25  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 23:35 [PATCH] Expose the statistics in blkio.time and blkio.sectors for the root cgroup Ricky Benitez
2010-03-25  0:52 ` Vivek Goyal [this message]
2010-04-05 14:20   ` Manuel Benitez
2010-04-05 16:20     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100325005228.GA13225@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=czoccolo@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rickyb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.