Re: Propagating GFP_NOFS inside __vmalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Nov 2010, Ricardo M. Correia wrote:

> > __GFP_REPEAT will retry the allocation indefinitely until the needed 
> > amount of memory is reclaimed without considering the order of the 
> > allocation; all orders of interest in your case are order-0, so it will 
> > loop indefinitely until a single page is reclaimed which won't happen with 
> > GFP_NOFS.  Thus, passing the flag is the equivalent of asking the 
> > allocator to loop forever until memory is available rather than failing 
> > and returning to your error handling.
> 
> When you say loop forever, you don't mean in a busy loop, right?
> Assuming we sleep in this loop (which AFAICS it does), then it's OK for
> us because memory will be freed asynchronously.
> 

Yes, __GFP_REPEAT will only be effected if it's blockable, so the 
allocator will reschedule during the loop but not return until the 
allocation suceeds in this case since it's GFP_NOFS which significantly 
impacts the ability to reclaim memory.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]