Re: [PATCH v2 4/4] sched/numa: do not let VMA PID activity gate promotion
From: Gregory Price
Date: Fri Sep 18 2026 - 10:31:27 EST
On Fri, Sep 18, 2026 at 03:01:34PM +0200, David Hildenbrand (Arm) wrote:
> > - /* VMA scan is complete, do not scan until next sequence. */
> > + /*
> > + * VMA scan is complete, do not scan until next sequence. A
> > + * promotion-only scan reached the end of the VMA but did not
> > + * sample placement, so it does not count towards the starvation
> > + * horizon in vma_is_accessed().
> > + */
> > vma->numab_state->prev_scan_seq = mm->numa_scan_seq;
> > + if (!promo_only)
> > + vma->numab_state->prev_placement_scan_seq = mm->numa_scan_seq;
>
>
> This is all rather ... messy. I mean, just look at that promo_only() computation ...
>
> There must be a cleaner way ;)
I tried 3 or 4 different ways, this is the least ugly thing I could come
up with :\
The scan sequence thing is particularly confusing, and numab=3 mode
(NORMAL|TIERING) makes trying to reason about this whole thing really
painful.
I can see about making it at least a bit easier on the eyes.
~Gregory