mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Subject: Re: [PATCH] sched/fair: Add stats update for cfs_rq->exec_clock in update_curr() again
Date: Sat, 4 May 2024 17:47:57 +0530	[thread overview]
Message-ID: <ba8c7408-2b8a-45e6-b5d0-87a815f37dde@linux.ibm.com> (raw)
In-Reply-To: <20240503104605.1871571-1-dietmar.eggemann@arm.com>

Hi Dietmar Eggemann,

On 03/05/24 16:16, Dietmar Eggemann wrote:
> Commit 5d69eca542ee ("sched: Unify runtime accounting across classes")
> removed it and since then:
> 
>   echo 1 > /proc/sys/kernel/sched_schedstats
>   cat /sys/kernel/debug/sched/debug | grep exec_clock
> 
> returns:
> 
>   .exec_clock                    : 0.000000
> 
> for all cfs_rq's.
> 
> Put the schedstat_add() back to be able to watch the cfs_rq runtime
> statistic.
> 
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> ---
>  kernel/sched/fair.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 9eb63573110c..37bb3cee6fec 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1158,6 +1158,7 @@ static void update_curr(struct cfs_rq *cfs_rq)
>  	delta_exec = update_curr_se(rq_of(cfs_rq), curr);
>  	if (unlikely(delta_exec <= 0))
>  		return;
> +	schedstat_add(cfs_rq->exec_clock, delta_exec);
>  
>  	curr->vruntime += calc_delta_fair(delta_exec, curr);
>  	update_deadline(cfs_rq, curr);

Able to see the stats now with the patch.

Tested-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>

Thanks and Regards
Madadi Vineeth Reddy



      reply	other threads:[~2024-05-04 12:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 10:46 Dietmar Eggemann
2024-05-04 12:17 ` Madadi Vineeth Reddy [this message]

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=ba8c7408-2b8a-45e6-b5d0-87a815f37dde@linux.ibm.com \
    --to=vineethr@linux.ibm.com \
    --cc=20240503104605.1871571-1-dietmar.eggemann@arm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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

all inboxes | Powered by JetHome®