From 7a608572a282a74978e10fd6cd63090aebe29f5c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 17 Jan 2011 14:42:19 -0800 Subject: Revert "mm: batch activate_page() to reduce lock contention" This reverts commit 744ed1442757767ffede5008bb13e0805085902e. Chris Mason ended up chasing down some page allocation errors and pages stuck waiting on the IO scheduler, and was able to narrow it down to two commits: commit 744ed1442757 ("mm: batch activate_page() to reduce lock contention") and d8505dee1a87 ("mm: simplify code of swap.c"). This reverts the first of them. Reported-and-debugged-by: Chris Mason Cc: Mel Gorman Cc: Andrew Morton Cc: Jens Axboe Cc: linux-mm Cc: KAMEZAWA Hiroyuki Cc: Andrea Arcangeli Cc: Shaohua Li Signed-off-by: Linus Torvalds --- mm/vmscan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mm/vmscan.c') diff --git a/mm/vmscan.c b/mm/vmscan.c index 99999a9b2b0b..47a50962ce81 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1271,16 +1271,14 @@ putback_lru_pages(struct zone *zone, struct scan_control *sc, spin_lock_irq(&zone->lru_lock); continue; } + SetPageLRU(page); lru = page_lru(page); + add_page_to_lru_list(zone, page, lru); if (is_active_lru(lru)) { int file = is_file_lru(lru); int numpages = hpage_nr_pages(page); reclaim_stat->recent_rotated[file] += numpages; - if (putback_active_lru_page(zone, page)) - continue; } - SetPageLRU(page); - add_page_to_lru_list(zone, page, lru); if (!pagevec_add(&pvec, page)) { spin_unlock_irq(&zone->lru_lock); __pagevec_release(&pvec); -- cgit v1.2.3