Re: [PATCH] rhashtable: use per-init-site lockdep classes for bucket locks

From: Quanye Yang

Date: Sat Aug 29 2026 - 07:50:18 EST


Sent with Proton Mail secure email.

On Friday, August 28th, 2026 at AM 8:54, kernel test robot
<yi1.lai@xxxxxxxxx> wrote:

>
> Hello,
>
> kernel test robot noticed a 12.5% regression of stress-ng.shm-sysv.ops_per_sec on:
>
>
> commit: 62d8460a4e7a3ee028e5134d86169001490e7a60 ("[PATCH] rhashtable: use per-init-site lockdep classes for bucket locks")
> url: https://github.com/intel-lab-lkp/linux/commits/quanyeyang-via-B4-Relay/rhashtable-use-per-init-site-lockdep-classes-for-bucket-locks/20260815-014140
> patch link: https://lore.kernel.org/all/20260801-fix-rhashtable-bucket-lockdep-v1-1-15a0f8ae094c@xxxxxxxxx/
> patch subject: [PATCH] rhashtable: use per-init-site lockdep classes for bucket locks
>
> testcase: stress-ng
> config: x86_64-rhel-9.4
> compiler: gcc-14
> test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
> parameters:
>
> nr_threads: 100%
> testtime: 60s
> test: shm-sysv
> cpufreq_governor: performance
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <yi1.lai@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202608280842.861e5949-lkp@xxxxxxxxx
>
>
> Details are as below:
> -------------------------------------------------------------------------------------------------->
>
>
> The kernel config and materials to reproduce are available at:
> https://download.01.org/0day-ci/archive/20260828/202608280842.861e5949-lkp@xxxxxxxxx
>
> =========================================================================================
> compiler/cpufreq_governor/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
> gcc-14/performance/x86_64-rhel-9.4/100%/debian-13-x86_64-20250902.cgz/lkp-spr-r02/shm-sysv/stress-ng/60s
>
> commit:
> 0131b508c0 ("Merge tag 'ntfs-for-7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs")
> 62d8460a4e ("[PATCH] rhashtable: use per-init-site lockdep classes for bucket locks")
>
> 0131b508c0e2489e 62d8460a4e7a3ee028e5134d861
> ---------------- ---------------------------
> 192413 +44.1% 277255 stress-ng.shm-sysv.nanosecs_per_shmat_call
> 349549 +24.2% 433996 stress-ng.shm-sysv.nanosecs_per_shmdt_call
> 174600 +51.9% 265191 stress-ng.shm-sysv.nanosecs_per_shmget_call
> 793610 -12.5% 694260 stress-ng.shm-sysv.ops
> 13236 -12.5% 11578 stress-ng.shm-sysv.ops_per_sec
> 65737 -10.0% 59167 ± 4% stress-ng.time.involuntary_context_switches
> 53645785 -12.0% 47213499 ± 2% stress-ng.time.minor_page_faults
> 4660 +24.6% 5806 stress-ng.time.percent_of_cpu_this_job_got
> 2585 +27.8% 3305 stress-ng.time.system_time
> 214.61 -14.7% 183.11 stress-ng.time.user_time
> 10735595 -7.0% 9986470 stress-ng.time.voluntary_context_switches
>
>
> Disclaimer:
> Results have been estimated based on internal Intel analysis and are provided
> for informational purposes only. Any difference in system hardware or software
> design or configuration may affect actual performance.
>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
>
>
Thanks for the report.

This v1 was withdrawn after the subsequent discussion and was never
merged. I do not plan to resend this approach, so no separate fix will
be submitted.

The regression is likely caused by the unconditional bucket_lock_key
pointer changing the size and cacheline layout of struct rhashtable in
a configuration with CONFIG_DEBUG_LOCK_ALLOC disabled.

Thanks for the testing.