[lkml]   [2011]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: avoid livelock on !__GFP_FS allocations
On Tue, 25 Oct 2011, Colin Cross wrote:

> > gfp_allowed_mask is initialized to GFP_BOOT_MASK to start so that __GFP_FS
> > is never allowed before the slab allocator is completely initialized, so
> > you've now implicitly made all early boot allocations to be __GFP_NORETRY
> > even though they may not pass it.
> Only before interrupts are enabled, and then isn't it vulnerable to
> the same livelock? Interrupts are off, single cpu, kswapd can't run.
> If an allocation ever failed, which seems unlikely, why would retrying
> help?

If you want to claim gfp_allowed_mask as a pm-only entity, then I see no
problem with this approach. However, if gfp_allowed_mask would be allowed
to temporarily change after init for another purpose then it would make
sense to retry because another allocation with __GFP_FS on another cpu or
kswapd could start making progress could allow for future memory freeing.

The suggestion to add a hook directly into a pm-interface was so that we
could isolate it only to suspend and, to me, is the most maintainable

 \ /
  Last update: 2011-10-26 09:13    [W:0.123 / U:0.284 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site