[patch] vmfixes-2.4.0-test9-B2

From: Ingo Molnar (mingo@elte.hu)
Date: Sun Sep 24 2000 - 14:34:43 EST


the attached vmfixes-B2 patch adds the following fixes/cleanups:

vmscan.c:

 - check for __GFP_WAIT not __GFP_IO when yielding the CPU. This fixes
   GFP_BUFFER deadlocks. In fact since no caller to do_try_to_free_pages()
   can expect that function to not block, we dont test for __GFP_WAIT
   either. [GFP_KSWAPD is the only caller without __GFP_WAIT set.]

 - do shrink_[d|i]cache_memory() even if !__GFP_IO. This improves balance.

 - push the __GFP_IO test into shm_swap().

 - after shm_swap() do not test for !count but for <= 0, because count
   could be negative if in the future the shrink_ functions return bigger
   than 1, and we could then get into an infinite loop. Same after
   swap_out() and refill_inactive_scan(). No performance penalty, test
   for zero is exchanged with test for sign.

 - kmem_cache_reap() is done within refill_inactive(), so it's
   unnecessery to call it at the beginning of do_try_to_free_pages().
   Moved to the else branch. (i saw kmem_cache_reap() show up in profiles)

 - (small codestyle cleanup.)

page_alloc.c:

 - in __alloc_pages(), the infinite allocation loop yields the CPU if
   necessery. This prevents a potential lockup on UP, and even on SMP it
   can prevent livelocks. (i saw this happen.)

mm.h:

 - made the GFP_ flag definitions easier to parse for humans :-)

 - remove shrink_mmap() prototype, it doesnt exist anymore.

shm.c:

 - the trivial test for __GFP_IO.

swap_state.c, filemap.c:

 - (shrink_mmap doesnt exist anymore, it's refill_inactive.)

(The patch applies and compiles cleanly, and is tested under various VM
loads i use.)

        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