Skip to content

Commit

Permalink
thp: make deferred_split_scan() work again
Browse files Browse the repository at this point in the history
We need to iterate over split_queue, not local empty list to get
anything split from the shrinker.

Fixes: e3ae195 ("thp: limit number of object to scan on deferred_split_scan()")
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Feb 6, 2016
1 parent 12352d3 commit ae02620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ae02620

Please sign in to comment.