[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7cjrPfn2icWYpi=ZHC90SR8JcV5coTJV-xAAM3r3Yfpd8Q@mail.gmail.com>
Date: Thu, 3 Dec 2020 10:03:52 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: Andi Kleen <ak@...ux.intel.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>
Subject: Re: [RFC 1/2] perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event
Hi Stephane and Andi,
On Thu, Dec 3, 2020 at 8:40 AM Stephane Eranian <eranian@...gle.com> wrote:
>
> On Wed, Dec 2, 2020 at 2:42 PM Andi Kleen <ak@...ux.intel.com> wrote:
> >
> > On Wed, Dec 02, 2020 at 11:47:25AM -0800, Stephane Eranian wrote:
> > > On Wed, Dec 2, 2020 at 11:28 AM Andi Kleen <ak@...ux.intel.com> wrote:
> > > >
> > > > > + prev_cgrp = task_css_check(prev, perf_event_cgrp_id, 1)->cgroup;
> > > > > + next_cgrp = task_css_check(next, perf_event_cgrp_id, 1)->cgroup;
> > > > > +
> > > > > + if (prev_cgrp != next_cgrp)
> > > > > + perf_sw_event_sched(PERF_COUNT_SW_CGROUP_SWITCHES, 1, 0);
> > > >
> > > > Seems to be the perf cgroup only, not all cgroups.
> > > > That's a big difference and needs to be documented properly.
> > > >
> > > We care about the all-cgroup case.
> >
> > Then it's not correct I think. You need a different hook point.
> >
> I realize that ;-(
If we want to count any cgroup changes, I think we can compare
task->cgroups (css_set) here instead.
Thanks,
Namyung
Powered by blists - more mailing lists