Bug 28493 - [devel-5.10] fs/address_space: move i_mmap_rwsem to mitigate a false sharing with i_mmap.
Summary: [devel-5.10] fs/address_space: move i_mmap_rwsem to mitigate a false sharing ...
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-24 15:23 UTC by LeoLiu-oc
Modified: 2025-12-24 15:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeoLiu-oc zhaoxin_group 2025-12-24 15:23:07 UTC
commit d3b1a9a778e1a014c5331d1e8d4863fd999eb0b5 upstream.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=d3b1a9a778e1a014c5331d1e8d4863fd999eb0b5

In the struct address_space, there is a 32-byte gap between i_mmap
and i_mmap_rwsem. Due to the alignment of struct address_space
variables to 8 bytes, in certain situations, i_mmap and i_mmap_rwsem
may end up in the same CACHE line.

While running Unixbench/execl, we observe high false sharing issues
when accessing i_mmap against i_mmap_rwsem. We move i_mmap_rwsem
after i_private_list, ensuring a 64-byte gap between i_mmap and
i_mmap_rwsem.

For Intel Silver machines (2 sockets) using kernel v6.8 rc-2, the score
of Unixbench/execl improves by ~3.94%, and the score of Unixbench/shell
improves by ~3.26%.
Comment 1 小龙 admin 2025-12-24 15:24:55 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/6259