Re: [PATCH v2 1/2] mm: disable LRU pagevec during the migration temporarily

From: David Hildenbrand
Date: Tue Mar 09 2021 - 11:31:57 EST



Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
* from v1 - https://lore.kernel.org/lkml/20210302210949.2440120-1-minchan@xxxxxxxxxx/
* introduce __lru_add_drain_all to minimize changes - mhocko
* use lru_cache_disable for memory-hotplug
* schedule for every cpu at force_all_cpus

* from RFC - http://lore.kernel.org/linux-mm/20210216170348.1513483-1-minchan@xxxxxxxxxx
* use atomic and lru_add_drain_all for strict ordering - mhocko
* lru_cache_disable/enable - mhocko

include/linux/migrate.h | 6 ++-
include/linux/swap.h | 2 +
mm/memory_hotplug.c | 3 +-
mm/mempolicy.c | 6 +++
mm/migrate.c | 13 ++++---
mm/page_alloc.c | 3 ++
mm/swap.c | 82 +++++++++++++++++++++++++++++++++--------
7 files changed, 91 insertions(+), 24 deletions(-)

Sorry for nit picking but I think the additional abstraction for
migrate_prep is not really needed and we can remove some more code.
Maybe we should even get rid of migrate_prep_local which only has a
single caller and open coding lru draining with a comment would be
better from code reading POV IMO.

Thanks for the code. I agree with you.
However, in this moment, let's go with this one until we conclude.
The removal of migrate_prep could be easily done after that.
I am happy to work on it.

Can you prepare + send along these cleanups so we can have a look at the end result?

(either cleanups before or after your changes - doing cleanups before might be cleaner as we are not dealing with a fix here that we want to backport)

--
Thanks,

David / dhildenb