From: Gregory Price <gourry@gourry.net>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
surenb@google.com, mhocko@suse.com, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com, ziy@nvidia.com,
matthew.brost@intel.com, joshua.hahnjy@gmail.com,
rakie.kim@sk.com, byungchul@sk.com,
ying.huang@linux.alibaba.com, apopple@nvidia.com,
raghavendra.kt@amd.com, shy828301@gmail.com,
baolin.wang@linux.alibaba.com, osalvador@suse.de
Subject: Re: [PATCH 1/2] sched/numa: do not let the per-VMA PID filter gate promotion
Date: Fri, 4 Sep 2026 15:10:16 -0400 [thread overview]
Message-ID: <apsWE-y0nV5r1_5Z@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <20260904182006.1562449-2-gourry@gourry.net>
> /*
> * Do not scan the VMA if task has not accessed it, unless no other
> * VMA candidate exists.
> + *
> + * Force-scan only slow-tier folios when in tiering mode, as a large
> + * VMA can cause others to become "permanently unaccessed" if a scan
> + * cycle is consumed entirely by the large VMA.
> */
> + vma->numab_state->slow_only = false;
> if (!vma_pids_forced && !vma_is_accessed(mm, vma)) {
> - vma_pids_skipped = true;
> - trace_sched_skip_vma_numa(mm, vma, NUMAB_SKIP_PID_INACTIVE);
> - continue;
> + if (!(sysctl_numa_balancing_mode &
> + NUMA_BALANCING_MEMORY_TIERING)) {
> + vma_pids_skipped = true;
> + trace_sched_skip_vma_numa(mm, vma, NUMAB_SKIP_PID_INACTIVE);
> + continue;
> + }
> + vma->numab_state->slow_only = true;
> }
sashiko (correctly) reported that slow_only=false set unconditionally
here causes a VMA that's scanned over two passes to be prematurely
re-admitted regardless of vma_is_accessed() activity.
Patch looks simple:
+ if (mm->numa_scan_offset <= vma->vm_start)
+ vma->numab_state->slow_only = false;
and on patch two:
- vma->numab_state->slow_only = false;
+ vma->numab_state->slow_only = ro_file;
I'll follow up with a v2 next week after I test it.
~Gregory
next prev parent reply other threads:[~2026-09-04 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 18:20 [PATCH 0/2] sched/numa: stop VMA scan filters from gating promotion Gregory Price
2026-09-04 18:20 ` [PATCH 1/2] sched/numa: do not let the per-VMA PID filter gate promotion Gregory Price
2026-09-04 19:10 ` Gregory Price [this message]
2026-09-04 18:20 ` [PATCH 2/2] sched/numa: scan read-only file mappings in tiering mode Gregory Price
2026-09-04 19:31 ` Gregory Price
2026-09-07 15:35 ` Gregory Price
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=apsWE-y0nV5r1_5Z@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bsegall@google.com \
--cc=byungchul@sk.com \
--cc=david@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=joshua.hahnjy@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@meta.com \
--cc=kprateek.nayak@amd.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=matthew.brost@intel.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=osalvador@suse.de \
--cc=peterz@infradead.org \
--cc=raghavendra.kt@amd.com \
--cc=rakie.kim@sk.com \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=shy828301@gmail.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=ying.huang@linux.alibaba.com \
--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
all inboxes | Powered by JetHome®