Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc and kzalloc

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Wednesday, August 25, 2010 - 1:43 pm

On Wed, 25 Aug 2010, Peter Zijlstra wrote:


Right, the only cgroup that does is cpusets because it binds the memory 
allocations to a set of nodes.


__GFP_HARDWALL doesn't mean that the allocation won't be constrained, this 
is a common misconception.  __GFP_HARDWALL only prevents us from looking 
at our cpuset.mem_exclusive flag and checking our nearest common ancestor 
cpuset if we can block.

The cpusets case is actually the easiest to fix: use GFP_ATOMIC.  
GFP_ATOMIC allocations aren't bound by any cpuset and, in the general 
case, can allocate below the min watermark because of 
ALLOC_HARD | ALLOC_HARDER in the page allocator which creates the notion 
of "memory reserves" available to these tasks.  Then, success really 
depends on the setting of the watermarks instead.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/5] mm: add nofail variant of kmem_cache_zalloc, David Rientjes, (Tue Aug 24, 3:50 am)
[patch 3/5] fs: add nofail variant of alloc_buffer_head, David Rientjes, (Tue Aug 24, 3:50 am)
[patch 4/5] btrfs: add nofail variant of set_extent_dirty, David Rientjes, (Tue Aug 24, 3:50 am)
[patch 5/5] ntfs: remove dependency on __GFP_NOFAIL, David Rientjes, (Tue Aug 24, 3:50 am)
Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc ..., David Rientjes, (Wed Aug 25, 1:43 pm)
Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc ..., Christoph Lameter, (Wed Aug 25, 2:11 pm)
Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc ..., Christoph Lameter, (Wed Aug 25, 2:35 pm)
Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc ..., Christoph Lameter, (Wed Aug 25, 6:30 pm)
Re: [patch 1/5] mm: add nofail variants of kmalloc kcalloc ..., Christoph Lameter, (Thu Aug 26, 7:16 am)
[patch v2 5/5] ntfs: remove dependency on __GFP_NOFAIL, David Rientjes, (Wed Sep 1, 6:03 pm)
Re: [patch v2 5/5] ntfs: remove dependency on __GFP_NOFAIL, Anton Altaparmakov, (Thu Sep 2, 2:08 am)