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: Tue Nov 21 2023 - 00:52:43 EST



At 2023-11-21 06:59:18, "Namhyung Kim" <namhyung@xxxxxxxxxx> wrote:
>On Fri, Nov 17, 2023 at 5:48 PM David Wang <00107082@xxxxxxx> wrote:
>>

>> >And is there any chance if it's improved because of the change?
>> >Are the numbers in 6.7 better or worse?
>> >
>> I have no idea whether the change of expected total sample count a bug or a fix, but, the observed result that total sample count drift a lot (bigger standard deviation), I think , is a bad thing.
>
>Right. Can you run perf stat to measure the number of context
>switches and cgroup switches, then?
>
> sudo perf stat -a -e context-switches,cgroup-switches -- sleep 10
>

I upgraded to 6.7-rc2, now I am testing v6.7-rc2 against v6.7-rc2 with f06cc66 reverted with following command:
$ for i in {1..6}; do sudo ./perf stat -a -e context-switches,cgroup-switches -G mytest -- sleep 10; sleep 1; done
while `fio --randrepeat=1 --ioengine=libaio --direct=1 --name=test --bs=4k --iodepth=64 --size=1G --readwrite=randrw --runtime=300 --numjobs=4 --time_based=1` was running in cgroup mytest.

v6.7-rc2
+----+------------------+-----------------+----------+
| | context-switches | cgroup-switches | ratio |
+----+------------------+-----------------+----------+
| #1 | 505168 | 503494 | 1:0.9967 |
| #2 | 503627 | 501932 | 1:0.9966 |
| #3 | 509352 | 507397 | 1:0.9962 |
| #4 | 510274 | 508357 | 1:0.9962 |
| #5 | 508872 | 507063 | 1:0.9964 |
| #6 | 506138 | 504205 | 1:0.9962 |
+----+------------------+-----------------+----------+

v6.7-rc2 with f06cc66 reverted:
+----+------------------+-----------------+----------+
| | context-switches | cgroup-switches | ratio |
+----+------------------+-----------------+----------+
| #1 | 462504 | 460733 | 1:0.9962 |
| #2 | 464717 | 463036 | 1:0.9964 |
| #3 | 462245 | 460361 | 1:0.9959 |
| #4 | 463522 | 461783 | 1:0.9962 |
| #5 | 459760 | 458005 | 1:0.9962 |
| #6 | 457863 | 456024 | 1:0.9960 |
+----+------------------+-----------------+----------+

The different mean value is apparent, but no wider deviation observed, maybe the larger standard deviation observed in my last mail is caused by other factors during fio session.


Thanks
David Wang