Re: [PATCH] tg: add cpu's wait_count of a task group

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello tejun:
On Sat, Jan 16, 2021 at 4:20 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> Hello,
>
> On Fri, Jan 15, 2021 at 10:30:05PM +0800, wu860403@xxxxxxxxx wrote:
> > -     seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time);
> ...
> > +     seq_printf(sf, "nr_periods %d\n"
> > +                "nr_throttled %d\n"
> > +                "throttled_usec %llu\n",
> > +                cfs_b->nr_periods, cfs_b->nr_throttled,
> > +                throttled_usec);
>
> This is interface breaking change. I don't think we can do this at this
> point.
Thanks for your reply, agree with it.
> > @@ -8255,6 +8265,19 @@ static int cpu_extra_stat_show(struct seq_file *sf,
> >                          "throttled_usec %llu\n",
> >                          cfs_b->nr_periods, cfs_b->nr_throttled,
> >                          throttled_usec);
> > +             if (schedstat_enabled() && tg != &root_task_group) {
> > +                     u64 ws = 0;
> > +                     u64 wc = 0;
> > +                     int i;
> > +
> > +                     for_each_possible_cpu(i) {
> > +                             ws += schedstat_val(tg->se[i]->statistics.wait_sum);
> > +                             wc += schedstat_val(tg->se[i]->statistics.wait_count);
> > +                     }
> > +
> > +                     seq_printf(sf, "wait_sum %llu\n"
> > +                             "wait_count %llu\n", ws, wc);
> > +             }
>
> What does sum/count tell?
It can tell the task group average latency of every context switch
wait_sum is equivalent to sched_info->run_delay (the second parameter
of /proc/$pid/schedstat)
wait_count is equivalent to sched_info->pcount(the third parameter of
/proc/$pid/schedstat)

Thanks

Liming



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux