Commit 061f67bc authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Linus Torvalds
Browse files

mm/page_alloc.c: pull out init code from build_all_zonelists

Pulling the code protected by if (system_state == SYSTEM_BOOTING) into
its own helper allows us to shrink .text a little. This relies on
build_all_zonelists already having a __ref annotation. Add a comment
explaining why so one doesn't have to track it down through git log.

The real saving comes in 3/5, ("mm/mm_init.c: Mark mminit_verify_zonelist
as __init"), where we save about 400 bytes
Signed-off-by: default avatarRasmus Villemoes <>
Cc: Vlastimil Babka <>
Cc: Rik van Riel <>
Cc: Joonsoo Kim <>
Cc: David Rientjes <>
Cc: Vishnu Pratap Singh <>
Cc: Pintu Kumar <>
Cc: Michal Nazarewicz <>
Cc: Mel Gorman <>
Cc: Paul Gortmaker <>
Cc: Peter Zijlstra <>
Cc: Tim Chen <>
Cc: Hugh Dickins <>
Cc: Li Zefan <>
Cc: Tejun Heo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent fc5199d1
......@@ -3871,18 +3871,29 @@ static int __build_all_zonelists(void *data)
return 0;
static noinline void __init
* Called with zonelists_mutex held always
* unless system_state == SYSTEM_BOOTING.
* __ref due to (1) call of __meminit annotated setup_zone_pageset
* [we're only called with non-NULL zone through __meminit paths] and
* (2) call of __init annotated helper build_all_zonelists_init
* [protected by SYSTEM_BOOTING].
void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
if (system_state == SYSTEM_BOOTING) {
} else {
if (zone)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment