test9-pre6 and GFP_BUFFER allocations
Hi,
What will happen in this scenario:
a process
* grabs a fs semaphore
* needs some buffers to do IO, calls __alloc_pages(GFP_BUFFER) Suppose the system is MIN on free mem, has no inactive_clean pages. We will end up around line 446 in pages_alloc.c and issue a try_to_free_pages(...). Then goto try_again.
* In our case this is unlikely to work - not allowed to do IO.
* Will we sleep? Probably not, not even in refill_inactive (no GFP_IO) BTW, Why can't we schedule if GFP_IO is not set???
* Will we free any page, to get above MIN - only if there are enough clean pages in active list.
* Won't we end up in an infinite loop?
Suppose it does sleep. Will kswapd then be able to free any page assuming we are holding a critical fs semaphore...
Or am I missing something, again?
One approach could be: only goto try_again if GFP_IO is set. And alloc one page from the critical memory pool. I will try this.
/RogerL
--
Home page:
http://www.norran.net/nra02596/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 1 line · Roger Larsson
* Won't we end up in an infinite loop?
FYI, i still see a rare deadlock, even under test9-pre6.
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Quoted 3 lines · Roger Larsson
One approach could be: only goto
try_againifGFP_IOis set. And alloc one page from the critical memory pool. I will try this.
i'll try this too.
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/