Re: [PATCH] net: use __GFP_NORETRY for high order allocations

From: David Rientjes
Date: Thu Feb 06 2014 - 16:39:13 EST


On Thu, 6 Feb 2014, Joe Perches wrote:

> > If they absolutely require local memory to
> > currnet's cpu node then that would make sense,
>
> I presumed THISNODE would be used only with NORETRY
>

Unfortunately, that would avoid attempting to defragment or reclaim
remotely for the order-3 allocation and only allocate remotely for
order-0.

So we have to make a decision here what is more important: allocating
high-order memory or local memory to current's cpu at this given time?

The policy of transparent hugepages, for example, is always to allocate
order-9 memory remotely instead of falling back to allocating a smallpage
locally.

The original code never cared about local vs remote memory, so I don't
think there's any restriction to allocating remotely. I also don't know
many allocators that do __GFP_THISNODE and care about local memory to
current's cpu at this point in time, usually users of that flag are
allocating memory that must be local to a specific node (for things like
kmem_cache_alloc_node()).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/