From: Dave Hansen <haveblue@us.ibm.com>
To: kmannth@us.ibm.com
Cc: lhms-devel <lhms-devel@lists.sourceforge.net>,
linux-mm <linux-mm@kvack.org>, konrad <darnok@us.ibm.com>,
Prarit Bhargava--redhat <prarit@redhat.com>,
ak@suse.de
Subject: Re: [RFC] patch [1/1] x86_64 numa aware sparsemem add_memory functinality
Date: Fri, 23 Jun 2006 10:13:53 -0700 [thread overview]
Message-ID: <1151082833.10877.13.camel@localhost.localdomain> (raw)
In-Reply-To: <1150868581.8518.28.camel@keithlap>
> int add_memory(u64 start, u64 size)
> {
> - struct pglist_data *pgdat = NODE_DATA(0);
> + struct pglist_data *pgdat = NODE_DATA(new_memory_to_node(start,start+size));
> struct zone *zone = pgdat->node_zones + MAX_NR_ZONES-2;
How about just having new_memory_to_node() take the range and return the
pgdat? Should make that line a bit shorter.
> -#ifndef RESERVE_HOTADD
> +#if !defined(RESERVE_HOTADD) && !defined(CONFIG_MEMORY_HOTPLUG)
> #define hotadd_percent 0 /* Ignore all settings */
> #endif
> static u8 pxm2node[256] = { [0 ... 255] = 0xff };
> @@ -219,9 +219,9 @@
> allocated += mem;
> return 1;
> }
> -
> +#endif
> /*
Could this use another Kconfig option which gives a name to this
condition?
> +#ifdef RESERVE_HOTADD
> if (!hotadd_enough_memory(&nodes_add[node])) {
> printk(KERN_ERR "SRAT: Hotplug area too large\n");
> return -1;
> }
> -
> +#endif
This #ifdef is probably better handled by an #ifdef in the header for
hotadd_enough_memory().
-- Dave
--
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:[~2006-06-23 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-21 5:43 keith mannthey
2006-06-21 6:06 ` [Lhms-devel] " KAMEZAWA Hiroyuki
2006-06-21 6:25 ` keith mannthey
2006-06-21 6:37 ` KAMEZAWA Hiroyuki
2006-06-21 6:31 ` Yasunori Goto
2006-06-23 17:13 ` Dave Hansen [this message]
2006-06-23 17:57 ` keith mannthey
2006-06-24 2:05 ` [RFC] Patch [1/4] x86_64 sparsmem add- save nodes_add data for later keith mannthey
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=1151082833.10877.13.camel@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=ak@suse.de \
--cc=darnok@us.ibm.com \
--cc=kmannth@us.ibm.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=prarit@redhat.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