thp: make deferred_split_scan() work again
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 5 Feb 2016 23:36:53 +0000 (15:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Feb 2016 02:10:40 +0000 (18:10 -0800)
We need to iterate over split_queue, not local empty list to get
anything split from the shrinker.

Fixes: e3ae19535c66 ("thp: limit number of object to scan on deferred_split_scan()")
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c

index 36c070167b7109f0639ff4188b6b67772e832591..08fc0ba2207e555a9c734524cd607dc8f53e644a 100644 (file)
@@ -3482,7 +3482,7 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
 
        spin_lock_irqsave(&pgdata->split_queue_lock, flags);
        /* Take pin on all head pages to avoid freeing them under us */
-       list_for_each_safe(pos, next, &list) {
+       list_for_each_safe(pos, next, &pgdata->split_queue) {
                page = list_entry((void *)pos, struct page, mapping);
                page = compound_head(page);
                if (get_page_unless_zero(page)) {