Re: [PATCH v5 07/10] perf sched stats: Add support for live mode

From: Swapnil Sapkal

Date: Tue Mar 10 2026 - 06:12:01 EST


Hi Ian,

Sorry for the delay.

On 04-03-2026 00:17, Ian Rogers wrote:
On Mon, Jan 19, 2026 at 10:02 AM Swapnil Sapkal <swapnil.sapkal@xxxxxxx> wrote:
[ snip ]
+ /* wait for signal */
+ pause();

I'm seeing the perf sched stats test hang here, requiring me to kill
the perf process started by the test. It is unclear what signal is
being waited upon, but is there a race condition where the signal
could have occurred before the pause? Should the pause at least be
conditional on that happening? Given that a race condition would exist
even with a test, would it be better to use a condition variable?


I am able to reproduce the issue. There are other places also where the same issue can be reproduced. (e.g. with `perf lock contention -b`)

I will propose a fix.

Thanks,
Ian
--
Thanks and Regards,
Swapnil