Linux-mm Archive on
 help / color / Atom feed
From: "Matthew Wilcox (Oracle)" <>
To: Andrew Morton <>
Cc: "Matthew Wilcox (Oracle)" <>,, Song Liu <>,
	"Kirill A . Shutemov" <>,
	Qian Cai <>
Subject: [PATCH 0/3] Fix read-only THP for non-tmpfs filesystems
Date: Thu,  3 Sep 2020 19:30:26 +0100
Message-ID: <> (raw)

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;
and Qian Cai has also reported it here:

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(-)


             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 18:30 Matthew Wilcox (Oracle) [this message]
2020-09-03 18:30 ` [PATCH 1/3] XArray: Add xa_get_order Matthew Wilcox (Oracle)
2020-09-03 18:30 ` [PATCH 2/3] XArray: Add xas_split Matthew Wilcox (Oracle)
2020-09-03 18:30 ` [PATCH 3/3] mm/filemap: Fix storing to a THP shadow entry Matthew Wilcox (Oracle)
2020-09-04 17:23 ` [PATCH 0/3] Fix read-only THP for non-tmpfs filesystems Andrew Morton

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone