]> git.karo-electronics.de Git - karo-tx-linux.git/commit
slab: do ClearSlabPfmemalloc() for all pages of slab
authorMel Gorman <mgorman@suse.de>
Fri, 7 Sep 2012 00:17:44 +0000 (10:17 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:01 +0000 (15:36 +1000)
commitfdad9a64954270e1e2915122e7fd916038f131da
treeded7711d8d8be140f2cdb89cc0aa33e272f917bc
parent0478e38a61bbdf9f4520eec03bf9330b721871fd
slab: do ClearSlabPfmemalloc() for all pages of slab

Right now, we call ClearSlabPfmemalloc() for first page of slab when we
clear SlabPfmemalloc flag.  This is fine for most swap-over-network use
cases as it is expected that order-0 pages are in use.  Unfortunately it
is possible that that __ac_put_obj() checks SlabPfmemalloc on a tail page
and while this is harmless, it is sloppy.  This patch ensures that the
head page is always used.

This problem was originally identified by Joonsoo Kim.

[js1304@gmail.com: Original implementation and problem identification]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: David Miller <davem@davemloft.net>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slab.c