Re: [PATCH: 010/017](RFC) Memory hotplug for new nodes v.3. (allocate wait table)

From: Yasunori Goto <y-goto_at_jp.fujitsu.com>
Date: 2006-03-10 18:20:37
> On Thursday 09 March 2006 13:00, Andrew Morton wrote:
> > Yasunori Goto <y-goto@jp.fujitsu.com> wrote:
> > >
> > >  +		/* we can use kmalloc() in run time */
> > >  +		do {
> > >  +			table_size = zone->wait_table_size
> > >  +					* sizeof(wait_queue_head_t);
> > >  +			zone->wait_table = kmalloc(table_size, GFP_ATOMIC);
> > 
> > Again, GFP_KERNEL would be better is possible.

Oops.
This was inside of spin_lock in old my patch.
But, it is moved out from spin_lock as a result of refactoring 
and I didn't notice that.
Yes. GFP_KERNEL is better.

> > 
> > Won't this place the node's wait_table into a different node's memory?
> 
> Yes, kmalloc_node would be better.

Kmalloc_node() will not work well at here, 
because this patch is to initialize structures for new node -itself-.
It will work after that completion of initalize pgdat and wait_table.

To use new node's memory at here, other consideration will be necessary. 
But, I would like to use kmalloc() to simplify my patch at this time.

Thanks.

-- 
Yasunori Goto 


-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 10 18:21:15 2006

This archive was generated by hypermail 2.1.8 : 2006-03-10 18:21:24 EST