]> git.karo-electronics.de Git - karo-tx-linux.git/commit
slab: do ClearSlabPfmemalloc() for all pages of slab
authorMel Gorman <mgorman@suse.de>
Thu, 13 Sep 2012 00:58:10 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 17 Sep 2012 10:22:17 +0000 (20:22 +1000)
commit33a07361b673d02914bc1d637a50cf487deafb1a
tree3cd2a581544656774fdb45a90f56d07f9e9d6559
parent5643015fcfc1909c14524b2b198b58ee8e9ea37e
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