linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Groves <John@groves.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alistair Popple <apopple@nvidia.com>,
	 David Hildenbrand <david@kernel.org>,
	Oscar Salvador <osalvador@suse.de>,
	 John Groves <jgroves@micron.com>,
	"Darrick J . Wong" <djwong@kernel.org>,
	 Dan Williams <dan.j.williams@intel.com>,
	Gregory Price <gourry@gourry.net>,
	 Balbir Singh <bsingharora@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	 Aravind Ramesh <arramesh@micron.com>,
	Ajay Joshi <ajayjoshi@micron.com>
Subject: Re: [PATCH] mm/memremap: fix spurious large folio warning for FS-DAX
Date: Thu, 18 Dec 2025 18:27:49 -0600	[thread overview]
Message-ID: <lxwhxzpuffky4hkw4qgiavv2x5pctb7ka3pnqdyci6w2wd5xch@bt3ehidvftnk> (raw)
In-Reply-To: <20251218160332.ee5b1c9b2ac7aebabbabfa45@linux-foundation.org>

On 25/12/18 04:03PM, Andrew Morton wrote:
> On Thu, 18 Dec 2025 09:58:02 +1100 Alistair Popple <apopple@nvidia.com> wrote:
> 
> > On 2025-12-18 at 08:13 +1100, John Groves <John@Groves.net> wrote...
> > > From: John Groves <John@Groves.net>
> > > 
> > > This patch addresses a warning that I discovered while working on famfs,
> > > which is an fs-dax file system that virtually always does PMD faults
> > > (next famfs patch series coming after the holidays).
> > > 
> > > However, XFS also does PMD faults in fs-dax mode, and it also triggers
> > > the warning. It takes some effort to get XFS to do a PMD fault, but
> > > instructions to reproduce it are below.
> > > 
> > > The VM_WARN_ON_ONCE(folio_test_large(folio)) check in
> > > free_zone_device_folio() incorrectly triggers for MEMORY_DEVICE_FS_DAX
> > > when PMD (2MB) mappings are used.
> > > 
> > > FS-DAX legitimately creates large file-backed folios when handling PMD
> > > faults. This is a core feature of FS-DAX that provides significant
> > > performance benefits by mapping 2MB regions directly to persistent
> > > memory. When these mappings are unmapped, the large folios are freed
> > > through free_zone_device_folio(), which triggers the spurious warning.
> > 
> > Yep, and I'm pretty sure devdax can also create large folios so we might need
> > a similar fix there. In fact looking at old vs. new code it seems we only ever
> > used to have this warning for anon folios, which I think could only ever be true
> > for DEVICE_PRIVATE or DEVICE_COHERENT folios.
> > 
> > So I suspect the proper fix is to just remove the warning entirely now that they
> > also support compound sizes.
> 
> So I'm assuming we can expect an updated version of this fix.

I'll send an update Friday morning

<snip>

Thanks Alistair, Dan and Andrew!

John



  reply	other threads:[~2025-12-19  0:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 21:13 John Groves
2025-12-17 22:58 ` Alistair Popple
2025-12-19  0:03   ` Andrew Morton
2025-12-19  0:27     ` John Groves [this message]
2025-12-17 23:59 ` dan.j.williams
2025-12-18  3:11   ` Alistair Popple

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=lxwhxzpuffky4hkw4qgiavv2x5pctb7ka3pnqdyci6w2wd5xch@bt3ehidvftnk \
    --to=john@groves.net \
    --cc=ajayjoshi@micron.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=arramesh@micron.com \
    --cc=bsingharora@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@kernel.org \
    --cc=djwong@kernel.org \
    --cc=gourry@gourry.net \
    --cc=jgroves@micron.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    /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