diff options
Diffstat (limited to 'mm/swap.c')
| -rw-r--r-- | mm/swap.c | 20 |
1 files changed, 6 insertions, 14 deletions
| @@ -299,7 +299,6 @@ void lru_add_drain(void) | |||
| 299 | put_cpu(); | 299 | put_cpu(); |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | #if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU) | ||
| 303 | static void lru_add_drain_per_cpu(struct work_struct *dummy) | 302 | static void lru_add_drain_per_cpu(struct work_struct *dummy) |
| 304 | { | 303 | { |
| 305 | lru_add_drain(); | 304 | lru_add_drain(); |
| @@ -313,18 +312,6 @@ int lru_add_drain_all(void) | |||
| 313 | return schedule_on_each_cpu(lru_add_drain_per_cpu); | 312 | return schedule_on_each_cpu(lru_add_drain_per_cpu); |
| 314 | } | 313 | } |
| 315 | 314 | ||
| 316 | #else | ||
| 317 | |||
| 318 | /* | ||
| 319 | * Returns 0 for success | ||
| 320 | */ | ||
| 321 | int lru_add_drain_all(void) | ||
| 322 | { | ||
| 323 | lru_add_drain(); | ||
| 324 | return 0; | ||
| 325 | } | ||
| 326 | #endif | ||
| 327 | |||
| 328 | /* | 315 | /* |
| 329 | * Batched page_cache_release(). Decrement the reference count on all the | 316 | * Batched page_cache_release(). Decrement the reference count on all the |
| 330 | * passed pages. If it fell to zero then remove the page from the LRU and | 317 | * passed pages. If it fell to zero then remove the page from the LRU and |
| @@ -445,6 +432,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
| 445 | for (i = 0; i < pagevec_count(pvec); i++) { | 432 | for (i = 0; i < pagevec_count(pvec); i++) { |
| 446 | struct page *page = pvec->pages[i]; | 433 | struct page *page = pvec->pages[i]; |
| 447 | struct zone *pagezone = page_zone(page); | 434 | struct zone *pagezone = page_zone(page); |
| 435 | int file; | ||
| 448 | 436 | ||
| 449 | if (pagezone != zone) { | 437 | if (pagezone != zone) { |
| 450 | if (zone) | 438 | if (zone) |
| @@ -456,8 +444,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
| 456 | VM_BUG_ON(PageUnevictable(page)); | 444 | VM_BUG_ON(PageUnevictable(page)); |
| 457 | VM_BUG_ON(PageLRU(page)); | 445 | VM_BUG_ON(PageLRU(page)); |
| 458 | SetPageLRU(page); | 446 | SetPageLRU(page); |
| 459 | if (is_active_lru(lru)) | 447 | file = is_file_lru(lru); |
| 448 | zone->recent_scanned[file]++; | ||
| 449 | if (is_active_lru(lru)) { | ||
| 460 | SetPageActive(page); | 450 | SetPageActive(page); |
| 451 | zone->recent_rotated[file]++; | ||
| 452 | } | ||
| 461 | add_page_to_lru_list(zone, page, lru); | 453 | add_page_to_lru_list(zone, page, lru); |
| 462 | } | 454 | } |
| 463 | if (zone) | 455 | if (zone) |
