All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] vmscan: enforce mems_effective during demotion
@ 2025-04-22  1:26 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  1:26 ` [PATCH v4 2/2] vmscan,cgroup: apply mems_effective to reclaim Gregory Price
  0 siblings, 2 replies; 15+ messages in thread
From: Gregory Price @ 2025-04-22  1:26 UTC (permalink / raw)
  To: linux-mm
  Cc: cgroups, linux-kernel, kernel-team, longman, hannes, mhocko,
	roman.gushchin, shakeel.butt, muchun.song, tj, mkoutny, akpm

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.

v4:
- explicitly expect v1 instead of checking for empty effective_mems.
  this was the case anyway since cpuset and mem_cgroup are in different
  heirarchy in v1.
- update docs to reflect this
- rcu_read_lock instead of taking a global lock.
- cpuset header fixup when compiled out.

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                        | 30 +++++++++++++-
 mm/memcontrol.c                               |  6 +++
 mm/page_alloc.c                               |  4 +-
 mm/vmscan.c                                   | 41 +++++++++++--------
 7 files changed, 84 insertions(+), 28 deletions(-)

-- 
2.49.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-04-24 20:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22  1:26 [PATCH v4 0/2] vmscan: enforce mems_effective during demotion 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   ` [PATCH v5 0/2] vmscan: enforce mems_effective during demotion Gregory Price
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

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.