Re: 6.10/regression/bisected - after f1d97e769152 I spotted increased execution time of the kswapd0 process and symptoms as if there is not enough memory

From: Mikhail Gavrilov
Date: Thu Jul 04 2024 - 06:50:49 EST


On Thu, Jul 4, 2024 at 2:57 PM Filipe Manana <fdmanana@xxxxxxxxxx> wrote:
>
> I wonder if you have bpftrace installed and can run the following
> script while doing the test:
>
> $ cat bpftrace-em-shrinker.sh
> #!/usr/bin/bpftrace
>
> tracepoint:btrfs:btrfs_extent_map_shrinker_scan_enter
> {
> time("%H:%M:%S ");
> @start_em_scan[tid] = nsecs;
> printf("%s enter shrinker scan %ld nr %ld root %llu ino %llu\n",
> comm, args->nr_to_scan, args->nr, args->last_root_id, args->last_ino);
> }
>
> tracepoint:btrfs:btrfs_extent_map_shrinker_scan_exit
> /@start_em_scan[tid]/
> {
> time("%H:%M:%S ");
> $dur = (nsecs - @start_em_scan[tid]) / 1000;
> delete(@start_em_scan[tid]);
> printf("%s exit shrinker drop %ld nr %ld root %llu ino %llu | %llu us\n",
> comm, args->nr_dropped, args->nr, args->last_root_id,
> args->last_ino, $dur);
> }
>
> END
> {
> clear(@start_em_scan);
> }
>
> The run it like:
>
> $ ./bpftrace-em-shrinker.sh 2>&1 | tee em_shrinker_log.txt
>
> And provide the log file.

I applied all four patches and still not seen any improvements:
6.10.0-0.rc6.53.fc41.x86_64+debug with patch (1-4)
up 1:02
root 269 27.9 0.0 0 0 ? R 10:00 17:29 [kswapd0]
up 2:00
root 269 43.7 0.0 0 0 ? R 10:00 52:47 [kswapd0]
up 3:00
root 269 40.5 0.0 0 0 ? R 10:00 73:22 [kswapd0]
up 4:00
root 269 43.9 0.0 0 0 ? R 10:00 105:30 [kswapd0]
up 5:00
root 269 48.7 0.0 0 0 ? R 10:00 146:22 [kswapd0]

Also, I attached em_shrinker_log.txt in the archive.

--
Best Regards,
Mike Gavrilov.

Attachment: em_shrinker_log.zip
Description: Zip archive