From: Magnus Damm <magnus.damm@gmail.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Magnus Damm <magnus@valinux.co.jp>, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] i386: srat and numaq cleanup
Date: Thu, 6 Oct 2005 19:29:33 +0900 [thread overview]
Message-ID: <aec7e5c30510060329kb59edagb619f00b8a58bf3e@mail.gmail.com> (raw)
In-Reply-To: <1128530262.26009.27.camel@localhost>
On 10/6/05, Dave Hansen <haveblue@us.ibm.com> wrote:
> On Wed, 2005-10-05 at 17:39 +0900, Magnus Damm wrote:
> > Cleanup the i386 NUMA code by creating inline no-op functions for
> > get_memcfg_numaq/srat() and get_zholes_size_numaq/srat().
>
> > arch/i386/kernel/srat.c | 10 ++++++++--
> > include/asm-i386/mmzone.h | 26 +++++++++++++++++---------
> > include/asm-i386/numaq.h | 10 ++++++++--
> > include/asm-i386/srat.h | 15 ++++++++++-----
> > 4 files changed, 43 insertions(+), 18 deletions(-)
>
> I'm highly suspicious of any "cleanup" that adds more code than it
> deletes. What does this clean up?
Hehe, I realized that it added code when I generated the diffstat, but
I believe that the code gets cleaner.
The patch removes #ifdefs from get_memcfg_numa() and introduces an
inline get_zholes_size(). The #ifdefs are moved down one level to the
files srat.h and numaq.h and empty inline functions are added. These
empty inline function are probably the reason for the added lines.
> This patch is a little bit confused. It makes the
> get_zholes_size_srat() always safe to call at runtime. However, it
> still creates a compile-time stub version of it as well.
Without this patch get_zholes_size() is defined in either srat.c or
numaq.h. With this patch get_zholes_size() is turned into an inline
function like get_memcfg_numa(), and this function calls all
machine-specific implementations.
This new behavior requires that the machine-specific code keeps track
if it has been initialized or not, and only lets get_zholes_size_xxx()
return non-NULL if initialized.
> In addition, you already have the srat.c-local zholes_size_init, but you
> still add the has_srat variable. Seems a bit superfluous.
Nah, zholes_size_init is used to call get_zholes_init() just once.
has_srat is used to determine if get_memcfg_numa() did succeed.
> Calling get_zholes_size_numaq() at runtime is unnecessary. The NUMA-Q
> is not supported with the ARCH_GENERIC code.
Yes. But does this patch do anything that makes that harder?
Another side effect of the patch is that get_zholes_size() always gets
defined, regardless of if numaq or srat is enabled or not. That is
useful for the NUMA emulation code.
Thanks,
/ magnus
--
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:[~2005-10-06 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 8:39 Magnus Damm
2005-10-05 16:37 ` Dave Hansen
2005-10-06 10:29 ` Magnus Damm [this message]
2005-10-06 14:56 ` Dave Hansen
2005-10-07 7:54 ` Magnus Damm
2005-10-07 13:28 ` Dave Hansen
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=aec7e5c30510060329kb59edagb619f00b8a58bf3e@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=haveblue@us.ibm.com \
--cc=linux-mm@kvack.org \
--cc=magnus@valinux.co.jp \
/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