Skip to contentSkip to conversation

memcg-per-memcg-kmem-shrinking.patch removed from -mm tree

to-be-updated [email protected] 1 participant 1 message Jun 6, 2013

Subsystems (5)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [to-be-updated] memcg-per-memcg-kmem-shrinking.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 06 Jun 2013 12:35:17 -0700

The patch titled
Subject: memcg: per-memcg kmem shrinking
has been removed from the -mm tree. Its filename was
memcg-per-memcg-kmem-shrinking.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Glauber Costa <[email protected]>
Subject: memcg: per-memcg kmem shrinking

If the kernel limit is smaller than the user limit, we will have situations in which our allocations fail but freeing user pages will buy us nothing. In those, we would like to call a specialized memcg reclaimer that only frees kernel memory and leave the user memory alone. Those are also expected to fail when we account memcg->kmem, instead of when we account memcg->res. Based on that, this patch implements a memcg-specific reclaimer, that only shrinks kernel objects, withouth touching user pages.

There might be situations in which there are plenty of objects to shrink, but we can't do it because the __GFP_FS flag is not set. Although they can happen with user pages, they are a lot more common with fs-metadata:
this is the case with almost all inode allocation.

Those allocations are, however, capable of waiting. So we can just span a worker, let it finish its job and proceed with the allocation. As slow as it is, at this point we are already past any hopes anyway.

Cc Glauber Costa <[email protected]>
Cc Dave Chinner <[email protected]>

---

 include/linux/swap.h |    2 
 mm/memcontrol.c      |  180 ++++++++++++++++++++++++++++++++---------
 mm/vmscan.c          |   44 +++++++++-
 3 files changed, 187 insertions(+), 39 deletions(-)
include/linux/swap.h renamed from include/linux/swap.h~memcg-per-memcg-kmem-shrinking +2 -0
diff -puN include/linux/swap.h~memcg-per-memcg-kmem-shrinking include/linux/swap.h
@@ -276,6 +276,8 @@ extern unsigned long try_to_free_pages(s
 extern int __isolate_lru_page(struct page *page, isolate_mode_t mode);
 extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
 						  gfp_t gfp_mask, bool noswap);
+extern unsigned long try_to_free_mem_cgroup_kmem(struct mem_cgroup *mem,
+						 gfp_t gfp_mask);
 extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
 						gfp_t gfp_mask, bool noswap,
 						struct zone *zone,
mm/memcontrol.c renamed from mm/memcontrol.c~memcg-per-memcg-kmem-shrinking +142 -38

251 lines not on this page · raw message

mm/vmscan.c renamed from mm/vmscan.c~memcg-per-memcg-kmem-shrinking +43 -1

50 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

memcg-scan-cache-objects-hierarchically.patch vmscan-take-at-least-one-pass-with-shrinkers.patch super-targeted-memcg-reclaim.patch memcg-move-initialization-to-memcg-creation.patch vmpressure-in-kernel-notifications.patch memcg-reap-dead-memcgs-upon-global-memory-pressure.patch