diff for duplicates of <20180801155552.GA8600@cmpxchg.org> diff --git a/a/1.txt b/N1/1.txt index cdb9b88..4eb52b4 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -34,64 +34,3 @@ Hm, that looks out of place too. The bitmaps are allocated for the entire lifetime of the css, not just while it's online. Any objections to the following fixup to that patch? - -From bbb785f1daca74024232aa34ba29a8a108556ace Mon Sep 17 00:00:00 2001 -From: Johannes Weiner <hannes@cmpxchg.org> -Date: Wed, 1 Aug 2018 11:42:55 -0400 -Subject: [PATCH] mm, memcg: assign memcg-aware shrinkers bitmap to memcg fix - -The shrinker bitmap allocation is a bit out of place in the css -onlining path. - -Allocate and free those bitmaps as part of the memcg alloc and free -procedures. - -Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> ---- - mm/memcontrol.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index c9098200326f..82eb40b715da 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -4342,6 +4342,7 @@ static void __mem_cgroup_free(struct mem_cgroup *memcg) - { - int node; - -+ memcg_free_shrinker_maps(memcg); - for_each_node(node) - free_mem_cgroup_per_node_info(memcg, node); - free_percpu(memcg->stat_cpu); -@@ -4381,6 +4382,9 @@ static struct mem_cgroup *mem_cgroup_alloc(void) - if (alloc_mem_cgroup_per_node_info(memcg, node)) - goto fail; - -+ if (memcg_alloc_shrinker_maps(memcg)) -+ goto fail; -+ - if (memcg_wb_domain_init(memcg, GFP_KERNEL)) - goto fail; - -@@ -4470,11 +4474,6 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css) - { - struct mem_cgroup *memcg = mem_cgroup_from_css(css); - -- if (memcg_alloc_shrinker_maps(memcg)) { -- mem_cgroup_id_remove(memcg); -- return -ENOMEM; -- } -- - /* Online state pins memcg ID, memcg ID pins CSS */ - atomic_set(&memcg->id.ref, 1); - css_get(css); -@@ -4527,7 +4526,6 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css) - vmpressure_cleanup(&memcg->vmpressure); - cancel_work_sync(&memcg->high_work); - mem_cgroup_remove_from_trees(memcg); -- memcg_free_shrinker_maps(memcg); - memcg_free_kmem(memcg); - mem_cgroup_free(memcg); - } --- -2.18.0 diff --git a/a/content_digest b/N1/content_digest index 59e176c..f50cdff 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -55,67 +55,6 @@ "Hm, that looks out of place too. The bitmaps are allocated for the\n" "entire lifetime of the css, not just while it's online.\n" "\n" - "Any objections to the following fixup to that patch?\n" - "\n" - "From bbb785f1daca74024232aa34ba29a8a108556ace Mon Sep 17 00:00:00 2001\n" - "From: Johannes Weiner <hannes@cmpxchg.org>\n" - "Date: Wed, 1 Aug 2018 11:42:55 -0400\n" - "Subject: [PATCH] mm, memcg: assign memcg-aware shrinkers bitmap to memcg fix\n" - "\n" - "The shrinker bitmap allocation is a bit out of place in the css\n" - "onlining path.\n" - "\n" - "Allocate and free those bitmaps as part of the memcg alloc and free\n" - "procedures.\n" - "\n" - "Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>\n" - "---\n" - " mm/memcontrol.c | 10 ++++------\n" - " 1 file changed, 4 insertions(+), 6 deletions(-)\n" - "\n" - "diff --git a/mm/memcontrol.c b/mm/memcontrol.c\n" - "index c9098200326f..82eb40b715da 100644\n" - "--- a/mm/memcontrol.c\n" - "+++ b/mm/memcontrol.c\n" - "@@ -4342,6 +4342,7 @@ static void __mem_cgroup_free(struct mem_cgroup *memcg)\n" - " {\n" - " \tint node;\n" - " \n" - "+\tmemcg_free_shrinker_maps(memcg);\n" - " \tfor_each_node(node)\n" - " \t\tfree_mem_cgroup_per_node_info(memcg, node);\n" - " \tfree_percpu(memcg->stat_cpu);\n" - "@@ -4381,6 +4382,9 @@ static struct mem_cgroup *mem_cgroup_alloc(void)\n" - " \t\tif (alloc_mem_cgroup_per_node_info(memcg, node))\n" - " \t\t\tgoto fail;\n" - " \n" - "+\tif (memcg_alloc_shrinker_maps(memcg))\n" - "+\t\tgoto fail;\n" - "+\n" - " \tif (memcg_wb_domain_init(memcg, GFP_KERNEL))\n" - " \t\tgoto fail;\n" - " \n" - "@@ -4470,11 +4474,6 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css)\n" - " {\n" - " \tstruct mem_cgroup *memcg = mem_cgroup_from_css(css);\n" - " \n" - "-\tif (memcg_alloc_shrinker_maps(memcg)) {\n" - "-\t\tmem_cgroup_id_remove(memcg);\n" - "-\t\treturn -ENOMEM;\n" - "-\t}\n" - "-\n" - " \t/* Online state pins memcg ID, memcg ID pins CSS */\n" - " \tatomic_set(&memcg->id.ref, 1);\n" - " \tcss_get(css);\n" - "@@ -4527,7 +4526,6 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)\n" - " \tvmpressure_cleanup(&memcg->vmpressure);\n" - " \tcancel_work_sync(&memcg->high_work);\n" - " \tmem_cgroup_remove_from_trees(memcg);\n" - "-\tmemcg_free_shrinker_maps(memcg);\n" - " \tmemcg_free_kmem(memcg);\n" - " \tmem_cgroup_free(memcg);\n" - " }\n" - "-- \n" - 2.18.0 + Any objections to the following fixup to that patch? -9629557eca53567f0fb2fc54955dece66d5d1756eb60f008e743c324300f23a4 +2625f5cef7e3902926d2b5bfe281a01d9d43facafe4993bc94a5daa0a3772348
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.