linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* test9-pre6 and GFP_BUFFER allocations
@ 2000-09-23 15:28 Roger Larsson
  2000-09-23 15:49 ` Ingo Molnar
  2000-09-23 16:02 ` Ingo Molnar
  0 siblings, 2 replies; 3+ messages in thread
From: Roger Larsson @ 2000-09-23 15:28 UTC (permalink / raw)
  To: linux-kernel, linux-mm, Rik van Riel

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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-09-23 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-23 15:28 test9-pre6 and GFP_BUFFER allocations Roger Larsson
2000-09-23 15:49 ` Ingo Molnar
2000-09-23 16:02 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox