From: Dan Williams <dan.j.williams@intel.com>
To: David Hildenbrand <david@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Alistair Popple <apopple@nvidia.com>
Cc: <linux-mm@kvack.org>, <nvdimm@lists.linux.dev>
Subject: Re: [BUG Report] 6.15-rc1 RIP: 0010:__lruvec_stat_mod_folio+0x7e/0x250
Date: Wed, 9 Apr 2025 14:41:14 -0700 [thread overview]
Message-ID: <67f6e97a4dc0b_72052944@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <edf48c4b-1652-4500-a2e0-1cb98a1f0477@redhat.com>
David Hildenbrand wrote:
[..]
> > However, raises the question if fixing it here is sufficient for other
> > ZONE_DEVICE folio cases. I did not immediately find a place where other
> > ZONE_DEVICE users might be calling prep_compound_page() and leaving
> > stale tail page metadata lying around. Alistair?
>
> We only have to consider this when splitting folios (putting buddy
> freeing aside). clear_compound_head() is what to search for.
So I do not think there is a problem for the DEVICE_PRIVATE case since
that hits this comment in free_zone_device_folio()
/*
* Note: we don't expect anonymous compound pages yet. Once supported
* and we could PTE-map them similar to THP, we'd have to clear
* PG_anon_exclusive on all tail pages.
*/
The p2p-dma use case does not map into userspace, and the device-dax
case has static folio order for all potential folios. So I think this
fix is only needed for fsdax.
> We don't need it in mm/hugetlb.c because we'll only demote large folios
> to smaller-large folios and effectively reset the order/nr_pages for all
> involved folios.
I also now feel better about a local fs/dax.c fix because clearing
_nr_pages in free_zone_device_folio() would require static folio
metadata cases like device-dax to start re-inializing that field.
I.e. this seems to be the only ZONE_DEVICE case doing this demote to
order-0.
next prev parent reply other threads:[~2025-04-09 21:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 0:20 Alison Schofield
2025-04-09 8:40 ` David Hildenbrand
2025-04-09 8:55 ` David Hildenbrand
2025-04-09 20:08 ` Dan Williams
2025-04-09 20:25 ` David Hildenbrand
2025-04-09 21:13 ` Alison Schofield
2025-04-09 21:41 ` Dan Williams [this message]
2025-04-10 8:48 ` Christoph Hellwig
2025-04-09 19:03 ` Dan Williams
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=67f6e97a4dc0b_72052944@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=alison.schofield@intel.com \
--cc=apopple@nvidia.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=nvdimm@lists.linux.dev \
/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