* + mm-memcontrol-fix-wrong-statistics-in-memorystat.patch added to -mm tree
@ 2019-07-04 21:02 akpm
2019-07-04 21:23 ` Shakeel Butt
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2019-07-04 21:02 UTC (permalink / raw)
To: hannes, laoar.shao, mhocko, mm-commits, shakeelb, shaoyafang,
stable
The patch titled
Subject: mm/memcontrol: fix wrong statistics in memory.stat
has been added to the -mm tree. Its filename is
mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Yafang Shao <laoar.shao@gmail.com>
Subject: mm/memcontrol: fix wrong statistics in memory.stat
When we calculate total statistics for memcg1_stats and memcg1_events, we
use the the index 'i' in the for loop as the events index. Actually we
should use memcg1_stats[i] and memcg1_events[i] as the events index.
Link: http://lkml.kernel.org/r/1562116978-19539-1-git-send-email-laoar.shao@gmail.com
Fixes: 42a300353577 ("mm: memcontrol: fix recursive statistics correctness & scalabilty").
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Yafang Shao <shaoyafang@didiglobal.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/mm/memcontrol.c~mm-memcontrol-fix-wrong-statistics-in-memorystat
+++ a/mm/memcontrol.c
@@ -3530,12 +3530,13 @@ static int memcg_stat_show(struct seq_fi
if (memcg1_stats[i] == MEMCG_SWAP && !do_memsw_account())
continue;
seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
- (u64)memcg_page_state(memcg, i) * PAGE_SIZE);
+ (u64)memcg_page_state(memcg, memcg1_stats[i]) *
+ PAGE_SIZE);
}
for (i = 0; i < ARRAY_SIZE(memcg1_events); i++)
seq_printf(m, "total_%s %llu\n", memcg1_event_names[i],
- (u64)memcg_events(memcg, i));
+ (u64)memcg_events(memcg, memcg1_events[i]));
for (i = 0; i < NR_LRU_LISTS; i++)
seq_printf(m, "total_%s %llu\n", mem_cgroup_lru_names[i],
_
Patches currently in -mm which might be from laoar.shao@gmail.com are
mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
mm-vmscan-expose-cgroup_ino-for-memcg-reclaim-tracepoints.patch
mm-vmscan-add-a-new-member-reclaim_state-in-struct-shrink_control.patch
mm-vmscan-add-a-new-member-reclaim_state-in-struct-shrink_control-fix.patch
mm-vmscan-calculate-reclaimed-slab-caches-in-all-reclaim-paths.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + mm-memcontrol-fix-wrong-statistics-in-memorystat.patch added to -mm tree
2019-07-04 21:02 + mm-memcontrol-fix-wrong-statistics-in-memorystat.patch added to -mm tree akpm
@ 2019-07-04 21:23 ` Shakeel Butt
0 siblings, 0 replies; 2+ messages in thread
From: Shakeel Butt @ 2019-07-04 21:23 UTC (permalink / raw)
To: Andrew Morton
Cc: Johannes Weiner, Yafang Shao, Michal Hocko, mm-commits,
Yafang Shao, stable
On Thu, Jul 4, 2019 at 2:02 PM <akpm@linux-foundation.org> wrote:
>
>
> The patch titled
> Subject: mm/memcontrol: fix wrong statistics in memory.stat
> has been added to the -mm tree. Its filename is
> mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
>
> This patch should soon appear at
> http://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
> and later at
> http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: Yafang Shao <laoar.shao@gmail.com>
> Subject: mm/memcontrol: fix wrong statistics in memory.stat
>
> When we calculate total statistics for memcg1_stats and memcg1_events, we
> use the the index 'i' in the for loop as the events index. Actually we
> should use memcg1_stats[i] and memcg1_events[i] as the events index.
>
> Link: http://lkml.kernel.org/r/1562116978-19539-1-git-send-email-laoar.shao@gmail.com
> Fixes: 42a300353577 ("mm: memcontrol: fix recursive statistics correctness & scalabilty").
Missing Yafang's signoff and my reviewed-by.
> Cc: Shakeel Butt <shakeelb@google.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Yafang Shao <shaoyafang@didiglobal.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> mm/memcontrol.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/mm/memcontrol.c~mm-memcontrol-fix-wrong-statistics-in-memorystat
> +++ a/mm/memcontrol.c
> @@ -3530,12 +3530,13 @@ static int memcg_stat_show(struct seq_fi
> if (memcg1_stats[i] == MEMCG_SWAP && !do_memsw_account())
> continue;
> seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
> - (u64)memcg_page_state(memcg, i) * PAGE_SIZE);
> + (u64)memcg_page_state(memcg, memcg1_stats[i]) *
> + PAGE_SIZE);
> }
>
> for (i = 0; i < ARRAY_SIZE(memcg1_events); i++)
> seq_printf(m, "total_%s %llu\n", memcg1_event_names[i],
> - (u64)memcg_events(memcg, i));
> + (u64)memcg_events(memcg, memcg1_events[i]));
>
> for (i = 0; i < NR_LRU_LISTS; i++)
> seq_printf(m, "total_%s %llu\n", mem_cgroup_lru_names[i],
> _
>
> Patches currently in -mm which might be from laoar.shao@gmail.com are
>
> mm-memcontrol-fix-wrong-statistics-in-memorystat.patch
> mm-vmscan-expose-cgroup_ino-for-memcg-reclaim-tracepoints.patch
> mm-vmscan-add-a-new-member-reclaim_state-in-struct-shrink_control.patch
> mm-vmscan-add-a-new-member-reclaim_state-in-struct-shrink_control-fix.patch
> mm-vmscan-calculate-reclaimed-slab-caches-in-all-reclaim-paths.patch
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-04 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-04 21:02 + mm-memcontrol-fix-wrong-statistics-in-memorystat.patch added to -mm tree akpm
2019-07-04 21:23 ` Shakeel Butt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox