[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABk29Nvh6jxv3cWampfjiz57=vvQVX8ThtaJPXF=vc3aqme6YQ@mail.gmail.com>
Date: Wed, 24 May 2023 17:06:08 -0700
From: Josh Don <joshdon@...gle.com>
To: Tejun Heo <tj@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
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,
Xiangling Kong <xiangling@...gle.com>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 2/2] sched: add throttled time stat for throttled children
Hey Tejun,
On Tue, May 23, 2023 at 2:44 PM Tejun Heo <tj@...nel.org> wrote:
>
> Hello,
>
> (cc'ing Johannes)
>
> On Wed, May 17, 2023 at 06:34:14PM -0700, Josh Don wrote:
> > We currently export the total throttled time for cgroups that are given
> > a bandwidth limit. This patch extends this accounting to also account
> > the total time that each children cgroup has been throttled.
> >
> > This is useful to understand the degree to which children have been
> > affected by the throttling control. Children which are not runnable
> > during the entire throttled period, for example, will not show any
> > self-throttling time during this period.
> ...
> > @@ -11204,20 +11217,24 @@ static int cpu_extra_stat_show(struct seq_file *sf,
> > {
> > struct task_group *tg = css_tg(css);
> > struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
> > - u64 throttled_usec, burst_usec;
> > + u64 throttled_usec, burst_usec, throttled_self_usec;
> >
> > throttled_usec = cfs_b->throttled_time;
> > do_div(throttled_usec, NSEC_PER_USEC);
> > + throttled_self_usec = throttled_time_self(tg);
> > + do_div(throttled_self_usec, NSEC_PER_USEC);
> > burst_usec = cfs_b->burst_time;
> > do_div(burst_usec, NSEC_PER_USEC);
> >
> > seq_printf(sf, "nr_periods %d\n"
> > "nr_throttled %d\n"
> > "throttled_usec %llu\n"
> > + "throttled_self_usec %llu\n"
>
> This is fine in principle but I think it'd be better to keep it consistent
> with how non-hierarchical events are in memory.events.local. ie. Can we
> please add cpu.stat.local instead of adding the _self key to cpu.stat?
It seemed unfortunate to split it out into a separate interface, since
there wouldn't be much to put there, but I don't have a strong
objection to this. I'll go ahead and make that change for v2.
Best,
Josh
Powered by blists - more mailing lists