linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/stats: Keep legacy array expiration field to zero.
Date: Mon, 23 Jan 2012 13:56:33 +0100	[thread overview]
Message-ID: <1327323393.2446.9.camel@twins> (raw)
In-Reply-To: <1326991042.6107.4.camel@localhost.localdomain>

On Thu, 2012-01-19 at 22:37 +0600, Rakib Mullick wrote:
> A patch (https://lkml.org/lkml/2012/1/12/224) was sent previously to
> update scheduler stat documentation to address array expiration
> field's use. Then Ingo suggest that, we should also make sure that
> we're exporting a value of zero. So, this patch does those
> accordingly.


This is not a valid changelog
> 
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
> ---
> 
> diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt
> index 1cd5d51..8259b34 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 count field used in the O(1)
> +	scheduler. We kept it for ABI compatibility, but it is always set to zero.
>       3) # of times schedule() was called
>       4) # of times schedule() left the processor idle
>  
> diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
> index 2a581ba..903ffa9e 100644
> --- a/kernel/sched/stats.c
> +++ b/kernel/sched/stats.c
> @@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
>  
>  		/* runqueue-specific stats */
>  		seq_printf(seq,
> -		    "cpu%d %u %u %u %u %u %u %llu %llu %lu",
> +		    "cpu%d %u 0 %u %u %u %u %llu %llu %lu",
>  		    cpu, rq->yld_count,
> -		    rq->sched_switch, rq->sched_count, rq->sched_goidle,
> +		    rq->sched_count, rq->sched_goidle,
>  		    rq->ttwu_count, rq->ttwu_local,
>  		    rq->rq_cpu_time,
>  		    rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);
> 
> 

This leaves sched_switch completely unused:

# git grep -e "\<sched_switch\>"  kernel/sched/
kernel/sched/debug.c:   P(sched_switch);                                                                                                                                                   
kernel/sched/sched.h:   unsigned int sched_switch;                                                                                                                                         
kernel/sched/stats.c:               rq->sched_switch, rq->sched_count, rq->sched_goidle, 

Best kill that too
                     

  reply	other threads:[~2012-01-23 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 16:37 [PATCH] sched/stats: Keep legacy array expiration field to zero Rakib Mullick
2012-01-23 12:56 ` Peter Zijlstra [this message]
2012-01-23 16:21   ` 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=1327323393.2446.9.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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;
as well as URLs for NNTP newsgroup(s).