aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2011-10-24 16:33:42 -0700
committerColin Cross <ccross@android.com>2011-10-26 21:49:46 -0700
commit2f53cb72c1574d3880d9e88e254b756565fe2f6d (patch)
tree1defa097001d4eab5cd7cefe4e9e62c7b14c52ca /lib
parentf41047365480510bfb12260d9f4fc7a8b95a734e (diff)
downloadkernel_samsung_tuna-2f53cb72c1574d3880d9e88e254b756565fe2f6d.zip
kernel_samsung_tuna-2f53cb72c1574d3880d9e88e254b756565fe2f6d.tar.gz
kernel_samsung_tuna-2f53cb72c1574d3880d9e88e254b756565fe2f6d.tar.bz2
mm: avoid livelock on !__GFP_FS allocations
Under the following conditions, __alloc_pages_slowpath can loop forever: gfp_mask & __GFP_WAIT is true gfp_mask & __GFP_FS is false reclaim and compaction make no progress order <= PAGE_ALLOC_COSTLY_ORDER The gfp conditions are normally invalid, because !__GFP_FS disables most of the reclaim methods that __GFP_WAIT would wait for. However, these conditions happen very often during suspend and resume, when pm_restrict_gfp_mask() effectively converts all GFP_KERNEL allocations into __GFP_WAIT. The oom killer is not run because gfp_mask & __GFP_FS is false, but should_alloc_retry will always return true when order is less than PAGE_ALLOC_COSTLY_ORDER. __alloc_pages_slowpath will loop forever between the rebalance label and should_alloc_retry, unless another thread happens to release enough pages to satisfy the allocation. Add a check to detect when PM has disabled __GFP_FS, and do not retry if reclaim is not making any progress. [taken from patch on lkml by Mel Gorman, commit message by ccross] Change-Id: I864a24e9d9fd98bd0e3d6e9c1e85b6c1b766850e Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions