From: Michal Hocko <mhocko@suse.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
mm-commits@vger.kernel.org, zhongjiang-ali@linux.alibaba.com
Subject: Re: + mm-memcontrol-correct-the-nr_anon_thps-counter-of-hierarchical-memcg-fix.patch added to -mm tree
Date: Tue, 27 Oct 2020 08:21:57 +0100 [thread overview]
Message-ID: <20201027072157.GO20500@dhcp22.suse.cz> (raw)
In-Reply-To: <20201026210801.n9JtTzchy%akpm@linux-foundation.org>
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
next parent reply other threads:[~2020-10-27 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201026210801.n9JtTzchy%akpm@linux-foundation.org>
2020-10-27 7:21 ` Michal Hocko [this message]
2020-10-28 23:24 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027072157.GO20500@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=zhongjiang-ali@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®