[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250805084726.2054-1-ahuang12@lenovo.com>
Date: Tue, 5 Aug 2025 16:47:26 +0800
From: Adrian Huang <adrianhuang0701@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Hildenbrand <david@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Liam.Howlett@...cle.com,
Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>,
Feng Tang <feng.79.tang@...il.com>,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Adrian Huang <ahuang12@...ovo.com>
Subject: [PATCH 1/1] mm: Correct misleading comment on mmap_lock field in mm_struct
From: Adrian Huang <ahuang12@...ovo.com>
The comment previously described the offset of mmap_lock as 0x120 (hex),
which is misleading. The correct value is 120 (decimal), and 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.
Fixes: 2e3025434a6b ("mm: relocate 'write_protect_seq' in struct mm_struct")
Signed-off-by: Adrian Huang <ahuang12@...ovo.com>
---
include/linux/mm_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 1ec273b06691..ec90bbf22e2b 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1027,9 +1027,9 @@ struct mm_struct {
*/
/*
* With some kernel config, the current mmap_lock's offset
- * inside 'mm_struct' is at 0x120, which is very optimal, as
+ * inside 'mm_struct' is at 120, which is very optimal, as
* its two hot fields 'count' and 'owner' sit in 2 different
- * cachelines, and when mmap_lock is highly contended, both
+ * cachelines, and when mmap_lock is highly contended, both
* of the 2 fields will be accessed frequently, current layout
* will help to reduce cache bouncing.
*
--
2.34.1
Powered by blists - more mailing lists