From: Gregory Price <gourry@gourry.net>
To: linux-mm@kvack.org
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, longman@redhat.com, hannes@cmpxchg.org,
mhocko@kernel.org, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev, tj@kernel.org,
mkoutny@suse.com, akpm@linux-foundation.org
Subject: [PATCH v5 0/2] vmscan: enforce mems_effective during demotion
Date: Thu, 24 Apr 2025 16:22:05 -0400 [thread overview]
Message-ID: <20250424202207.50028-1-gourry@gourry.net> (raw)
In-Reply-To: <20250422012616.1883287-3-gourry@gourry.net>
Change reclaim to respect cpuset.mems_effective during demotion when
possible. Presently, reclaim explicitly ignores cpuset.mems_effective
when demoting, which may cause the cpuset settings to violated.
Implement cpuset_node_allowed() to check the cpuset.mems_effective
associated wih the mem_cgroup of the lruvec being scanned. This only
applies to cgroup/cpuset v2, as cpuset exists in a different hierarchy
than mem_cgroup in v1.
This requires renaming the existing cpuset_node_allowed() to be
cpuset_current_now_allowed() - which is more descriptive anyway - to
implement the new cpuset_node_allowed() which takes a target cgroup.
v5:
- squash drop rcu_read_lock fixlet into second patch,
- changelog fixups
Gregory Price (2):
cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed
vmscan,cgroup: apply mems_effective to reclaim
.../ABI/testing/sysfs-kernel-mm-numa | 16 +++++---
include/linux/cpuset.h | 9 +++-
include/linux/memcontrol.h | 6 +++
kernel/cgroup/cpuset.c | 40 +++++++++++++++++-
mm/memcontrol.c | 6 +++
mm/page_alloc.c | 4 +-
mm/vmscan.c | 41 +++++++++++--------
7 files changed, 94 insertions(+), 28 deletions(-)
--
2.49.0
next prev parent reply other threads:[~2025-04-24 20:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 1:26 [PATCH v4 " Gregory Price
2025-04-22 1:26 ` [PATCH v4 1/2] cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed Gregory Price
2025-04-22 17:37 ` Johannes Weiner
2025-04-22 1:26 ` [PATCH v4 2/2] vmscan,cgroup: apply mems_effective to reclaim Gregory Price
2025-04-22 2:02 ` Waiman Long
2025-04-22 4:07 ` Gregory Price
2025-04-22 4:30 ` [PATCH] cpuset: relax locking on cpuset_node_allowed Gregory Price
2025-04-22 4:41 ` Shakeel Butt
2025-04-22 17:46 ` Johannes Weiner
2025-04-22 19:57 ` Waiman Long
2025-04-22 4:41 ` [PATCH v4 2/2] vmscan,cgroup: apply mems_effective to reclaim Shakeel Butt
2025-04-22 17:41 ` Johannes Weiner
2025-04-24 20:22 ` Gregory Price [this message]
2025-04-24 20:22 ` [PATCH v5 1/2] cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed Gregory Price
2025-04-24 20:22 ` [PATCH v5 2/2] vmscan,cgroup: apply mems_effective to reclaim Gregory Price
2025-04-24 20:28 [PATCH v5 0/2] vmscan: enforce mems_effective during demotion 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=20250424202207.50028-1-gourry@gourry.net \
--to=gourry@gourry.net \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/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