From: Cyrill Gorcunov <gorcunov@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
tglx@linutronix.de, yinghai@kernel.org, brgerst@gmail.com,
shaohui.zheng@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] x86, mm: Clean up initmem_init
Date: Fri, 04 Mar 2011 00:43:47 +0300 [thread overview]
Message-ID: <4D700B93.2080807@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1103031231060.9993@chino.kir.corp.google.com>
On 03/04/2011 12:15 AM, David Rientjes wrote:
> This patch cleans initmem_init() so that it is more readable and doesn't
> use an unnecessary array of function pointers to convolute the flow of
> the code. It also makes it obvious that dummy_numa_init() will always
> succeed (and documents that requirement) so that the existing BUG() is
> never actually reached.
>
> No functional change.
>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
> arch/x86/mm/numa_64.c | 92 ++++++++++++++++++++++++++++---------------------
> 1 files changed, 53 insertions(+), 39 deletions(-)
>
...
> +void __init initmem_init(void)
> +{
> + int ret;
>
> - if (nid == NUMA_NO_NODE)
> - continue;
> - if (!node_online(nid))
> - numa_clear_node(j);
> - }
> - numa_init_array();
> - return;
> + if (!numa_off) {
> +#ifdef CONFIG_ACPI_NUMA
> + ret = numa_init(x86_acpi_numa_init);
> + if (!ret)
> + return;
> +#endif
> +#ifdef CONFIG_AMD_NUMA
> + ret = numa_init(amd_numa_init);
> + if (!ret)
> + return;
> +#endif
> }
> - BUG();
> +
> + numa_init(dummy_numa_init);
> }
>
> unsigned long __init numa_free_all_bootmem(void)
Divid, I suspect it's due to diff format and we still need "ret" here, right?
--
Cyrill
next prev parent reply other threads:[~2011-03-03 21:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tip-ffe77a4605fb2588f8666850ad3e3b196241658f@git.kernel.org>
2011-02-20 3:34 ` [tip:x86/mm] x86-64, NUMA: Restructure initmem_init() David Rientjes
2011-02-21 8:35 ` Tejun Heo
2011-03-03 21:15 ` [patch] x86, mm: Clean up initmem_init David Rientjes
2011-03-03 21:43 ` Cyrill Gorcunov [this message]
2011-03-03 22:00 ` David Rientjes
2011-03-03 22:03 ` Yinghai Lu
2011-03-03 22:05 ` Cyrill Gorcunov
2011-03-03 22:05 ` David Rientjes
2011-03-03 22:10 ` Cyrill Gorcunov
2011-03-04 7:08 ` Ingo Molnar
2011-03-04 12:38 ` Cyrill Gorcunov
2011-03-04 10:16 ` Tejun Heo
2011-03-04 14:19 ` [PATCH x86/mm] x86-64, NUMA: Clean up initmem_init() Tejun Heo
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=4D700B93.2080807@gmail.com \
--to=gorcunov@gmail.com \
--cc=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=shaohui.zheng@intel.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=yinghai@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.