On Fri, 2026-11-13 at 22:19 +0100, David Hildenbrand (Arm) wrote:
> On 11/13/26 21:56, Thomas Hellström wrote:
> > On Fri, 2026-11-13 at 21:43 +0100, David Hildenbrand (Arm) wrote:
> > > On 11/13/26 21:34, Thomas Hellström wrote:
> > > > Hi, David
> > > > 
> > > > 
> > > > 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
> > 
> > Wouldn't the net effect be that content stays put instead of being
> > migrated? In both cases a later CPU access will not trigger NUMA
> > hinting except that the proposed change doesn't send content to an
> > irrelevant node?
> 
> My point is that you are essentially disabling NUMA hinting because
> the CPU will
> no longer trigger NUMA hinting faults.

Yes, I got that part, but that's is only for a single scan, right? My
point was that we'd replace an irrelevant hint + migration with a NOP
hint. In both cases we'd lose the next relevant CPU access hint.

Granted, in the follow_protnone case we don't do that.


> 
> But then, just disable it entirely. Maybe John knows what to do.

We can't do that globally, really, for these type of apps. But one
remedy might be recommending the app to mbind() with a no-migration-on-
fault policy.

Also the hmm O(n²) complexity in this situation isn't really ideal. We
might need to look at that as well.

Thanks,
Thomas

Reply via email to