aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-12-16 06:20:00 -0500
committerAndi Kleen <ak@linux.intel.com>2009-12-16 06:20:00 -0500
commit0474a60ec704324577782b1057d05b574388d552 (patch)
tree75c574fe9a64332aeed6c636bf6bd9e6485d1603 /mm
parentfe194d3e100dea323d7b2de96d3b44d0c067ba7a (diff)
HWPOISON: Use new shake_page in memory_failure
shake_page handles more types of page caches than the much simpler lru_add_drain_all: - slab (quite inefficiently for now) - any other caches with a shrinker callback - per cpu page allocator pages - per CPU LRU Use this call to try to turn pages into free or LRU pages. Then handle the case of the page becoming free after drain everything. Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory-failure.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 2d5f1223bf4d..ded1d387b4c5 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -936,8 +936,15 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
936 * walked by the page reclaim code, however that's not a big loss. 936 * walked by the page reclaim code, however that's not a big loss.
937 */ 937 */
938 if (!PageLRU(p)) 938 if (!PageLRU(p))
939 lru_add_drain_all(); 939 shake_page(p);
940 if (!PageLRU(p)) { 940 if (!PageLRU(p)) {
941 /*
942 * shake_page could have turned it free.
943 */
944 if (is_free_buddy_page(p)) {
945 action_result(pfn, "free buddy, 2nd try", DELAYED);
946 return 0;
947 }
941 action_result(pfn, "non LRU", IGNORED); 948 action_result(pfn, "non LRU", IGNORED);
942 put_page(p); 949 put_page(p);
943 return -EBUSY; 950 return -EBUSY;