From: Andrew Morton <akpm@linux-foundation.org>
To: Shaohua Li <shli@fb.com>
Cc: linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH] memcg: convert threshold to bytes
Date: Mon, 5 Oct 2015 15:03:01 -0700 [thread overview]
Message-ID: <20151005150301.44e6ba05be5f602f3335a7ee@linux-foundation.org> (raw)
In-Reply-To: <fc100a5a381d1961c3b917489eb82b098d9e0840.1444081366.git.shli@fb.com>
On Mon, 5 Oct 2015 14:44:22 -0700 Shaohua Li <shli@fb.com> 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
That was two years ago. Why hasn't anyone noticed before now?
> ...
>
> --- 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);
--
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-05 22:03 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 [this message]
2015-10-06 17:01 ` Michal Hocko
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=20151005150301.44e6ba05be5f602f3335a7ee@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.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