Skip to content

Fix read-only THP for non-tmpfs filesystems

Matthew Wilcox (Oracle) linux-mm 1 version Applied

Status from this message: [merged] mm-filemap-fix-storing-to-a-thp-shadow-entry.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3XArray: Add xa_get_orderinclude/linux/xarray.h lib/test_xarray.c lib/xarray.c+69 -00 repliesApplied
2/3XArray: Add xas_splitDocumentation/core-api/xarray.rst include/linux/xarray.h lib/test_xarray.c +1 more+211 -160 repliesApplied
3/3mm/filemap: Fix storing to a THP shadow entrymm/filemap.c+31 -110 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Fix read-only THP for non-tmpfs filesystems

As described more verbosely in the [3/3] changelog, we can inadvertently put an order-0 page in the page cache which occupies 512 consecutive entries. Users are running into this if they enable the READ_ONLY_THP_FOR_FS config option; see https://bugzilla.kernel.org/show_bug.cgi?id=206569
and Qian Cai has also reported it here:
https://lore.kernel.org/lkml/[email protected]/

This is a rather intrusive way of fixing the problem, but has the advantage that I've actually been testing it with the THP patches, which means that it sees far more use than it does upstream -- indeed, Song has been entirely unable to reproduce it. It also has the advantage that it removes a few patches from my gargantuan backlog of THP patches.

Matthew Wilcox (Oracle) (3):
XArray: Add xa_get_order
XArray: Add xas_split
mm/filemap: Fix storing to a THP shadow entry

 Documentation/core-api/xarray.rst |  16 +--
 include/linux/xarray.h            |  22 ++++
 lib/test_xarray.c                 |  62 ++++++++++
 lib/xarray.c                      | 196 ++++++++++++++++++++++++++++--
 mm/filemap.c                      |  42 +++++--
 5 files changed, 311 insertions(+), 27 deletions(-)
Signature · 1 line
2.28.0