From: Dave Hansen <haveblue@us.ibm.com>
To: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andrew Morton <akpm@osdl.org>, "Luck, Tony" <tony.luck@intel.com>,
Andi Kleen <ak@suse.de>,
"Tolentino, Matthew E" <matthew.e.tolentino@intel.com>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-ia64@vger.kernel.org,
Linux Kernel ML <linux-kernel@vger.kernel.org>,
x86-64 Discuss <discuss@x86-64.org>
Subject: Re: [PATCH: 001/012] Memory hotplug for new nodes v.2. (pgdat
Date: Fri, 17 Feb 2006 15:39:52 +0000 [thread overview]
Message-ID: <1140190792.21383.64.camel@localhost.localdomain> (raw)
In-Reply-To: <20060217210749.406A.Y-GOTO@jp.fujitsu.com>
On Fri, 2006-02-17 at 22:28 +0900, Yasunori Goto wrote:
>
> +extern int kswapd(void *);
In a header, please.
> +int new_pgdat_init(int nid, unsigned long start_pfn, unsigned long
> nr_pages)
> +{
> + unsigned long zones_size[MAX_NR_ZONES] = {0};
> + unsigned long zholes_size[MAX_NR_ZONES] = {0};
> + unsigned long pernode_size = arch_pernode_size(nid);
> + pg_data_t *pgdat;
> + struct task_struct *p;
> +
> + pgdat = kmalloc(pernode_size, GFP_KERNEL);
> + if (!pgdat){
> + printk(KERN_ERR "%s node_data allocation failed\n",
> + __FUNCTION__);
> + return -ENODEV;
> + }
> +
> + memset(pgdat, 0, pernode_size);
kzalloc() instead of explicit kmalloc/memset, please.
I'm a teensy bit concerned that this doesn't share enough code with the
boot-time initialization. For instance, the kthread_create() seems to
be a pretty darn generic piece. I'd feel a lot more at ease if this
patch did something with _existing_ code instead of just adding.
Also, can the regular boot code use your set_node_data_array() function?
Can you take out the "_array" part of the name?
-- Dave
WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <haveblue@us.ibm.com>
To: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andrew Morton <akpm@osdl.org>, "Luck, Tony" <tony.luck@intel.com>,
Andi Kleen <ak@suse.de>,
"Tolentino, Matthew E" <matthew.e.tolentino@intel.com>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-ia64@vger.kernel.org,
Linux Kernel ML <linux-kernel@vger.kernel.org>,
x86-64 Discuss <discuss@x86-64.org>
Subject: Re: [PATCH: 001/012] Memory hotplug for new nodes v.2. (pgdat allocation)
Date: Fri, 17 Feb 2006 07:39:52 -0800 [thread overview]
Message-ID: <1140190792.21383.64.camel@localhost.localdomain> (raw)
In-Reply-To: <20060217210749.406A.Y-GOTO@jp.fujitsu.com>
On Fri, 2006-02-17 at 22:28 +0900, Yasunori Goto wrote:
>
> +extern int kswapd(void *);
In a header, please.
> +int new_pgdat_init(int nid, unsigned long start_pfn, unsigned long
> nr_pages)
> +{
> + unsigned long zones_size[MAX_NR_ZONES] = {0};
> + unsigned long zholes_size[MAX_NR_ZONES] = {0};
> + unsigned long pernode_size = arch_pernode_size(nid);
> + pg_data_t *pgdat;
> + struct task_struct *p;
> +
> + pgdat = kmalloc(pernode_size, GFP_KERNEL);
> + if (!pgdat){
> + printk(KERN_ERR "%s node_data allocation failed\n",
> + __FUNCTION__);
> + return -ENODEV;
> + }
> +
> + memset(pgdat, 0, pernode_size);
kzalloc() instead of explicit kmalloc/memset, please.
I'm a teensy bit concerned that this doesn't share enough code with the
boot-time initialization. For instance, the kthread_create() seems to
be a pretty darn generic piece. I'd feel a lot more at ease if this
patch did something with _existing_ code instead of just adding.
Also, can the regular boot code use your set_node_data_array() function?
Can you take out the "_array" part of the name?
-- Dave
next prev parent reply other threads:[~2006-02-17 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-17 13:28 [PATCH: 001/012] Memory hotplug for new nodes v.2. (pgdat allocation) Yasunori Goto
2006-02-17 13:28 ` Yasunori Goto
2006-02-17 15:39 ` Dave Hansen [this message]
2006-02-17 15:39 ` Dave Hansen
2006-02-17 16:16 ` Andi Kleen
2006-02-17 16:16 ` Andi Kleen
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=1140190792.21383.64.camel@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=discuss@x86-64.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.e.tolentino@intel.com \
--cc=tony.luck@intel.com \
--cc=y-goto@jp.fujitsu.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 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.