Revert "FROMLIST: mm: replace migrate_prep with lru_add_drain_all"
This reverts commit 134ac2d4dc
.
Bug: 180018981
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I579c72398447f770c235e4fefd246f1dbbd250d0
This commit is contained in:

committed by
Suren Baghdasaryan

parent
7ed55d7025
commit
d3c1bf42af
24
mm/migrate.c
24
mm/migrate.c
@@ -57,6 +57,28 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
/*
|
||||
* migrate_prep() needs to be called before we start compiling a list of pages
|
||||
* to be migrated using isolate_lru_page(). If scheduling work on other CPUs is
|
||||
* undesirable, use migrate_prep_local()
|
||||
*/
|
||||
void migrate_prep(void)
|
||||
{
|
||||
/*
|
||||
* Clear the LRU lists so pages can be isolated.
|
||||
* Note that pages may be moved off the LRU after we have
|
||||
* drained them. Those pages will fail to migrate like other
|
||||
* pages that may be busy.
|
||||
*/
|
||||
lru_add_drain_all();
|
||||
}
|
||||
|
||||
/* Do the necessary work of migrate_prep but not if it involves other CPUs */
|
||||
void migrate_prep_local(void)
|
||||
{
|
||||
lru_add_drain();
|
||||
}
|
||||
|
||||
int isolate_movable_page(struct page *page, isolate_mode_t mode)
|
||||
{
|
||||
struct address_space *mapping;
|
||||
@@ -1697,7 +1719,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
|
||||
int start, i;
|
||||
int err = 0, err1;
|
||||
|
||||
lru_add_drain_all();
|
||||
migrate_prep();
|
||||
|
||||
for (i = start = 0; i < nr_pages; i++) {
|
||||
const void __user *p;
|
||||
|
Reference in New Issue
Block a user