[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1502021624090.667@chino.kir.corp.google.com>
Date: Mon, 2 Feb 2015 16:25:25 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Vishnu Pratap Singh <vishnu.ps@...sung.com>,
Pintu Kumar <pintu.k@...sung.com>,
Michal Nazarewicz <mina86@...a86.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] mm/page_alloc.c: Pull out init code from
build_all_zonelists
On Tue, 3 Feb 2015, Rasmus Villemoes wrote:
> 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.
>
I think we should see the .text savings in the changelog to decide whether
we want a __ref function (granted, with comment) calling an __init
function in the source code.
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> ---
> mm/page_alloc.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 7633c503a116..c58aa42a3387 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3945,18 +3945,29 @@ static int __build_all_zonelists(void *data)
> return 0;
> }
>
> +static noinline void __init
> +build_all_zonelists_init(void)
> +{
> + __build_all_zonelists(NULL);
> + mminit_verify_zonelist();
> + cpuset_init_current_mems_allowed();
> +}
> +
> /*
> * 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)
> {
> set_zonelist_order();
>
> if (system_state == SYSTEM_BOOTING) {
> - __build_all_zonelists(NULL);
> - mminit_verify_zonelist();
> - cpuset_init_current_mems_allowed();
> + build_all_zonelists_init();
> } else {
> #ifdef CONFIG_MEMORY_HOTPLUG
> if (zone)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists