Skip to content

Commit 5922deb

Browse files
qiyeliuakpm00
authored andcommitted
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>
1 parent e4fe138 commit 5922deb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

mm/page_alloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5946,7 +5946,6 @@ static void per_cpu_pages_init(struct per_cpu_pages *pcp, struct per_cpu_zonesta
59465946
pcp->high_min = BOOT_PAGESET_HIGH;
59475947
pcp->high_max = BOOT_PAGESET_HIGH;
59485948
pcp->batch = BOOT_PAGESET_BATCH;
5949-
pcp->free_count = 0;
59505949
}
59515950

59525951
static void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high_min,

0 commit comments

Comments
 (0)