[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEBCCvKKS1OLP1Z0@e129823.arm.com>
Date: Wed, 4 Jun 2025 13:54:34 +0100
From: Yeoreum Yun <yeoreum.yun@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Leo Yan <leo.yan@....com>, mingo@...hat.com, mingo@...nel.org,
acme@...nel.org, namhyung@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
irogers@...gle.com, adrian.hunter@...el.com,
kan.liang@...ux.intel.com, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org, David Wang <00107082@....com>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
[...]
> > But suppose the child_task(2) try to fork (child_task3) and
> > inherit the event (create child_event(3, parent_event:0),
> > and at the fork, forking can observe the parent event state as "EXIT".
> > In thie situation why child_event(3, parent_event:0) should be created for
> > child_task(3)?
>
> Yes. You set out to monitor the whole hierarchy, so any child created
> after the first task should be monitored, until such time that you close
> the event.
>
> Notably, a fair number of daemons go about their business by explicitly
> closing their original task in order to detach from the tty.
>
> Also, per the context switch optimization the original event doesn't
> need to stay with the original parent, it can end up on a random child.
Ahh I overlooked daemon case. Thanks for clarification..!
--
Sincerely,
Yeoreum Yun
Powered by blists - more mailing lists