]> git.baikalelectronics.ru Git - kernel.git/commit
mm/swap.c: clear PageActive before adding pages onto unevictable list
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Wed, 31 Jul 2013 20:53:37 +0000 (13:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Jul 2013 21:41:03 +0000 (14:41 -0700)
commit46e91fce302cb4885a7fc77c6f38e9e04b1b4a71
tree8942f9f69822e234bb0c2da6e0ccc0756ed2d27b
parent9c64eebb4f57a934507a7d3605c29e495afd2a6a
mm/swap.c: clear PageActive before adding pages onto unevictable list

As a result of commit e0036589ea82 ("mm: pagevec: defer deciding which
LRU to add a page to until pagevec drain time"), pages on unevictable
lists can have both of PageActive and PageUnevictable set.  This is not
only confusing, but also corrupts page migration and
shrink_[in]active_list.

This patch fixes the problem by adding ClearPageActive before adding
pages into unevictable list.  It also cleans up VM_BUG_ONs.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swap.c