diff for duplicates of <20180405175507.GA24817@cmpxchg.org> diff --git a/a/1.txt b/N1/1.txt index 373ebd8..6de4804 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -26,255 +26,3 @@ Yeah, that's still great to have as generalized infrastructure. For memory.events, how about this instead? --- - -From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001 -From: Johannes Weiner <hannes@cmpxchg.org> -Date: Thu, 5 Apr 2018 11:53:55 -0400 -Subject: [PATCH] mm: memcg: make sure memory.events is uptodate when waking - pollers - -a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat -reporting") added per-cpu drift to all memory cgroup stats and events -shown in memory.stat and memory.events. - -For memory.stat this is acceptable. But memory.events issues file -notifications, and somebody polling the file for changes will be -confused when the counters in it are unchanged after a wakeup. - -Luckily, the events in memory.events - MEMCG_LOW, MEMCG_HIGH, -MEMCG_MAX, MEMCG_OOM - are sufficiently rare and high-level that we -don't need per-cpu buffering for them: MEMCG_HIGH and MEMCG_MAX would -be the most frequent, but they're counting invocations of reclaim, -which is a complex operation that touches many shared cachelines. - -This splits memory.events from the generic VM events and tracks them -in their own, unbuffered atomic counters. That's also cleaner, as it -eliminates the ugly enum nesting of VM and cgroup events. - -Fixes: a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") -Reported-by: Tejun Heo <tj@kernel.org> -Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> ---- - include/linux/memcontrol.h | 35 ++++++++++++++++++----------------- - mm/memcontrol.c | 31 ++++++++++++++++++------------- - mm/vmscan.c | 2 +- - 3 files changed, 37 insertions(+), 31 deletions(-) - -diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h -index c46016bb25eb..6503a9ca27c1 100644 ---- a/include/linux/memcontrol.h -+++ b/include/linux/memcontrol.h -@@ -48,13 +48,12 @@ enum memcg_stat_item { - MEMCG_NR_STAT, - }; - --/* Cgroup-specific events, on top of universal VM events */ --enum memcg_event_item { -- MEMCG_LOW = NR_VM_EVENT_ITEMS, -+enum memcg_memory_event { -+ MEMCG_LOW, - MEMCG_HIGH, - MEMCG_MAX, - MEMCG_OOM, -- MEMCG_NR_EVENTS, -+ MEMCG_NR_MEMORY_EVENTS, - }; - - struct mem_cgroup_reclaim_cookie { -@@ -88,7 +87,7 @@ enum mem_cgroup_events_target { - - struct mem_cgroup_stat_cpu { - long count[MEMCG_NR_STAT]; -- unsigned long events[MEMCG_NR_EVENTS]; -+ unsigned long events[NR_VM_EVENT_ITEMS]; - unsigned long nr_page_events; - unsigned long targets[MEM_CGROUP_NTARGETS]; - }; -@@ -202,7 +201,8 @@ struct mem_cgroup { - /* OOM-Killer disable */ - int oom_kill_disable; - -- /* handle for "memory.events" */ -+ /* memory.events */ -+ atomic_long_t memory_events[MEMCG_NR_MEMORY_EVENTS]; - struct cgroup_file events_file; - - /* protect arrays of thresholds */ -@@ -231,9 +231,10 @@ struct mem_cgroup { - struct task_struct *move_lock_task; - unsigned long move_lock_flags; - -+ /* memory.stat */ - struct mem_cgroup_stat_cpu __percpu *stat_cpu; - atomic_long_t stat[MEMCG_NR_STAT]; -- atomic_long_t events[MEMCG_NR_EVENTS]; -+ atomic_long_t events[NR_VM_EVENT_ITEMS]; - - unsigned long socket_pressure; - -@@ -645,9 +646,9 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, - gfp_t gfp_mask, - unsigned long *total_scanned); - --/* idx can be of type enum memcg_event_item or vm_event_item */ - static inline void __count_memcg_events(struct mem_cgroup *memcg, -- int idx, unsigned long count) -+ enum vm_event_item idx, -+ unsigned long count) - { - unsigned long x; - -@@ -663,7 +664,8 @@ static inline void __count_memcg_events(struct mem_cgroup *memcg, - } - - static inline void count_memcg_events(struct mem_cgroup *memcg, -- int idx, unsigned long count) -+ enum vm_event_item idx, -+ unsigned long count) - { - unsigned long flags; - -@@ -672,9 +674,8 @@ static inline void count_memcg_events(struct mem_cgroup *memcg, - local_irq_restore(flags); - } - --/* idx can be of type enum memcg_event_item or vm_event_item */ - static inline void count_memcg_page_event(struct page *page, -- int idx) -+ enum vm_event_item idx) - { - if (page->mem_cgroup) - count_memcg_events(page->mem_cgroup, idx, 1); -@@ -698,10 +699,10 @@ static inline void count_memcg_event_mm(struct mm_struct *mm, - rcu_read_unlock(); - } - --static inline void mem_cgroup_event(struct mem_cgroup *memcg, -- enum memcg_event_item event) -+static inline void memcg_memory_event(struct mem_cgroup *memcg, -+ enum memcg_memory_event event) - { -- count_memcg_events(memcg, event, 1); -+ atomic_long_inc(&memcg->memory_events[event]); - cgroup_file_notify(&memcg->events_file); - } - -@@ -721,8 +722,8 @@ static inline bool mem_cgroup_disabled(void) - return true; - } - --static inline void mem_cgroup_event(struct mem_cgroup *memcg, -- enum memcg_event_item event) -+static inline void memcg_memory_event(struct mem_cgroup *memcg, -+ enum memcg_memory_event event) - { - } - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 9ec024b862ac..e29c80b4a9ee 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -1839,7 +1839,7 @@ static int memcg_hotplug_cpu_dead(unsigned int cpu) - } - } - -- for (i = 0; i < MEMCG_NR_EVENTS; i++) { -+ for (i = 0; i < NR_VM_EVENT_ITEMS; i++) { - long x; - - x = this_cpu_xchg(memcg->stat_cpu->events[i], 0); -@@ -1858,7 +1858,7 @@ static void reclaim_high(struct mem_cgroup *memcg, - do { - if (page_counter_read(&memcg->memory) <= memcg->high) - continue; -- mem_cgroup_event(memcg, MEMCG_HIGH); -+ memcg_memory_event(memcg, MEMCG_HIGH); - try_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, true); - } while ((memcg = parent_mem_cgroup(memcg))); - } -@@ -1949,7 +1949,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, - if (!gfpflags_allow_blocking(gfp_mask)) - goto nomem; - -- mem_cgroup_event(mem_over_limit, MEMCG_MAX); -+ memcg_memory_event(mem_over_limit, MEMCG_MAX); - - nr_reclaimed = try_to_free_mem_cgroup_pages(mem_over_limit, nr_pages, - gfp_mask, may_swap); -@@ -1992,7 +1992,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, - if (fatal_signal_pending(current)) - goto force; - -- mem_cgroup_event(mem_over_limit, MEMCG_OOM); -+ memcg_memory_event(mem_over_limit, MEMCG_OOM); - - mem_cgroup_oom(mem_over_limit, gfp_mask, - get_order(nr_pages * PAGE_SIZE)); -@@ -2688,10 +2688,10 @@ static void tree_events(struct mem_cgroup *memcg, unsigned long *events) - struct mem_cgroup *iter; - int i; - -- memset(events, 0, sizeof(*events) * MEMCG_NR_EVENTS); -+ memset(events, 0, sizeof(*events) * NR_VM_EVENT_ITEMS); - - for_each_mem_cgroup_tree(iter, memcg) { -- for (i = 0; i < MEMCG_NR_EVENTS; i++) -+ for (i = 0; i < NR_VM_EVENT_ITEMS; i++) - events[i] += memcg_sum_events(iter, i); - } - } -@@ -5178,7 +5178,7 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, - continue; - } - -- mem_cgroup_event(memcg, MEMCG_OOM); -+ memcg_memory_event(memcg, MEMCG_OOM); - if (!mem_cgroup_out_of_memory(memcg, GFP_KERNEL, 0)) - break; - } -@@ -5191,11 +5191,16 @@ static int memory_events_show(struct seq_file *m, void *v) - { - struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m)); - -- seq_printf(m, "low %lu\n", memcg_sum_events(memcg, MEMCG_LOW)); -- seq_printf(m, "high %lu\n", memcg_sum_events(memcg, MEMCG_HIGH)); -- seq_printf(m, "max %lu\n", memcg_sum_events(memcg, MEMCG_MAX)); -- seq_printf(m, "oom %lu\n", memcg_sum_events(memcg, MEMCG_OOM)); -- seq_printf(m, "oom_kill %lu\n", memcg_sum_events(memcg, OOM_KILL)); -+ seq_printf(m, "low %lu\n", -+ atomic_long_read(&memcg->memory_events[MEMCG_LOW])); -+ seq_printf(m, "high %lu\n", -+ atomic_long_read(&memcg->memory_events[MEMCG_HIGH])); -+ seq_printf(m, "max %lu\n", -+ atomic_long_read(&memcg->memory_events[MEMCG_MAX])); -+ seq_printf(m, "oom %lu\n", -+ atomic_long_read(&memcg->memory_events[MEMCG_OOM])); -+ seq_printf(m, "oom_kill %lu\n", -+ atomic_long_read(&memcg->memory_events[OOM_KILL])); - - return 0; - } -@@ -5204,7 +5209,7 @@ static int memory_stat_show(struct seq_file *m, void *v) - { - struct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m)); - unsigned long stat[MEMCG_NR_STAT]; -- unsigned long events[MEMCG_NR_EVENTS]; -+ unsigned long events[NR_VM_EVENT_ITEMS]; - int i; - - /* -diff --git a/mm/vmscan.c b/mm/vmscan.c -index cd5dc3faaa57..7cdace56222f 100644 ---- a/mm/vmscan.c -+++ b/mm/vmscan.c -@@ -2544,7 +2544,7 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) - sc->memcg_low_skipped = 1; - continue; - } -- mem_cgroup_event(memcg, MEMCG_LOW); -+ memcg_memory_event(memcg, MEMCG_LOW); - } - - reclaimed = sc->nr_reclaimed; --- -2.16.3 diff --git a/a/content_digest b/N1/content_digest index 3a52c72..3411393 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -46,258 +46,6 @@ "\n" "For memory.events, how about this instead?\n" "\n" - "---\n" - "\n" - "From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001\n" - "From: Johannes Weiner <hannes@cmpxchg.org>\n" - "Date: Thu, 5 Apr 2018 11:53:55 -0400\n" - "Subject: [PATCH] mm: memcg: make sure memory.events is uptodate when waking\n" - " pollers\n" - "\n" - "a983b5ebee57 (\"mm: memcontrol: fix excessive complexity in memory.stat\n" - "reporting\") added per-cpu drift to all memory cgroup stats and events\n" - "shown in memory.stat and memory.events.\n" - "\n" - "For memory.stat this is acceptable. But memory.events issues file\n" - "notifications, and somebody polling the file for changes will be\n" - "confused when the counters in it are unchanged after a wakeup.\n" - "\n" - "Luckily, the events in memory.events - MEMCG_LOW, MEMCG_HIGH,\n" - "MEMCG_MAX, MEMCG_OOM - are sufficiently rare and high-level that we\n" - "don't need per-cpu buffering for them: MEMCG_HIGH and MEMCG_MAX would\n" - "be the most frequent, but they're counting invocations of reclaim,\n" - "which is a complex operation that touches many shared cachelines.\n" - "\n" - "This splits memory.events from the generic VM events and tracks them\n" - "in their own, unbuffered atomic counters. That's also cleaner, as it\n" - "eliminates the ugly enum nesting of VM and cgroup events.\n" - "\n" - "Fixes: a983b5ebee57 (\"mm: memcontrol: fix excessive complexity in memory.stat reporting\")\n" - "Reported-by: Tejun Heo <tj@kernel.org>\n" - "Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>\n" - "---\n" - " include/linux/memcontrol.h | 35 ++++++++++++++++++-----------------\n" - " mm/memcontrol.c | 31 ++++++++++++++++++-------------\n" - " mm/vmscan.c | 2 +-\n" - " 3 files changed, 37 insertions(+), 31 deletions(-)\n" - "\n" - "diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h\n" - "index c46016bb25eb..6503a9ca27c1 100644\n" - "--- a/include/linux/memcontrol.h\n" - "+++ b/include/linux/memcontrol.h\n" - "@@ -48,13 +48,12 @@ enum memcg_stat_item {\n" - " \tMEMCG_NR_STAT,\n" - " };\n" - " \n" - "-/* Cgroup-specific events, on top of universal VM events */\n" - "-enum memcg_event_item {\n" - "-\tMEMCG_LOW = NR_VM_EVENT_ITEMS,\n" - "+enum memcg_memory_event {\n" - "+\tMEMCG_LOW,\n" - " \tMEMCG_HIGH,\n" - " \tMEMCG_MAX,\n" - " \tMEMCG_OOM,\n" - "-\tMEMCG_NR_EVENTS,\n" - "+\tMEMCG_NR_MEMORY_EVENTS,\n" - " };\n" - " \n" - " struct mem_cgroup_reclaim_cookie {\n" - "@@ -88,7 +87,7 @@ enum mem_cgroup_events_target {\n" - " \n" - " struct mem_cgroup_stat_cpu {\n" - " \tlong count[MEMCG_NR_STAT];\n" - "-\tunsigned long events[MEMCG_NR_EVENTS];\n" - "+\tunsigned long events[NR_VM_EVENT_ITEMS];\n" - " \tunsigned long nr_page_events;\n" - " \tunsigned long targets[MEM_CGROUP_NTARGETS];\n" - " };\n" - "@@ -202,7 +201,8 @@ struct mem_cgroup {\n" - " \t/* OOM-Killer disable */\n" - " \tint\t\toom_kill_disable;\n" - " \n" - "-\t/* handle for \"memory.events\" */\n" - "+\t/* memory.events */\n" - "+\tatomic_long_t memory_events[MEMCG_NR_MEMORY_EVENTS];\n" - " \tstruct cgroup_file events_file;\n" - " \n" - " \t/* protect arrays of thresholds */\n" - "@@ -231,9 +231,10 @@ struct mem_cgroup {\n" - " \tstruct task_struct\t*move_lock_task;\n" - " \tunsigned long\t\tmove_lock_flags;\n" - " \n" - "+\t/* memory.stat */\n" - " \tstruct mem_cgroup_stat_cpu __percpu *stat_cpu;\n" - " \tatomic_long_t\t\tstat[MEMCG_NR_STAT];\n" - "-\tatomic_long_t\t\tevents[MEMCG_NR_EVENTS];\n" - "+\tatomic_long_t\t\tevents[NR_VM_EVENT_ITEMS];\n" - " \n" - " \tunsigned long\t\tsocket_pressure;\n" - " \n" - "@@ -645,9 +646,9 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,\n" - " \t\t\t\t\t\tgfp_t gfp_mask,\n" - " \t\t\t\t\t\tunsigned long *total_scanned);\n" - " \n" - "-/* idx can be of type enum memcg_event_item or vm_event_item */\n" - " static inline void __count_memcg_events(struct mem_cgroup *memcg,\n" - "-\t\t\t\t\tint idx, unsigned long count)\n" - "+\t\t\t\t\tenum vm_event_item idx,\n" - "+\t\t\t\t\tunsigned long count)\n" - " {\n" - " \tunsigned long x;\n" - " \n" - "@@ -663,7 +664,8 @@ static inline void __count_memcg_events(struct mem_cgroup *memcg,\n" - " }\n" - " \n" - " static inline void count_memcg_events(struct mem_cgroup *memcg,\n" - "-\t\t\t\t int idx, unsigned long count)\n" - "+\t\t\t\t enum vm_event_item idx,\n" - "+\t\t\t\t unsigned long count)\n" - " {\n" - " \tunsigned long flags;\n" - " \n" - "@@ -672,9 +674,8 @@ static inline void count_memcg_events(struct mem_cgroup *memcg,\n" - " \tlocal_irq_restore(flags);\n" - " }\n" - " \n" - "-/* idx can be of type enum memcg_event_item or vm_event_item */\n" - " static inline void count_memcg_page_event(struct page *page,\n" - "-\t\t\t\t\t int idx)\n" - "+\t\t\t\t\t enum vm_event_item idx)\n" - " {\n" - " \tif (page->mem_cgroup)\n" - " \t\tcount_memcg_events(page->mem_cgroup, idx, 1);\n" - "@@ -698,10 +699,10 @@ static inline void count_memcg_event_mm(struct mm_struct *mm,\n" - " \trcu_read_unlock();\n" - " }\n" - " \n" - "-static inline void mem_cgroup_event(struct mem_cgroup *memcg,\n" - "-\t\t\t\t enum memcg_event_item event)\n" - "+static inline void memcg_memory_event(struct mem_cgroup *memcg,\n" - "+\t\t\t\t enum memcg_memory_event event)\n" - " {\n" - "-\tcount_memcg_events(memcg, event, 1);\n" - "+\tatomic_long_inc(&memcg->memory_events[event]);\n" - " \tcgroup_file_notify(&memcg->events_file);\n" - " }\n" - " \n" - "@@ -721,8 +722,8 @@ static inline bool mem_cgroup_disabled(void)\n" - " \treturn true;\n" - " }\n" - " \n" - "-static inline void mem_cgroup_event(struct mem_cgroup *memcg,\n" - "-\t\t\t\t enum memcg_event_item event)\n" - "+static inline void memcg_memory_event(struct mem_cgroup *memcg,\n" - "+\t\t\t\t enum memcg_memory_event event)\n" - " {\n" - " }\n" - " \n" - "diff --git a/mm/memcontrol.c b/mm/memcontrol.c\n" - "index 9ec024b862ac..e29c80b4a9ee 100644\n" - "--- a/mm/memcontrol.c\n" - "+++ b/mm/memcontrol.c\n" - "@@ -1839,7 +1839,7 @@ static int memcg_hotplug_cpu_dead(unsigned int cpu)\n" - " \t\t\t}\n" - " \t\t}\n" - " \n" - "-\t\tfor (i = 0; i < MEMCG_NR_EVENTS; i++) {\n" - "+\t\tfor (i = 0; i < NR_VM_EVENT_ITEMS; i++) {\n" - " \t\t\tlong x;\n" - " \n" - " \t\t\tx = this_cpu_xchg(memcg->stat_cpu->events[i], 0);\n" - "@@ -1858,7 +1858,7 @@ static void reclaim_high(struct mem_cgroup *memcg,\n" - " \tdo {\n" - " \t\tif (page_counter_read(&memcg->memory) <= memcg->high)\n" - " \t\t\tcontinue;\n" - "-\t\tmem_cgroup_event(memcg, MEMCG_HIGH);\n" - "+\t\tmemcg_memory_event(memcg, MEMCG_HIGH);\n" - " \t\ttry_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, true);\n" - " \t} while ((memcg = parent_mem_cgroup(memcg)));\n" - " }\n" - "@@ -1949,7 +1949,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,\n" - " \tif (!gfpflags_allow_blocking(gfp_mask))\n" - " \t\tgoto nomem;\n" - " \n" - "-\tmem_cgroup_event(mem_over_limit, MEMCG_MAX);\n" - "+\tmemcg_memory_event(mem_over_limit, MEMCG_MAX);\n" - " \n" - " \tnr_reclaimed = try_to_free_mem_cgroup_pages(mem_over_limit, nr_pages,\n" - " \t\t\t\t\t\t gfp_mask, may_swap);\n" - "@@ -1992,7 +1992,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,\n" - " \tif (fatal_signal_pending(current))\n" - " \t\tgoto force;\n" - " \n" - "-\tmem_cgroup_event(mem_over_limit, MEMCG_OOM);\n" - "+\tmemcg_memory_event(mem_over_limit, MEMCG_OOM);\n" - " \n" - " \tmem_cgroup_oom(mem_over_limit, gfp_mask,\n" - " \t\t get_order(nr_pages * PAGE_SIZE));\n" - "@@ -2688,10 +2688,10 @@ static void tree_events(struct mem_cgroup *memcg, unsigned long *events)\n" - " \tstruct mem_cgroup *iter;\n" - " \tint i;\n" - " \n" - "-\tmemset(events, 0, sizeof(*events) * MEMCG_NR_EVENTS);\n" - "+\tmemset(events, 0, sizeof(*events) * NR_VM_EVENT_ITEMS);\n" - " \n" - " \tfor_each_mem_cgroup_tree(iter, memcg) {\n" - "-\t\tfor (i = 0; i < MEMCG_NR_EVENTS; i++)\n" - "+\t\tfor (i = 0; i < NR_VM_EVENT_ITEMS; i++)\n" - " \t\t\tevents[i] += memcg_sum_events(iter, i);\n" - " \t}\n" - " }\n" - "@@ -5178,7 +5178,7 @@ static ssize_t memory_max_write(struct kernfs_open_file *of,\n" - " \t\t\tcontinue;\n" - " \t\t}\n" - " \n" - "-\t\tmem_cgroup_event(memcg, MEMCG_OOM);\n" - "+\t\tmemcg_memory_event(memcg, MEMCG_OOM);\n" - " \t\tif (!mem_cgroup_out_of_memory(memcg, GFP_KERNEL, 0))\n" - " \t\t\tbreak;\n" - " \t}\n" - "@@ -5191,11 +5191,16 @@ static int memory_events_show(struct seq_file *m, void *v)\n" - " {\n" - " \tstruct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m));\n" - " \n" - "-\tseq_printf(m, \"low %lu\\n\", memcg_sum_events(memcg, MEMCG_LOW));\n" - "-\tseq_printf(m, \"high %lu\\n\", memcg_sum_events(memcg, MEMCG_HIGH));\n" - "-\tseq_printf(m, \"max %lu\\n\", memcg_sum_events(memcg, MEMCG_MAX));\n" - "-\tseq_printf(m, \"oom %lu\\n\", memcg_sum_events(memcg, MEMCG_OOM));\n" - "-\tseq_printf(m, \"oom_kill %lu\\n\", memcg_sum_events(memcg, OOM_KILL));\n" - "+\tseq_printf(m, \"low %lu\\n\",\n" - "+\t\t atomic_long_read(&memcg->memory_events[MEMCG_LOW]));\n" - "+\tseq_printf(m, \"high %lu\\n\",\n" - "+\t\t atomic_long_read(&memcg->memory_events[MEMCG_HIGH]));\n" - "+\tseq_printf(m, \"max %lu\\n\",\n" - "+\t\t atomic_long_read(&memcg->memory_events[MEMCG_MAX]));\n" - "+\tseq_printf(m, \"oom %lu\\n\",\n" - "+\t\t atomic_long_read(&memcg->memory_events[MEMCG_OOM]));\n" - "+\tseq_printf(m, \"oom_kill %lu\\n\",\n" - "+\t\t atomic_long_read(&memcg->memory_events[OOM_KILL]));\n" - " \n" - " \treturn 0;\n" - " }\n" - "@@ -5204,7 +5209,7 @@ static int memory_stat_show(struct seq_file *m, void *v)\n" - " {\n" - " \tstruct mem_cgroup *memcg = mem_cgroup_from_css(seq_css(m));\n" - " \tunsigned long stat[MEMCG_NR_STAT];\n" - "-\tunsigned long events[MEMCG_NR_EVENTS];\n" - "+\tunsigned long events[NR_VM_EVENT_ITEMS];\n" - " \tint i;\n" - " \n" - " \t/*\n" - "diff --git a/mm/vmscan.c b/mm/vmscan.c\n" - "index cd5dc3faaa57..7cdace56222f 100644\n" - "--- a/mm/vmscan.c\n" - "+++ b/mm/vmscan.c\n" - "@@ -2544,7 +2544,7 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)\n" - " \t\t\t\t\tsc->memcg_low_skipped = 1;\n" - " \t\t\t\t\tcontinue;\n" - " \t\t\t\t}\n" - "-\t\t\t\tmem_cgroup_event(memcg, MEMCG_LOW);\n" - "+\t\t\t\tmemcg_memory_event(memcg, MEMCG_LOW);\n" - " \t\t\t}\n" - " \n" - " \t\t\treclaimed = sc->nr_reclaimed;\n" - "-- \n" - 2.16.3 + --- -c72ea713700346e06e0112a7ede78de825d2ca9e67b1f25c123955570db968c9 +96438cc7d803b51ba85e6fe2eea7208516c9b59ab5f010d2e3f0277ed846f1b8
diff --git a/a/1.txt b/N2/1.txt index 373ebd8..6c7bffa 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -27,7 +27,7 @@ For memory.events, how about this instead? --- -From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001 +>From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001 From: Johannes Weiner <hannes@cmpxchg.org> Date: Thu, 5 Apr 2018 11:53:55 -0400 Subject: [PATCH] mm: memcg: make sure memory.events is uptodate when waking diff --git a/a/content_digest b/N2/content_digest index 3a52c72..297145e 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -48,7 +48,7 @@ "\n" "---\n" "\n" - "From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001\n" + ">From 4369ce161a9085aa408f2eca54f9de72909ee1b1 Mon Sep 17 00:00:00 2001\n" "From: Johannes Weiner <hannes@cmpxchg.org>\n" "Date: Thu, 5 Apr 2018 11:53:55 -0400\n" "Subject: [PATCH] mm: memcg: make sure memory.events is uptodate when waking\n" @@ -300,4 +300,4 @@ "-- \n" 2.16.3 -c72ea713700346e06e0112a7ede78de825d2ca9e67b1f25c123955570db968c9 +8d6d284a642d34c82209a88ae26ba304550971d07793e21b56abeacf5aa1e44a
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.