Thread (46 messages) 46 messages, 8 authors, 2007-08-26

Re: [RFC 7/7] Switch of PF_MEMALLOC during writeout

From: Christoph Lameter <hidden>
Date: 2007-08-20 23:19:55
Also in: lkml

On Mon, 21 Aug 2007, Andi Kleen wrote:
Christoph Lameter [off-list ref] writes:
quoted
Switch off PF_MEMALLOC during both direct and kswapd reclaim.

This works because we are not holding any locks at that point because
reclaim is essentially complete. The write occurs when the memory on
the zones is at the high water mark so it is unlikely that writeout
will get into trouble. If so then reclaim can be called recursively to
reclaim more pages.
What would stop multiple recursions in extreme low memory cases? Seems 
risky to me and risking stack overflow.  Perhaps define another flag to catch that?
Right. I am not sure exactly how to handle that. There is also the issue 
of the writes being deferred. I thought maybe of using pdflush to writeout 
the pages? Maybe increase priority of the pdflush so that it runs 
immediately when notified. Shrink_page_list would gather the dirty pages 
in pvecs and then forward to a pdflush. That may make the whole thing much 
cleaner.

Opinions?


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help