lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ba8c7408-2b8a-45e6-b5d0-87a815f37dde@linux.ibm.com>
Date: Sat, 4 May 2024 17:47:57 +0530
From: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
To: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
        Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira
 <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [PATCH] sched/fair: Add stats update for cfs_rq->exec_clock in
 update_curr() again

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@....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@...ux.ibm.com>

Thanks and Regards
Madadi Vineeth Reddy



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ