diff options
Diffstat (limited to 'mm/vmscan.c')
| -rw-r--r-- | mm/vmscan.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 1219ceb8a9b2..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 | } |
| @@ -1709,10 +1719,10 @@ static void shrink_zones(int priority, struct zonelist *zonelist, | |||
| 1709 | * | 1719 | * |
| 1710 | * If the caller is !__GFP_FS then the probability of a failure is reasonably | 1720 | * If the caller is !__GFP_FS then the probability of a failure is reasonably |
| 1711 | * high - the zone may be full of dirty or under-writeback pages, which this | 1721 | * high - the zone may be full of dirty or under-writeback pages, which this |
| 1712 | * caller can't do much about. We kick pdflush and take explicit naps in the | 1722 | * caller can't do much about. We kick the writeback threads and take explicit |
| 1713 | * hope that some of these pages can be written. But if the allocating task | 1723 | * naps in the hope that some of these pages can be written. But if the |
| 1714 | * holds filesystem locks which prevent writeout this might not work, and the | 1724 | * allocating task holds filesystem locks which prevent writeout this might not |
| 1715 | * allocation attempt will fail. | 1725 | * work, and the allocation attempt will fail. |
| 1716 | * | 1726 | * |
| 1717 | * returns: 0, if no pages reclaimed | 1727 | * returns: 0, if no pages reclaimed |
| 1718 | * else, the number of pages reclaimed | 1728 | * else, the number of pages reclaimed |
