mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 21:30:53 +07:00
vmscan: move ClearPageActive from move_active_pages() to shrink_active_list()
The move_active_pages_to_lru() function is called under irq disabled and ClearPageActive() doesn't need irq disabling. Then, this patch move it into shrink_active_list(). Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
de2e7567c7
commit
5205e56eea
@ -1278,10 +1278,6 @@ static void move_active_pages_to_lru(struct zone *zone,
|
||||
VM_BUG_ON(PageLRU(page));
|
||||
SetPageLRU(page);
|
||||
|
||||
VM_BUG_ON(!PageActive(page));
|
||||
if (!is_active_lru(lru))
|
||||
ClearPageActive(page); /* we are de-activating */
|
||||
|
||||
list_move(&page->lru, &zone->lru[lru].list);
|
||||
mem_cgroup_add_lru_list(page, lru);
|
||||
pgmoved++;
|
||||
@ -1363,6 +1359,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
|
||||
}
|
||||
}
|
||||
|
||||
ClearPageActive(page); /* we are de-activating */
|
||||
list_add(&page->lru, &l_inactive);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user