lkml.org 
[lkml]   [2023]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@kernel.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

\
 
 \ /
  Last update: 2023-05-25 02:06    [W:2.461 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site