Re: [Regression or Fix]perf: profiling stats sigificantly changed for aio_write/read(ext4) between 6.7.0-rc1 and 6.6.0

From: David Wang
Date: Wed Nov 15 2023 - 11:25:08 EST




At 2023-11-15 23:45:38, "Namhyung Kim" <namhyung@xxxxxxxxxx> wrote:
>Hello,
>

>>
>> On Tue, Nov 14, 2023 at 11:20:32PM +0800, David Wang wrote:
>> >
>> >
>> > At 2023-11-14 12:31:12, "David Wang" <00107082@xxxxxxx> wrote:
>> > >Hi,
>> > >
>> > >I was making kernel profiling to identify kernel changes between revisions under the load of fio benchmark,
>> >
>> > >But I did not notice a significant change in the overhead of perf tracing based on the fio report,
>> > >that is why I am not sure whether this is a regression or an improvement....
>> > >Just report the change.
>
>Do you mean f06cc667f79 ("perf: Optimize perf_cgroup_switch")?

Yes

>Did you have cgroup events when you ran the benchmark?
>Otherwise it should not make any differences.
>

My test happened to trigger frequent context switch (IO bench), and my profiling was targeting a cgroup (v2) where fio runs. , yes, cgroup and context switch :)

>
>> > I think there are some cases where pmu_ctx->nr_cgroups is zero but there is still cgroup event within, and some samples are missed, causing the stats changes, just a guess.
>
>I don't know what makes you think so. Do you see
>differences in the perf output? Any cgroup events having
>smaller number of samples or counts?

I obverse total sample count decreased 10%~20%, one report show sample count increase from 266521 to 317649 after reverting the commit.
But I did not use perf-tool, I will try it.

>
>Or was the fio benchmark degraded seriously?
>

Noop, benchmark did degrade when profiling is running, but no significant changes observed w/o the commit.



David Wang