Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: "Cédric Le Goater" <clg@redhat.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-mm@kvack.org, "Peter Xu" <peterx@redhat.com>,
	"David Hildenbrand" <david@kernel.org>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Zi Yan" <ziy@nvidia.com>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/huge_memory: let special huge VMAs bypass the THP policy check
Date: Wed, 5 Aug 2026 17:54:01 +0100	[thread overview]
Message-ID: <anNqcgYx08JXvm94@lucifer> (raw)
In-Reply-To: <20260805165240.GR27883@nvidia.com>

On Wed, Aug 05, 2026 at 01:52:40PM -0300, Jason Gunthorpe wrote:
> On Wed, Aug 05, 2026 at 05:29:34PM +0100, Lorenzo Stoakes (ARM) wrote:
> > On Wed, Aug 05, 2026 at 09:15:24AM -0300, Jason Gunthorpe wrote:
> > > On Wed, Aug 05, 2026 at 07:55:40AM +0200, Cédric Le Goater wrote:
> > >
> > > > The result: each 256 GB BAR is mapped at 4 KiB granularity -- 67 million
> > > > page faults per GPU instead of a few thousand PMD/PUD faults. On hosts
> > > > with 8 GPUs (2 TB of BAR space), this causes VM boot times to degrade
> > > > severely, with 99.98% of CPU time spent in the VFIO BAR mapping path.
> > >
> > > Broadly upstream we expect people to use iommufd and dmabuf for these
> > > configurations to avoid all this nonsense overhead. :\
> >
> > Point taken on that :) but I think it's generally reasonable in line with the
> > huge PFN map changes to do something like I suggested.
>
> Yeah, for cases like this working with pure PFNs from some non-folio
> source the size should be entirely delegated to the driver, and driver
> should always have the opportunity to place a maximally sized PTE.
>
> It is definately wrong to intermix it with any THP logic. DAX isn't a
> special case, it was just the first place to partially implement
> something that looks like this.

Might actually be worth getting rid of this dumb DAX special case and putting it
in the new thing too actually so it's actually normalised as 'statically mapped
stuff that doesn't allocate isn't gated on THP tunables' alongside huge PFN.

>
> Jason

--
Cheers, Lorenzo


  reply	other threads:[~2026-08-05 16:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  5:55 [PATCH] mm/huge_memory: let special huge VMAs bypass the THP policy check Cédric Le Goater
2026-08-05 10:41 ` Lorenzo Stoakes (ARM)
2026-08-05 16:21   ` Cédric Le Goater
2026-08-05 16:26     ` Lorenzo Stoakes (ARM)
2026-08-05 16:29       ` Cédric Le Goater
2026-08-06  1:44   ` Matthew Wilcox
2026-08-06  6:29     ` Lorenzo Stoakes (ARM)
2026-08-06 16:19   ` David Hildenbrand (Arm)
2026-08-06 16:34     ` Cédric Le Goater
2026-08-06 16:45       ` David Hildenbrand (Arm)
2026-08-05 12:15 ` Jason Gunthorpe
2026-08-05 16:29   ` Lorenzo Stoakes (ARM)
2026-08-05 16:52     ` Jason Gunthorpe
2026-08-05 16:54       ` Lorenzo Stoakes (ARM) [this message]
2026-08-06 14:26 ` David Hildenbrand (Arm)
2026-08-06 14:28   ` Lorenzo Stoakes (ARM)
2026-08-06 14:42     ` Cédric Le Goater
2026-08-06 14:47       ` David Hildenbrand (Arm)
2026-08-06 14:53         ` Cédric Le Goater
2026-08-06 14:59           ` David Hildenbrand (Arm)
2026-08-06 16:45         ` Jason Gunthorpe
2026-08-06 16:47           ` David Hildenbrand (Arm)
2026-08-06 16:50           ` AI slop (was Re: [PATCH] mm/huge_memory: let special huge VMAs bypass the THP) " Lorenzo Stoakes (ARM)
2026-08-06 17:05             ` John Hubbard
2026-08-06 17:08               ` Zi Yan
2026-08-06 17:40                 ` Gregory Price
2026-08-06 17:42                   ` Zi Yan
2026-08-06 17:42                   ` Lorenzo Stoakes (ARM)
2026-08-06 19:28                     ` Gregory Price
2026-08-06 19:33                       ` Lorenzo Stoakes (ARM)
2026-08-06 17:41                 ` Lorenzo Stoakes (ARM)

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=anNqcgYx08JXvm94@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=david@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=ziy@nvidia.com \
    /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