public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Update scheduler stat documentation.
Date: Tue, 17 Jan 2012 10:50:56 +0100	[thread overview]
Message-ID: <20120117095056.GF10397@elte.hu> (raw)
In-Reply-To: <CADZ9YHh9rnTom8dRk5PBdY0Qu6WQVNpUr2jJDeyqg7fxTiu1gg@mail.gmail.com>


* Rakib Mullick <rakib.mullick@gmail.com> wrote:

> On Mon, Jan 16, 2012 at 2:36 PM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> >
> > Yes - but we should also change it to export a value of zero.
> > The field is a legacy 'array expirations' field, and as such it
> > should be zero.
> >
> 
> Ok, thanks for suggestions. Please, look at the following patch, it's
> been roughly created to address your suggestion. If it looks okay,
> then I can send formal patch (perhaps two separate patches?). In this
> way, I think we can also remove rq->sched_switch field (not done in
> this patch)?
> 
> diff --git a/Documentation/scheduler/sched-stats.txt
> b/Documentation/scheduler/sched-stats.txt
> index 1cd5d51..cc2d107 100644
> --- a/Documentation/scheduler/sched-stats.txt
> +++ b/Documentation/scheduler/sched-stats.txt
> @@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
>       1) # of times sched_yield() was called
> 
>  Next three are schedule() statistics:
> -     2) # of times we switched to the expired queue and reused it
> +     2) This field is a legacy array expiration field used in O(1) scheduler.
> +	But still kept for ABI integrity.

I'd formulate it like this:

> +     2) This field is a legacy array expiration count field
> +        used in the O(1) scheduler. We kept it for ABI
> +        compatibility, but it is always set to zero.


> +		int rq_sched_switch = 0;
>  #ifdef CONFIG_SMP
>  		struct sched_domain *sd;
>  		int dcount = 0;
> @@ -34,7 +35,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
>  		seq_printf(seq,
>  		    "cpu%d %u %u %u %u %u %u %llu %llu %lu",
>  		    cpu, rq->yld_count,
> -		    rq->sched_switch, rq->sched_count, rq->sched_goidle,
> +		    rq_sched_switch, rq->sched_count, rq->sched_goidle,

printf can print a 0 value just fine as part of the format 
string ... :-)

But yeah, this logic is what i had in mind.

Thanks,

	Ingo

  reply	other threads:[~2012-01-17  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 17:27 [PATCH] sched: Update scheduler stat documentation Rakib Mullick
2012-01-16  7:56 ` Ingo Molnar
2012-01-16  8:22   ` Rakib Mullick
2012-01-16  8:36     ` Ingo Molnar
2012-01-16 16:51       ` Rakib Mullick
2012-01-17  9:50         ` Ingo Molnar [this message]
2012-01-17 15:33           ` Rakib Mullick

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=20120117095056.GF10397@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rakib.mullick@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox