revert-mm-add-nodes=-arg-to-memoryreclaim.patch removed from -mm tree
The quilt patch titled
Subject: Revert "mm: add nodes= arg to memory.reclaim"
has been removed from the -mm tree. Its filename was
revert-mm-add-nodes=-arg-to-memoryreclaim.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Michal Hocko <[email protected]>
Subject: Revert "mm: add nodes= arg to memory.reclaim"
Date: Fri, 16 Dec 2022 10:46:33 +0100
This reverts commit 12a5d3955227b0d7e04fb793ccceeb2a1dd275c5.
Although it is recognized that a finer grained pro-active reclaim is something we need and want the semantic of this implementation is really ambiguous.
In a follow up discussion it became clear that there are two essential usecases here. One is to use memory.reclaim to pro-actively reclaim memory and expectation is that the requested and reported amount of memory is uncharged from the memcg. Another usecase focuses on pro-active demotion when the memory is merely shuffled around to demotion targets while the overall charged memory stays unchanged.
The current implementation considers demoted pages as reclaimed and that break both usecases. [1] has tried to address the reporting part but there are more issues with that summarized in [2] and follow up emails.
Let's revert the nodemask based extension of the memcg pro-active reclaim for now until we settle with a more robust semantic.
[1] http://lkml.kernel.org/r/http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]
---
Documentation/admin-guide/cgroup-v2.rst | 15 +--- include/linux/swap.h | 3 mm/memcontrol.c | 67 ++++------------------ mm/vmscan.c | 4 - 4 files changed, 21 insertions(+), 68 deletions(-)
Documentation/admin-guide/cgroup-v2.rst renamed from Documentation/admin-guide/cgroup-v2.rst~revert-mm-add-nodes=-arg-to-memoryreclaim +6 -9
@@ -1245,13 +1245,17 @@ PAGE_SIZE multiple when read back. This is a simple interface to trigger memory reclaim in the target cgroup. - This file accepts a string which contains the number of bytes to - reclaim. + This file accepts a single key, the number of bytes to reclaim. + No nested keys are currently supported. Example:: echo "1G" > memory.reclaim + The interface can be later extended with nested keys to + configure the reclaim behavior. For example, specify the + type of memory to reclaim from (anon, file, ..). + Please note that the kernel can over or under reclaim from the target cgroup. If less bytes are reclaimed than the specified amount, -EAGAIN is returned.
@@ -1263,13 +1267,6 @@ PAGE_SIZE multiple when read back. This means that the networking layer will not adapt based on reclaim induced by memory.reclaim. - This file also allows the user to specify the nodes to reclaim from, - via the 'nodes=' key, for example:: - - echo "1G nodes=0,1" > memory.reclaim - - The above instructs the kernel to reclaim memory from nodes 0,1. - memory.peak A read-only single value file which exists on non-root cgroups.
include/linux/swap.h renamed from include/linux/swap.h~revert-mm-add-nodes=-arg-to-memoryreclaim +1 -2
@@ -418,8 +418,7 @@ extern unsigned long try_to_free_pages(sextern unsigned long try_to_free_mem_cgroup_pages (struct mem_cgroup *memcg,unsigned long nr_pages,gfp_t gfp_mask, -unsigned int reclaim_options, -nodemask_t *nodemask); +unsigned int reclaim_options); extern unsigned long mem_cgroup_shrink_node(struct mem_cgroup *mem, gfp_t gfp_mask, bool noswap, pg_data_t *pgdat,
mm/memcontrol.c renamed from mm/memcontrol.c~revert-mm-add-nodes=-arg-to-memoryreclaim +13 -54
130 lines not on this page · raw message
mm/vmscan.c renamed from mm/vmscan.c~revert-mm-add-nodes=-arg-to-memoryreclaim +1 -3
@@ -6754,8 +6754,7 @@ unsigned long mem_cgroup_shrink_node(strunsigned long try_to_free_mem_cgroup_pages (struct mem_cgroup *memcg,unsigned long nr_pages,gfp_t gfp_mask, -unsigned int reclaim_options, -nodemask_t *nodemask) +unsigned int reclaim_options) {unsigned long nr_reclaimed;unsigned int noreclaim_flag;
@@ -6770,7 +6769,6 @@ unsigned long try_to_free_mem_cgroup_pag .may_unmap = 1, .may_swap = !!(reclaim_options & MEMCG_RECLAIM_MAY_SWAP), .proactive = !!(reclaim_options & MEMCG_RECLAIM_PROACTIVE), - .nodemask = nodemask, };/* * Traverse the ZONELIST_FALLBACK zonelist of the current node to put
_
Patches currently in -mm which might be from [email protected] are