From nobody Sun Feb 8 15:25:02 2026 Received: from outbound.baidu.com (mx24.baidu.com [111.206.215.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FF6D34CFA8 for ; Fri, 30 Jan 2026 09:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.206.215.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769764314; cv=none; b=YX6hM3+L2xkjtOboZ4kw0F0NY5LFeoDjUBV4yxzzzdZ48WXw+oWXY70sjvPXoB4XCl1QnkhOu5B+TZKMyGwzg4Wjv6cMKbcJFtxKI3ZXrcTxuFMKDvCINZD25DhAX4zkuIl1HTyo0m1AZ4mDcxSwjNHF1KsLoc0sl2Ew8YHLZl0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769764314; c=relaxed/simple; bh=fZhU4NRWw871KX5aUACDSwJMpDszMHqcrSRNNDBgl/c=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=DTytKrzBIHjxpHgL/uMTi7q5buL0I9hkkh3UM08QFbAXNTZ/ZZxjRsEz7RdaJocjxU1oyKXO10ZgF4GonStb8IP4et+nJXRItqnaapfO3XpNdFC3XLrt6+G4NZOffbJnW2QQO886F5htkZUUOOZHG6EhWUUWovGPvjlQY2c/61c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; arc=none smtp.client-ip=111.206.215.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com From: lirongqing To: , , , , CC: Li RongQing Subject: [PATCH] mm/damon: remove __read_mostly from memory_idle_ms_percentiles Date: Fri, 30 Jan 2026 03:56:03 -0500 Message-ID: <20260130085603.1814-1-lirongqing@baidu.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: bjkjy-exc11.internal.baidu.com (172.31.51.11) To bjkjy-exc3.internal.baidu.com (172.31.50.47) X-FEAS-Client-IP: 172.31.50.47 X-FE-Policy-ID: 52:10:53:SYSTEM Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Li RongQing 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. Signed-off-by: Li RongQing Reviewed-by: SeongJae Park --- mm/damon/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/stat.c b/mm/damon/stat.c index ed8e362..5c4eec0 100644 --- a/mm/damon/stat.c +++ b/mm/damon/stat.c @@ -34,7 +34,7 @@ module_param(estimated_memory_bandwidth, ulong, 0400); MODULE_PARM_DESC(estimated_memory_bandwidth, "Estimated memory bandwidth usage in bytes per second"); =20 -static long memory_idle_ms_percentiles[101] __read_mostly =3D {0,}; +static long memory_idle_ms_percentiles[101] =3D {0,}; module_param_array(memory_idle_ms_percentiles, long, NULL, 0400); MODULE_PARM_DESC(memory_idle_ms_percentiles, "Memory idle time percentiles in milliseconds"); --=20 2.9.4