From: Muchun Song <songmuchun@bytedance.com>
To: akpm@linux-foundation.org, zi.yan@cs.rutgers.edu,
kirill.shutemov@linux.intel.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Muchun Song <songmuchun@bytedance.com>
Subject: [PATCH 2/2] mm: fix missing cache flush for all tail pages of THP
Date: Fri, 21 Jan 2022 16:13:45 +0800 [thread overview]
Message-ID: <20220121081345.80320-2-songmuchun@bytedance.com> (raw)
In-Reply-To: <20220121081345.80320-1-songmuchun@bytedance.com>
The D-cache maintenance inside move_to_new_page() only consider one page,
there is still D-cache maintenance issue for tail pages of THP. Fix this
by using flush_dcache_folio().
Fixes: 616b8371539a ("mm: thp: enable thp migration in generic path")
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
mm/migrate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index c9296d63878d..daf2b3508670 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -934,8 +934,7 @@ static int move_to_new_page(struct page *newpage, struct page *page,
page->mapping = NULL;
if (likely(!is_zone_device_page(newpage)))
- flush_dcache_page(newpage);
-
+ flush_dcache_folio(page_folio(newpage));
}
out:
return rc;
--
2.11.0
next prev parent reply other threads:[~2022-01-21 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 8:13 [PATCH 1/2] mm: thp: fix wrong cache flush in remove_migration_pmd() Muchun Song
2022-01-21 8:13 ` Muchun Song [this message]
2022-01-21 14:59 ` [PATCH 2/2] mm: fix missing cache flush for all tail pages of THP Zi Yan
2022-01-21 22:25 ` Muchun Song
2022-01-21 14:55 ` [PATCH 1/2] mm: thp: fix wrong cache flush in remove_migration_pmd() Zi Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220121081345.80320-2-songmuchun@bytedance.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=zi.yan@cs.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).