Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: correct misleading comment on mmap_lock field in mm_struct

The comment previously described the offset of mmap_lock as 0x120 (hex),
which is misleading. The correct offset is 56 bytes (decimal) from the
last cache line boundary. Using '0x120' could confuse readers trying to
understand why the count and owner fields reside in separate cachelines.

This change also removes an unnecessary space for improved formatting.

Link: https://lkml.kernel.org/r/20250806145906.24647-1-adrianhuang0701@gmail.com
Signed-off-by: Adrian Huang (Lenovo) <adrianhuang0701@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Adrian Huang (Lenovo) and committed by
Andrew Morton
61dc4358 6de1ef1c

+3 -3
+3 -3
include/linux/mm_types.h
··· 1026 1026 * counters 1027 1027 */ 1028 1028 /* 1029 - * With some kernel config, the current mmap_lock's offset 1030 - * inside 'mm_struct' is at 0x120, which is very optimal, as 1029 + * Typically the current mmap_lock's offset is 56 bytes from 1030 + * the last cacheline boundary, which is very optimal, as 1031 1031 * its two hot fields 'count' and 'owner' sit in 2 different 1032 - * cachelines, and when mmap_lock is highly contended, both 1032 + * cachelines, and when mmap_lock is highly contended, both 1033 1033 * of the 2 fields will be accessed frequently, current layout 1034 1034 * will help to reduce cache bouncing. 1035 1035 *