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 - 5:30 pm

On Wed, 25 Aug 2010, Ted Ts'o wrote:


We certainly hope that nobody will reimplement the same function without 
the __deprecated warning, especially for order < PAGE_ALLOC_COSTLY_ORDER 
where there's no looping at a higher level.  So perhaps the best 
alternative is to implement the same _nofail() functions but do a 
WARN_ON(get_order(size) > PAGE_ALLOC_COSTLY_ORDER) instead?

I think it's really sad that the caller can't know what the upper bounds 
of its memory requirement are ahead of time or at least be able to 
implement a memory freeing function when kmalloc() returns NULL.
--
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 ..., 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 ..., David Rientjes, (Wed Aug 25, 5:30 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)