migrate_pages: split unmap_and_move() to _unmap() and _move()
authorHuang Ying <ying.huang@intel.com>
Mon, 13 Feb 2023 12:34:39 +0000 (20:34 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 17 Feb 2023 04:43:53 +0000 (20:43 -0800)
commit64c8902ed4418317cd416c566f896bd4a92b2efc
tree28eae3fab3d5b329cae0f03184c6085b95a9ea8c
parent42012e0436d44aeb2e68f11a28ddd0ad3f38b61f
migrate_pages: split unmap_and_move() to _unmap() and _move()

This is a preparation patch to batch the folio unmapping and moving.

In this patch, unmap_and_move() is split to migrate_folio_unmap() and
migrate_folio_move().  So, we can batch _unmap() and _move() in different
loops later.  To pass some information between unmap and move, the
original unused dst->mapping and dst->private are used.

Link: https://lkml.kernel.org/r/20230213123444.155149-5-ying.huang@intel.com
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Xin Hao <xhao@linux.alibaba.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Bharata B Rao <bharata@amd.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/migrate.h
mm/migrate.c