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/damon/stat: remove __read_mostly from memory_idle_ms_percentiles

The 'memory_idle_ms_percentiles' array in DAMON_STAT is updated frequently
by the kernel to reflect the latest idle time statistics. Marking it as
'__read_mostly' is inappropriate for data that is regularly written to, as
it can lead to cache pollution in the read-mostly section.

Remove the '__read_mostly' annotation to accurately reflect the
variable's usage pattern.

Link: https://lkml.kernel.org/r/20260130085603.1814-1-lirongqing@baidu.com
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Li RongQing and committed by
Andrew Morton
06f5ff36 3881b00a

+1 -1
+1 -1
mm/damon/stat.c
··· 34 34 MODULE_PARM_DESC(estimated_memory_bandwidth, 35 35 "Estimated memory bandwidth usage in bytes per second"); 36 36 37 - static long memory_idle_ms_percentiles[101] __read_mostly = {0,}; 37 + static long memory_idle_ms_percentiles[101] = {0,}; 38 38 module_param_array(memory_idle_ms_percentiles, long, NULL, 0400); 39 39 MODULE_PARM_DESC(memory_idle_ms_percentiles, 40 40 "Memory idle time percentiles in milliseconds");