All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Popple <apopple@nvidia.com>
To: "Gregory Price (Meta)" <gourry@gourry.net>
Cc: "David Hildenbrand (Arm)" <david@kernel.org>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	linux-mm@kvack.org, dri-devel@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Mika Penttilä" <mpenttil@redhat.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"John Hubbard" <jhubbard@nvidia.com>
Subject: Re: [PATCH] mm/hmm: skip NUMA balancing on protnone faults
Date: Tue, 17 Nov 2026 10:24:55 +1100	[thread overview]
Message-ID: <avuN2eIrlqrO0u6O@nvdebian.thelocal> (raw)
In-Reply-To: <179460319801.482102.15329919214055018110.b4-reply@b4>

On 2026-11-14 at 07:53 +1100, "Gregory Price (Meta)" <gourry@gourry.net> wrote...
> On 2026-11-13 21:43 +0100, David Hildenbrand (Arm) wrote:
> > On 11/13/26 21:34, Thomas Hellström wrote:
> > > 
> > > There are two major problems with the current behaviour.
> > > 
> > > 1) The work item executing hmm_range_fault() might have no affinity at
> > > all to the GPU about to access the memory.
> > > 
> > > 2) If migration happens, then hmm_range_fault() will stop and retry
> > > leading to excessive execution time.
> > > 
> > > While perhaps Matt's commit message doesn't correctly describe the GUP
> > > behaviour, do you have any alternative suggestion than to avoid
> > > migration in this case? I think it's a reasonable idea given the
> > > problems with the current code?
> > 
> > Adding fault reasons that hack around NUMA hinting such that a actual CPU
> > accessing it later will not trigger ... NUMA hinting?
> > 
> > I might be missing the "reasonable" in here :P
> > 
> 
> Ehhh... I think the hint faulting code is already very tenuous, so yeah,
> lets maybe not try to go down that route.
> 
> > I recall that John (cc) kept saying "GPUs and NUMA balancing is inherently
> > incompatible, you have to disable NUMA balancing".
> > 
> 
> If this is a NUMA-hotplugged GPU, then this is resolved by a private
> node, because this:
> 
> @@ -6404,6 +6404,9 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
>         if (!folio || folio_is_zone_device(folio))
> 
> 
> changes to
> 
>         if (!folio || folio_is_common_memory(folio))
> 
> And all folios on the GPU node are never subject to NUMA Balancing
> 
> so balancing can stay enabled while the GPU memory is not subject to
> PROT_NONE spew.

Hi Gregory, just to hopefully help clarify understanding a bit here this isn't
related to folio location and therefore private node won't help much.

This about a driver getting a snapshot of current PTE state to program a
secondary MMU (in this case on a GPU, but can equally be a NIC or other device).

Even CPU memory being subject to NUMA balancing can have quite an adverse impact
on GPU performance due to increased incidence of GPU faults, hence why John says
GPUs (using SVM) are inherently incompatible with NUMA balancing.

 - Alistair

> ~Gregory
> 
> -- 
> ~Gregory
> 
> 

  reply	other threads:[~2026-11-16 23:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:25 [PATCH] mm/hmm: skip NUMA balancing on protnone faults Matthew Auld
2026-11-13 17:18 ` ✓ CI.KUnit: success for " Patchwork
2026-11-13 17:51 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-13 18:27 ` [PATCH] " David Hildenbrand (Arm)
2026-11-13 20:34   ` Thomas Hellström
2026-11-13 20:43     ` David Hildenbrand (Arm)
2026-11-13 20:53       ` Gregory Price (Meta)
2026-11-16 23:24         ` Alistair Popple [this message]
2026-11-16 23:57           ` Gregory Price (Meta)
2026-11-17  3:51             ` Alistair Popple
2026-11-17  8:06               ` Gregory Price (Meta)
2026-11-13 20:56       ` Thomas Hellström
2026-11-13 21:19         ` David Hildenbrand (Arm)
2026-11-16 14:53           ` Thomas Hellström
2026-11-16 20:12             ` David Hildenbrand (Arm)
2026-11-16 21:11               ` Thomas Hellström
2026-11-16 21:17                 ` David Hildenbrand (Arm)
2026-11-14  5:18 ` ✗ Xe.CI.FULL: failure for " Patchwork

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=avuN2eIrlqrO0u6O@nvdebian.thelocal \
    --to=apopple@nvidia.com \
    --cc=david@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gourry@gourry.net \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mpenttil@redhat.com \
    --cc=thomas.hellstrom@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.