memcg-scan-cache-objects-hierarchically.patch removed from -mm tree
Subsystems (4)
[email protected]
maintainerSubject: [to-be-updated] memcg-scan-cache-objects-hierarchically.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 06 Jun 2013 12:35:19 -0700
The patch titled
Subject: memcg: scan cache objects hierarchically
has been removed from the -mm tree. Its filename was
memcg-scan-cache-objects-hierarchically.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Glauber Costa <[email protected]>
Subject: memcg: scan cache objects hierarchically
When reaching shrink_slab, we should descent in children memcg searching for objects that could be shrunk. This is true even if the memcg does not have kmem limits on, since the kmem res_counter will also be billed against the user res_counter of the parent.
It is possible that we will free objects and not free any pages, that will just harm the child groups without helping the parent group at all. But at this point, we basically are prepared to pay the price.
---
include/linux/memcontrol.h | 6 ++ mm/memcontrol.c | 13 +++++ mm/vmscan.c | 81 +++++++++++++++++++++++++++-------- 3 files changed, 82 insertions(+), 18 deletions(-)
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~memcg-scan-cache-objects-hierarchically +6 -0
@@ -441,6 +441,7 @@ static inline bool memcg_kmem_enabled(voreturn static_key_false (&memcg_kmem_enabled_key); } +bool memcg_kmem_should_reclaim (struct mem_cgroup *memcg);bool memcg_kmem_is_active (struct mem_cgroup *memcg);/*
@@ -585,6 +586,11 @@ memcg_kmem_get_cache(struct kmem_cache * }#else +static inline bool memcg_kmem_should_reclaim (struct mem_cgroup *memcg) +{ +return false; +} +static inline bool memcg_kmem_is_active (struct mem_cgroup *memcg) {return false;
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-scan-cache-objects-hierarchically +13 -0
@@ -3069,6 +3069,19 @@ static void __mem_cgroup_commit_charge(s }#ifdef CONFIG_MEMCG_KMEM +bool memcg_kmem_should_reclaim (struct mem_cgroup *memcg) +{ +struct mem_cgroup *iter; + +for_each_mem_cgroup_tree (iter, memcg) { +if (memcg_kmem_is_active (iter)) { +mem_cgroup_iter_break (memcg, iter); +return true; + } + } +return false; +} +static inline bool memcg_can_account_kmem (struct mem_cgroup *memcg) { return !mem_cgroup_disabled() && !mem_cgroup_is_root(memcg) &&
mm/vmscan.c renamed from mm/vmscan.c~memcg-scan-cache-objects-hierarchically +61 -13
99 lines not on this page · raw message