diff for duplicates of <20170605175254.GA8547@cmpxchg.org> diff --git a/a/1.txt b/N1/1.txt index 11184b8..3b6e9be 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -14,82 +14,3 @@ Thanks Guenter. Can you test if the fix below resolves the problem? --- - -From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001 -From: Johannes Weiner <hannes@cmpxchg.org> -Date: Sun, 4 Jun 2017 07:02:44 -0400 -Subject: [PATCH] mm: memcontrol: per-lruvec stats infrastructure fix 2 - -Even with the previous fix routing !page->mem_cgroup stats to the root -cgroup, we still see crashes in certain configurations as the root is -not initialized for the earliest possible accounting sites in certain -configurations. - -Don't track uncharged pages at all, not even in the root. This takes -care of early accounting as well as special pages that aren't tracked. - -Because we still need to account at the pgdat level, we can no longer -implement the lruvec_page_state functions on top of the lruvec_state -ones. But that's okay. It was a little silly to look up the nodeinfo -and descend to the lruvec, only to container_of() back to the nodeinfo -where the lruvec_stat structure is sitting. - -Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> ---- - include/linux/memcontrol.h | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h -index bea6f08e9e16..da9360885260 100644 ---- a/include/linux/memcontrol.h -+++ b/include/linux/memcontrol.h -@@ -585,27 +585,27 @@ static inline void mod_lruvec_state(struct lruvec *lruvec, - static inline void __mod_lruvec_page_state(struct page *page, - enum node_stat_item idx, int val) - { -- struct mem_cgroup *memcg; -- struct lruvec *lruvec; -- -- /* Special pages in the VM aren't charged, use root */ -- memcg = page->mem_cgroup ? : root_mem_cgroup; -+ struct mem_cgroup_per_node *pn; - -- lruvec = mem_cgroup_lruvec(page_pgdat(page), memcg); -- __mod_lruvec_state(lruvec, idx, val); -+ __mod_node_page_state(page_pgdat(page), idx, val); -+ if (mem_cgroup_disabled() || !page->mem_cgroup) -+ return; -+ __mod_memcg_state(page->mem_cgroup, idx, val); -+ pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; -+ __this_cpu_add(pn->lruvec_stat->count[idx], val); - } - - static inline void mod_lruvec_page_state(struct page *page, - enum node_stat_item idx, int val) - { -- struct mem_cgroup *memcg; -- struct lruvec *lruvec; -- -- /* Special pages in the VM aren't charged, use root */ -- memcg = page->mem_cgroup ? : root_mem_cgroup; -+ struct mem_cgroup_per_node *pn; - -- lruvec = mem_cgroup_lruvec(page_pgdat(page), memcg); -- mod_lruvec_state(lruvec, idx, val); -+ mod_node_page_state(page_pgdat(page), idx, val); -+ if (mem_cgroup_disabled() || !page->mem_cgroup) -+ return; -+ mod_memcg_state(page->mem_cgroup, idx, val); -+ pn = page->mem_cgroup->nodeinfo[page_to_nid(page)]; -+ this_cpu_add(pn->lruvec_stat->count[idx], val); - } - - unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, --- -2.13.0 - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index 46d13c9..d230ac8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -30,85 +30,6 @@ "\n" "Can you test if the fix below resolves the problem?\n" "\n" - "---\n" - "\n" - "From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001\n" - "From: Johannes Weiner <hannes@cmpxchg.org>\n" - "Date: Sun, 4 Jun 2017 07:02:44 -0400\n" - "Subject: [PATCH] mm: memcontrol: per-lruvec stats infrastructure fix 2\n" - "\n" - "Even with the previous fix routing !page->mem_cgroup stats to the root\n" - "cgroup, we still see crashes in certain configurations as the root is\n" - "not initialized for the earliest possible accounting sites in certain\n" - "configurations.\n" - "\n" - "Don't track uncharged pages at all, not even in the root. This takes\n" - "care of early accounting as well as special pages that aren't tracked.\n" - "\n" - "Because we still need to account at the pgdat level, we can no longer\n" - "implement the lruvec_page_state functions on top of the lruvec_state\n" - "ones. But that's okay. It was a little silly to look up the nodeinfo\n" - "and descend to the lruvec, only to container_of() back to the nodeinfo\n" - "where the lruvec_stat structure is sitting.\n" - "\n" - "Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>\n" - "---\n" - " include/linux/memcontrol.h | 28 ++++++++++++++--------------\n" - " 1 file changed, 14 insertions(+), 14 deletions(-)\n" - "\n" - "diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h\n" - "index bea6f08e9e16..da9360885260 100644\n" - "--- a/include/linux/memcontrol.h\n" - "+++ b/include/linux/memcontrol.h\n" - "@@ -585,27 +585,27 @@ static inline void mod_lruvec_state(struct lruvec *lruvec,\n" - " static inline void __mod_lruvec_page_state(struct page *page,\n" - " \t\t\t\t\t enum node_stat_item idx, int val)\n" - " {\n" - "-\tstruct mem_cgroup *memcg;\n" - "-\tstruct lruvec *lruvec;\n" - "-\n" - "-\t/* Special pages in the VM aren't charged, use root */\n" - "-\tmemcg = page->mem_cgroup ? : root_mem_cgroup;\n" - "+\tstruct mem_cgroup_per_node *pn;\n" - " \n" - "-\tlruvec = mem_cgroup_lruvec(page_pgdat(page), memcg);\n" - "-\t__mod_lruvec_state(lruvec, idx, val);\n" - "+\t__mod_node_page_state(page_pgdat(page), idx, val);\n" - "+\tif (mem_cgroup_disabled() || !page->mem_cgroup)\n" - "+\t\treturn;\n" - "+\t__mod_memcg_state(page->mem_cgroup, idx, val);\n" - "+\tpn = page->mem_cgroup->nodeinfo[page_to_nid(page)];\n" - "+\t__this_cpu_add(pn->lruvec_stat->count[idx], val);\n" - " }\n" - " \n" - " static inline void mod_lruvec_page_state(struct page *page,\n" - " \t\t\t\t\t enum node_stat_item idx, int val)\n" - " {\n" - "-\tstruct mem_cgroup *memcg;\n" - "-\tstruct lruvec *lruvec;\n" - "-\n" - "-\t/* Special pages in the VM aren't charged, use root */\n" - "-\tmemcg = page->mem_cgroup ? : root_mem_cgroup;\n" - "+\tstruct mem_cgroup_per_node *pn;\n" - " \n" - "-\tlruvec = mem_cgroup_lruvec(page_pgdat(page), memcg);\n" - "-\tmod_lruvec_state(lruvec, idx, val);\n" - "+\tmod_node_page_state(page_pgdat(page), idx, val);\n" - "+\tif (mem_cgroup_disabled() || !page->mem_cgroup)\n" - "+\t\treturn;\n" - "+\tmod_memcg_state(page->mem_cgroup, idx, val);\n" - "+\tpn = page->mem_cgroup->nodeinfo[page_to_nid(page)];\n" - "+\tthis_cpu_add(pn->lruvec_stat->count[idx], val);\n" - " }\n" - " \n" - " unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,\n" - "-- \n" - "2.13.0\n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + --- -c11d334e2325dbca2cbcb441aa7ad401dc9d1da91b7247d7285e6c9e833dc27f +42fcaae138de46e128a080cf8755848b4262d5ebc377bcf03d6bd96c4c51659e
diff --git a/a/1.txt b/N2/1.txt index 11184b8..2d2f1c8 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -15,7 +15,7 @@ Can you test if the fix below resolves the problem? --- -From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001 +>From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001 From: Johannes Weiner <hannes@cmpxchg.org> Date: Sun, 4 Jun 2017 07:02:44 -0400 Subject: [PATCH] mm: memcontrol: per-lruvec stats infrastructure fix 2 @@ -87,9 +87,3 @@ index bea6f08e9e16..da9360885260 100644 unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, -- 2.13.0 - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N2/content_digest index 46d13c9..6f4fd30 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -32,7 +32,7 @@ "\n" "---\n" "\n" - "From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001\n" + ">From 47007dfcd7873cb93d11466a93b1f41f6a7a434f Mon Sep 17 00:00:00 2001\n" "From: Johannes Weiner <hannes@cmpxchg.org>\n" "Date: Sun, 4 Jun 2017 07:02:44 -0400\n" "Subject: [PATCH] mm: memcontrol: per-lruvec stats infrastructure fix 2\n" @@ -103,12 +103,6 @@ " \n" " unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,\n" "-- \n" - "2.13.0\n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + 2.13.0 -c11d334e2325dbca2cbcb441aa7ad401dc9d1da91b7247d7285e6c9e833dc27f +7315911048fe6c97d455fa0c9e1ff80a319c92d70c2d50970348cadd63c2b9fc
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.