Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae026204 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

thp: make deferred_split_scan() work again



We need to iterate over split_queue, not local empty list to get
anything split from the shrinker.

Fixes: e3ae1953 ("thp: limit number of object to scan on deferred_split_scan()")
Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 12352d3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {