lkml.org 
[lkml]   [2010]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip:x86/urgent] x86-32: Restore irq stacks NUMA-aware allocations
From
Date
Le samedi 30 octobre 2010 à 00:28 +0400, Cyrill Gorcunov a écrit :
> On Fri, Oct 29, 2010 at 08:32:26PM +0200, Peter Zijlstra wrote:
> > On Fri, 2010-10-29 at 06:43 +0000, tip-bot for Eric Dumazet wrote:
> > > + irqctx = page_address(alloc_pages_node(cpu_to_node(cpu),
> > > + THREAD_FLAGS,
> > > + THREAD_ORDER));
> >
> > Shouldn't we be checking for a NULL return from alloc_pages_node()
> > before calling page_address() on it?
> > --
>
> Something like below I guess, but probably we could try to allocate
> on appropriate NUMA node first and if it fails -- via old alloc_pages
> and if it fail in turn -- then we panic.

Maybe my commit message was not clear :

There is no need to test return from alloc_pages_node() and do the
fallback. It already done properly.

If NULL is returned, then there is no memory at all on the machine.

I tested my patch on my machine with node 1 with HighMem only, and
alloc_pages_node(1, flags, order) gave me a page from node 0.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-10-29 23:01    [W:0.070 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site