[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABk29NvpHQrnK2S8yBZhzjieJ59mGAZR8NdtZQAgu0YE_y3LPA@mail.gmail.com>
Date: Fri, 20 May 2022 16:09:33 -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 <linux-kernel@...r.kernel.org>,
Cruz Zhao <CruzZhao@...ux.alibaba.com>
Subject: Re: [PATCH] sched/core: add forced idle accounting for cgroups
On Fri, May 20, 2022 at 11:43 AM Tejun Heo <tj@...nel.org> wrote:
>
> Hello,
>
> Sorry about late reply and thanks for the ping. I missed this one.
>
> On Fri, May 13, 2022 at 12:23:16PM -0700, Josh Don wrote:
> > Yea, that's right, this doesn't require the cpu controller to be
> > enabled. Are you suggesting to add a new field to cgroup_base_stat?
>
> Yes, that's what I meant. I think it'd fit there better.
Sounds good, I'll send a second version of the patch with that change.
> > One other weird artifact of collecting forceidle time is that a cpu
> > may account it on behalf of its hyperthread sibling. Currently, the
> > core rstat code always accounts to the current cpu's percpu rstat
> > field. I can add an accounting function to support writes to a
> > different cpu's field, in order to make sure that the per-cpu totals
> > are correct (the forceidle accounting code holds rq->__lock, which
> > protects all HT siblings of a core). percpu totals aren't currently
> > exported in cgroup v2, but this is useful information that we'll
> > consume, so it would be nice to keep it accurate.
>
> Sure, as long as it doesn't incur overhead when not used.
The extra complexity actually doesn't seem to be required. Per-core
totals will be accurate, which is the important part.
Thanks,
Josh
Powered by blists - more mailing lists