diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 64e438898832..777af57fd8c8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -544,6 +544,16 @@ redo: | |||
544 | */ | 544 | */ |
545 | lru = LRU_UNEVICTABLE; | 545 | lru = LRU_UNEVICTABLE; |
546 | add_page_to_unevictable_list(page); | 546 | add_page_to_unevictable_list(page); |
547 | /* | ||
548 | * When racing with an mlock clearing (page is | ||
549 | * unlocked), make sure that if the other thread does | ||
550 | * not observe our setting of PG_lru and fails | ||
551 | * isolation, we see PG_mlocked cleared below and move | ||
552 | * the page back to the evictable list. | ||
553 | * | ||
554 | * The other side is TestClearPageMlocked(). | ||
555 | */ | ||
556 | smp_mb(); | ||
547 | } | 557 | } |
548 | 558 | ||
549 | /* | 559 | /* |
@@ -1088,7 +1098,7 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, | |||
1088 | int lumpy_reclaim = 0; | 1098 | int lumpy_reclaim = 0; |
1089 | 1099 | ||
1090 | while (unlikely(too_many_isolated(zone, file, sc))) { | 1100 | while (unlikely(too_many_isolated(zone, file, sc))) { |
1091 | congestion_wait(WRITE, HZ/10); | 1101 | congestion_wait(BLK_RW_ASYNC, HZ/10); |
1092 | 1102 | ||
1093 | /* We are about to die and free our memory. Return now. */ | 1103 | /* We are about to die and free our memory. Return now. */ |
1094 | if (fatal_signal_pending(current)) | 1104 | if (fatal_signal_pending(current)) |
@@ -1356,7 +1366,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
1356 | * IO, plus JVM can create lots of anon VM_EXEC pages, | 1366 | * IO, plus JVM can create lots of anon VM_EXEC pages, |
1357 | * so we ignore them here. | 1367 | * so we ignore them here. |
1358 | */ | 1368 | */ |
1359 | if ((vm_flags & VM_EXEC) && !PageAnon(page)) { | 1369 | if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) { |
1360 | list_add(&page->lru, &l_active); | 1370 | list_add(&page->lru, &l_active); |
1361 | continue; | 1371 | continue; |
1362 | } | 1372 | } |