mm, thp: fix file-backed THP race in collapse_file and truncate pagecache
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 3 repliesIn review
- v32 patches 3 repliesSuperseded
- v22 patches 36 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 9 replies | Superseded |
Changes in v4 from the cover letter
- Patch "mm, thp: lock filemap when truncating page cache"
- Patch "mm, thp: bail out early in collapse_file for writeback page" remove the timestamps from the commit log.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm, thp: lock filemap when truncating page cachefs/ | +4 | 1 reply | |
| 2/2 | mm, thp: bail out early in collapse_file for writeback pagemm/ | +6 | 2 replies | |
| 2/2 | mm, thp: bail out early in collapse_file for writeback pagemm/ | +6 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Song Liu | Matthew Wilcox (Oracle) | Yang Shi |
|---|---|---|---|
| 1/2 | T-b | ||
| 2/2 | R-b R-b | R-b R-b | |
| 2/2 | R-b R-b | R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 0/2] mm, thp: fix file-backed THP race in collapse_file and truncate pagecache
Hi
We found two bugs related to file-backed THP in our cases, recently. The two bugs rough description as following:
1. in truncate_inode_pages_range, subpage(s) of file-backed THP can be revealed by find_get_entry.
2. 'collapse_file' miss the pages which in writeback but no private. This situation will be triggered in XFS when block size is set to PAGESIZE.
These two patches mainly fix the above mentioned bugs, and have been tested in latest branch.
Changelog:
v3 -> v4:
- Patch "mm, thp: lock filemap when truncating page cache"
- Patch "mm, thp: bail out early in collapse_file for writeback page" remove the timestamps from the commit log.
v2 -> v3:
- Patch "mm, thp: lock filemap when truncating page cache"
add filemap_invalidate_{un}lock before and after calling truncate_pagecache (Suggested by Song Liu and Matthew).
v1 -> v2:
- Patch "mm, thp: check page mapping when truncating page cache" move the check of page mapping to behind lock_page.
- Patch "mm, thp: bail out early in collapse_file for writeback page" check the writeback flag before taking page lock (Suggested by Yang Shi).
v1 link:
https://patchwork.kernel.org/project/linux-mm/cover/[email protected]/
v2 link:
https://patchwork.kernel.org/project/linux-mm/patch/[email protected]/
v3 link:
https://patchwork.kernel.org/project/linux-mm/cover/[email protected]/
Rongwei Wang (2):
mm, thp: lock filemap when truncating page cache mm, thp: bail out early in collapse_file for writeback page
fs/open.c | 5 ++++- mm/khugepaged.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.27.0