summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorYe Liu <liuye@kylinos.cn>2025-08-14 15:18:28 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-09-13 16:55:02 -0700
commit5922deb3ecc0e3c6027e4779e00d2505ebeba9df (patch)
tree70ff3338d403386d9729dfe797953b39cbf59e5f /mm/page_alloc.c
parente4fe1388dfbdd9641331071cd9b4a9efa16da34d (diff)
mm/page_alloc: remove redundant pcp->free_count initialization in per_cpu_pages_init()
In per_cpu_pages_init(), pcp->free_count is explicitly initialized to 0, but this is redundant because the entire struct is already zeroed by memset(pcp, 0, sizeof(*pcp)). Link: https://lkml.kernel.org/r/20250814071828.12036-1-ye.liu@linux.dev Signed-off-by: Ye Liu <liuye@kylinos.cn> Reviewed-by: Brendan Jackman <jackmanb@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index fd55ca824c47..2ee21e46f0fb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5946,7 +5946,6 @@ static void per_cpu_pages_init(struct per_cpu_pages *pcp, struct per_cpu_zonesta
pcp->high_min = BOOT_PAGESET_HIGH;
pcp->high_max = BOOT_PAGESET_HIGH;
pcp->batch = BOOT_PAGESET_BATCH;
- pcp->free_count = 0;
}
static void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high_min,