Skip to content

Fix cache flush issues considering PMD sharing

Baolin Wang linux-mm lkml 2 versions – Applied

Status from this message: [merged mm-stable] mm-rmap-use-flush_cache_range-to-flush-cache-for-hugetlb-pages.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesApplied 3/3
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Add reviewed-by tag from Mike.
- Update some comments suggested by Mike.
- Add a new patch to fix cache issue for hugetlb page.

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm: hugetlb: Considering PMD sharing when flushing cache/TLBsmm/hugetlb.c mm/mremap.c+16 -31 replyApplied
2/3mm: rmap: Move the cache flushing to the correct place for hugetlb PMD sharingmm/rmap.c+22 -184 repliesApplied
3/3mm: rmap: Use flush_cache_range() to flush cache for hugetlb pagesmm/rmap.c+48 -422 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMike KravetzMuchun Song
1/3R-b R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Fix cache flush issues considering PMD sharing

Hi,

This patch set fixes some cache flushing issues if PMD sharing is possible for hugetlb pages, which were found by code inspection. Meanwhile Mike found the flush_cache_page() can not cover the whole size of a hugetlb page on some architectures [1], so I added a new patch 3 to fix this issue, since I found only try_to_unmap_one() and try_to_migrate_one() need to fix after some investigation.

Please help to review. Thanks.

[1] https://lore.kernel.org/linux-mm/[email protected]/

Changes from v1:
- Add reviewed-by tag from Mike.
- Update some comments suggested by Mike.
- Add a new patch to fix cache issue for hugetlb page.

Baolin Wang (3):
mm: hugetlb: Considering PMD sharing when flushing cache/TLBs
mm: rmap: Move the cache flushing to the correct place for hugetlb PMD
sharing
mm: rmap: Use flush_cache_range() to flush cache for hugetlb pages

 mm/hugetlb.c |  17 ++++++++-
 mm/mremap.c  |   2 +-
 mm/rmap.c    | 118 ++++++++++++++++++++++++++++++++---------------------------
 3 files changed, 80 insertions(+), 57 deletions(-)
Signature · 1 line
1.8.3.1