From: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
To: Qiang Huang <h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
handai.szj-3b8fjiQLQpfQT0dZR+AlfA@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
jeff.liu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH 1/4] memcg: correct RESOURCE_MAX to ULLONG_MAX
Date: Wed, 31 Jul 2013 10:00:12 +0200 [thread overview]
Message-ID: <20130731080012.GE30514@dhcp22.suse.cz> (raw)
In-Reply-To: <1375255885-10648-2-git-send-email-h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On Wed 31-07-13 15:31:22, Qiang Huang wrote:
> Current RESOURCE_MAX is ULONG_MAX, but the value we used to set resource
> limit is unsigned long long, so we can set bigger value than that which
> is strange. The XXX_MAX should be reasonable max value, bigger than that
> should be overflow.
>
> Notice that this change will affect user output of default *.limit_in_bytes:
> before change:
> $ cat /cgroup/memory/memory.limit_in_bytes
> 9223372036854775807
>
> after change:
> $ cat /cgroup/memory/memory.limit_in_bytes
> 18446744073709551615
>
> But it doesn't alter the API in term of input - we can still use
> "echo -1 > *.limit_in_bytes" to reset the numbers to "unlimited".
>
> Signed-off-by: Sha Zhengju <handai.szj-3b8fjiQLQpfQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Qiang Huang <h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
I thought this would be better marked as cgroup wide change but memcg
seems to be the only user currently
Acked-by: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
> ---
> include/linux/res_counter.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
> index 96a509b..586bc7c 100644
> --- a/include/linux/res_counter.h
> +++ b/include/linux/res_counter.h
> @@ -54,7 +54,7 @@ struct res_counter {
> struct res_counter *parent;
> };
>
> -#define RESOURCE_MAX (unsigned long long)LLONG_MAX
> +#define RESOURCE_MAX ULLONG_MAX
>
> /**
> * Helpers to interact with userspace
> --
> 1.8.3
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2013-07-31 8:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 7:31 [PATCH 0/4] memcg: fix memcg resource limit overflow issues Qiang Huang
[not found] ` <1375255885-10648-1-git-send-email-h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-07-31 7:31 ` [PATCH 1/4] memcg: correct RESOURCE_MAX to ULLONG_MAX Qiang Huang
[not found] ` <1375255885-10648-2-git-send-email-h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-07-31 8:00 ` Michal Hocko [this message]
2013-07-31 7:31 ` [PATCH 2/4] memcg: rename RESOURCE_MAX to RES_COUNTER_MAX Qiang Huang
2013-07-31 8:02 ` Michal Hocko
2013-07-31 7:31 ` [PATCH 3/4] memcg: avoid overflow caused by PAGE_ALIGN Qiang Huang
2013-07-31 8:14 ` Michal Hocko
2013-07-31 7:31 ` [PATCH 4/4] memcg: reduce function dereference Qiang Huang
2013-07-31 8:20 ` Michal Hocko
2013-07-31 8:23 ` [PATCH 0/4] memcg: fix memcg resource limit overflow issues Sha Zhengju
[not found] ` <CAFj3OHX4WLaecyE_zFbnFKs9wrCWTq2eDAUDMxqPg8=TYt18gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-31 8:51 ` Qiang Huang
[not found] ` <51F8D016.4090009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-07-31 8:54 ` Li Zefan
[not found] ` <51F8D0E1.4010007-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-07-31 9:02 ` Qiang Huang
2013-07-31 9:34 ` Jeff Liu
2013-07-31 9:51 ` Li Zefan
2013-07-31 9:39 ` Sha Zhengju
2013-07-31 9:50 ` Michal Hocko
[not found] ` <20130731095010.GA5012-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2013-07-31 10:04 ` Sha Zhengju
[not found] ` <CAFj3OHUEVM+BtoYS8wbXRU42Q8_=1X5qaQm7QY8oBc=ONAdfOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-31 9:51 ` Qiang Huang
2013-07-31 9:28 ` Sha Zhengju
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=20130731080012.GE30514@dhcp22.suse.cz \
--to=mhocko-alswssmvlrq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=h.huangqiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=handai.szj-3b8fjiQLQpfQT0dZR+AlfA@public.gmane.org \
--cc=jeff.liu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org \
/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