From: Michal Hocko <mhocko@kernel.org>
To: Shaohua Li <shli@fb.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] memcg: convert threshold to bytes
Date: Tue, 6 Oct 2015 19:01:23 +0200 [thread overview]
Message-ID: <20151006170122.GB2752@dhcp22.suse.cz> (raw)
In-Reply-To: <fc100a5a381d1961c3b917489eb82b098d9e0840.1444081366.git.shli@fb.com>
On Mon 05-10-15 14:44:22, Shaohua Li wrote:
> The page_counter_memparse() returns pages for the threshold, while
> mem_cgroup_usage() returns bytes for memory usage. Convert the threshold
> to bytes.
>
> Looks a regression introduced by 3e32cb2e0a12b69150
Yes. This suggests
Cc: stable # 3.19+
> Signed-off-by: Shaohua Li <shli@fb.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks!
> ---
> mm/memcontrol.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 1fedbde..d9b5c81 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3387,6 +3387,7 @@ static int __mem_cgroup_usage_register_event(struct mem_cgroup *memcg,
> ret = page_counter_memparse(args, "-1", &threshold);
> if (ret)
> return ret;
> + threshold <<= PAGE_SHIFT;
>
> mutex_lock(&memcg->thresholds_lock);
>
> --
> 2.4.6
>
> --
> 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>
--
Michal Hocko
SUSE Labs
--
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>
next prev parent reply other threads:[~2015-10-06 17:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 21:44 Shaohua Li
2015-10-05 22:03 ` Andrew Morton
2015-10-06 17:01 ` Michal Hocko [this message]
2015-10-06 19:22 ` Andrew Morton
2015-10-07 7:30 ` Michal Hocko
2015-10-07 7:58 ` Andrew Morton
2015-10-07 8:30 ` Michal Hocko
2015-10-07 15:25 ` Shaohua Li
2015-10-07 15:56 ` Greg Thelen
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=20151006170122.GB2752@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=shli@fb.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