From: David Rientjes <rientjes@google.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vishnu Pratap Singh <vishnu.ps@samsung.com>,
Pintu Kumar <pintu.k@samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] mm/page_alloc.c: Pull out init code from build_all_zonelists
Date: Mon, 2 Feb 2015 16:25:25 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.10.1502021624090.667@chino.kir.corp.google.com> (raw)
In-Reply-To: <1422921016-27618-3-git-send-email-linux@rasmusvillemoes.dk>
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@rasmusvillemoes.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-02-03 0:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 23:50 [PATCH 0/5] mm: Some .text savings Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 1/5] mm/internal.h: Don't split printk call in two Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 2/5] mm/page_alloc.c: Pull out init code from build_all_zonelists Rasmus Villemoes
2015-02-03 0:25 ` David Rientjes [this message]
2015-02-03 9:57 ` Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 3/5] mm/mm_init.c: Mark mminit_verify_zonelist as __init Rasmus Villemoes
2015-02-02 23:50 ` [PATCH 4/5] mm/mm_init.c: Mark mminit_loglevel __meminitdata Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1502021624090.667@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mina86@mina86.com \
--cc=pintu.k@samsung.com \
--cc=vishnu.ps@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox