[PATCH] mempool: NOMEMALLOC and NORETRY
authorNick Piggin <nickpiggin@yahoo.com.au>
Sun, 1 May 2005 15:58:36 +0000 (08:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:58:36 +0000 (08:58 -0700)
commitb84a35be0285229b0a8a5e2e04d79360c5b75562
tree3ff63fde8534eb615b408d047b461015781f6a5b
parent8e30f272a93ec9c1d5c305c5040dfaebc880499d
[PATCH] mempool: NOMEMALLOC and NORETRY

Mempools have 2 problems.

The first is that mempool_alloc can possibly get stuck in __alloc_pages
when they should opt to fail, and take an element from their reserved pool.

The second is that it will happily eat emergency PF_MEMALLOC reserves
instead of going to their reserved pools.

Fix the first by passing __GFP_NORETRY in the allocation calls in
mempool_alloc.  Fix the second by introducing a __GFP_MEMPOOL flag which
directs the page allocator not to allocate from the reserve pool.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/gfp.h
mm/mempool.c
mm/page_alloc.c