linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sha Zhengju <handai.szj@gmail.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Cgroups <cgroups@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	Andrew Morton <akpm@linux-foundation.org>,
	jeff.liu@oracle.com, Sha Zhengju <handai.szj@taobao.com>
Subject: Re: [PATCH 1/3] memcg: correct RESOURCE_MAX to ULLONG_MAX and rename it to a better one
Date: Tue, 7 May 2013 23:10:31 +0800	[thread overview]
Message-ID: <CAFj3OHVVPLQnOKFFdV6pu7mP=8W6mKUusvaBU8aspRZeUNBaOw@mail.gmail.com> (raw)
In-Reply-To: <20130507134004.GB9497@dhcp22.suse.cz>

Hi Michal,

On Tue, May 7, 2013 at 9:40 PM, Michal Hocko <mhocko@suse.cz> wrote:
> On Sun 05-05-13 23:41:17, Sha Zhengju wrote:
>> Current RESOURCE_MAX(unlimited) is ULONG_MAX, but we can set a bigger value
>
> You have a typo here. The current limit is LLONG_MAX
>
>> than it which is strange. This patch fix it to UULONG_MAX.
>
> and the new one is ULLONG_MAX

Oops... It was most thoughtless of me.

>
>> Notice that this change will affect user output of default *.limit_in_bytes:
>> before change:
>> $ cat /memcg/memory.limit_in_bytes
>> 9223372036854775807
>>
>> after change:
>> $ cat /memcg/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".
>>
>> Thanks the suggestions from Andrew and Daisuke Nishimura!
>>
>> Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
>
> For the default change
> Acked-by: Michal Hocko <mhocko@suse.cz>

Thanks!

>
>> ---
>>  include/linux/res_counter.h |    2 +-
>>  kernel/res_counter.c        |    8 ++++----
>>  mm/memcontrol.c             |    4 ++--
>>  net/ipv4/tcp_memcontrol.c   |   10 +++++-----
>>  4 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
>> index c230994..d7e9056 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 RES_COUNTER_MAX ULLONG_MAX
>
> I do not think the renaming is worth bothering but if you feel it is a
> better match then just do it in a separate patch, please.

I've received comments from Andrew that he suggested we had better
rename it since it is too general. (Sorry, it's my fault that I didn't
mention the change log from V1, I will take care next time. The
previous discussion is here:
http://www.spinics.net/lists/cgroups/msg06788.html). I think we might
as well do it and I'll separate it in next turn.

--
Thanks,
Sha

--
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>

      reply	other threads:[~2013-05-07 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-05 15:41 [PATCH 1/3] memcg: correct RESOURCE_MAX to ULLONG_MAX and rename it to a better one Sha Zhengju
2013-05-07 13:40 ` Michal Hocko
2013-05-07 15:10   ` Sha Zhengju [this message]

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='CAFj3OHVVPLQnOKFFdV6pu7mP=8W6mKUusvaBU8aspRZeUNBaOw@mail.gmail.com' \
    --to=handai.szj@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=handai.szj@taobao.com \
    --cc=jeff.liu@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /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;
as well as URLs for NNTP newsgroup(s).