From: Huang Ying <ying.huang(a)intel.com>
ANBZ: #80
cherry-picked from
https://git.kernel.org/pub/scm/linux/kernel/git/vishal/tiering.git/commit/?…
Commonly used file systems such as ext4 and xfs can migrate dirty file
cache pages with MIGRATE_ASYNC. So enable the dirty file cache pages
migration in AutoNUMA to optimize the page placement for these pages.
The patch improves the read/write bandwidth of fio benchmark with
80:20 read/write ratio and normal random distribution by 11.3% on a 2
socket Intel server with Optane DC Persistent Memory Model.
Signed-off-by: "Huang, Ying" <ying.huang(a)intel.com>
Signed-off-by: Baolin Wang <baolin.wang(a)linux.alibaba.com>
---
mm/migrate.c | 7 -------
mm/mprotect.c | 8 --------
2 files changed, 15 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index c7632c9..4a57837 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2060,13 +2060,6 @@ int migrate_misplaced_page(struct page *page, struct vm_area_struct
*vma,
(vma->vm_flags & VM_EXEC))
goto out;
- /*
- * Also do not migrate dirty pages as not all filesystems can move
- * dirty pages in MIGRATE_ASYNC mode which is a waste of cycles.
- */
- if (page_is_file_cache(page) && PageDirty(page))
- goto out;
-
isolated = numamigrate_isolate_page(pgdat, page);
if (!isolated)
goto out;
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 3072213..6525e96 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -93,14 +93,6 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t
*pmd,
page_mapcount(page) != 1)
continue;
- /*
- * While migration can move some dirty pages,
- * it cannot move them all from MIGRATE_ASYNC
- * context.
- */
- if (page_is_file_cache(page) && PageDirty(page))
- continue;
-
/* Avoid TLB flush if possible */
if (pte_protnone(oldpte))
continue;
--
1.8.3.1