__GFP_IO && shrink_[d|i]cache_memory()?

From: Ingo Molnar (mingo@elte.hu)
Date: Sun Sep 24 2000 - 05:11:47 EST


i've seen a couple of GFP_BUFFER allocation deadlocks in an atypical
system which had lots of RAM allocated to inodes. The reason for the
deadlock is that the shrink_*() functions cannot be called if __GFP_IO is
not set. Nothing else can be freed at that point, so the try_again: loop
in page_alloc() gets into an infinite loop.

as an immediate solution the previous __GFP_WAIT suggestion solves the
deadlock - because the GFP_BUFFER allocator yields the CPU and kswapd can
run and do the dcache/icache shrinking. [i cannot reproduce any deadlocks
after doing this change.]

as a longer term solution, i'm wondering how hard it would be to propagate
gfp_mask into the shrink_*() functions, and prevent recursion similarly to
the swap-out logic? This way even GFP_BUFFER allocators could touch/free
the dcache/icache.

        Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:12 EST