* + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree
@ 2020-10-26 21:08 akpm
2020-10-27 7:21 ` Michal Hocko
0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2020-10-26 21:08 UTC (permalink / raw)
To: akpm, hannes, mhocko, mm-commits, zhongjiang-ali
The patch titled
Subject: mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
has been added to the -mm tree. Its filename is
mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.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: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
fix printk warning
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: zhongjiang-ali <zhongjiang-ali@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memcontrol.c~mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
+++ a/mm/memcontrol.c
@@ -4107,7 +4107,7 @@ static int memcg_stat_show(struct seq_fi
if (memcg1_stats[i] == NR_ANON_THPS)
nr *= HPAGE_PMD_NR;
#endif
- seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
+ seq_printf(m, "total_%s %lu\n", memcg1_stat_names[i],
nr * PAGE_SIZE);
}
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
mm.patch
mm-swap_state-skip-meaningless-swap-cache-readahead-when-ra_infowin-==-0-fix.patch
mmoom_kill-fix-the-comment-of-is_dump_unreclaim_slabs-fix.patch
mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix-2.patch
lib-test_bitmapc-add-for_each_set_clump-test-cases-checkpatch-fixes.patch
kernel-forkc-export-kernel_thread-to-modules.patch
mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree
2020-10-26 21:08 + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree akpm
@ 2020-10-27 7:21 ` Michal Hocko
2020-10-28 23:24 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2020-10-27 7:21 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, hannes, mm-commits, zhongjiang-ali
On Mon 26-10-20 14:08:01, Andrew Morton wrote:
[...]
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
>
> fix printk warning
>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: zhongjiang-ali <zhongjiang-ali@linux.alibaba.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/mm/memcontrol.c~mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
> +++ a/mm/memcontrol.c
> @@ -4107,7 +4107,7 @@ static int memcg_stat_show(struct seq_fi
> if (memcg1_stats[i] == NR_ANON_THPS)
> nr *= HPAGE_PMD_NR;
> #endif
> - seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
> + seq_printf(m, "total_%s %lu\n", memcg1_stat_names[i],
> nr * PAGE_SIZE);
Shouldn't we cast to u64 instead? 32b systems with a lot of memory are
quite rare but going over 4G here is not something unimaginable. The
similar is true for other counters.
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree
2020-10-27 7:21 ` Michal Hocko
@ 2020-10-28 23:24 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2020-10-28 23:24 UTC (permalink / raw)
To: Michal Hocko; +Cc: linux-kernel, hannes, mm-commits, zhongjiang-ali
On Tue, 27 Oct 2020 08:21:57 +0100 Michal Hocko <mhocko@suse.com> wrote:
> > --- a/mm/memcontrol.c~mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix
> > +++ a/mm/memcontrol.c
> > @@ -4107,7 +4107,7 @@ static int memcg_stat_show(struct seq_fi
> > if (memcg1_stats[i] == NR_ANON_THPS)
> > nr *= HPAGE_PMD_NR;
> > #endif
> > - seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
> > + seq_printf(m, "total_%s %lu\n", memcg1_stat_names[i],
> > nr * PAGE_SIZE);
>
> Shouldn't we cast to u64 instead? 32b systems with a lot of memory are
> quite rare but going over 4G here is not something unimaginable. The
> similar is true for other counters.
Sure..
--- a/mm/memcontrol.c~mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix-fix
+++ a/mm/memcontrol.c
@@ -4119,8 +4119,8 @@ static int memcg_stat_show(struct seq_fi
if (memcg1_stats[i] == NR_ANON_THPS)
nr *= HPAGE_PMD_NR;
#endif
- seq_printf(m, "total_%s %lu\n", memcg1_stat_names[i],
- nr * PAGE_SIZE);
+ seq_printf(m, "total_%s %llu\n", memcg1_stat_names[i],
+ (u64)nr * PAGE_SIZE);
}
for (i = 0; i < ARRAY_SIZE(memcg1_events); i++)
_
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-28 23:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 21:08 + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree akpm
2020-10-27 7:21 ` Michal Hocko
2020-10-28 23:24 ` Andrew Morton
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.