From: Li Zefan <lizf@cn.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Pavel Emelianov <xemul@openvz.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] res_counter: fix off-by-one bug in setting limit
Date: Mon, 01 Sep 2008 13:43:57 +0800 [thread overview]
Message-ID: <48BB811D.6070106@cn.fujitsu.com> (raw)
In-Reply-To: <20080901143007.9c623ef4.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki wrote:
> On Mon, 01 Sep 2008 13:08:55 +0800
> Li Zefan <lizf@cn.fujitsu.com> wrote:
>
>> I found we can no longer set limit to 0 with 2.6.27-rcX:
>> # mount -t cgroup -omemory xxx /mnt
>> # mkdir /mnt/0
>> # echo 0 > /mnt/0/memory.limit_in_bytes
>> bash: echo: write error: Device or resource busy
>>
>> It turned out 'limit' can't be set to 'usage', which is wrong IMO.
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>
> But setting limit to 0(usage) in memcg is buggy operation unless you want to see OOM..
> Hmm..
>
I used to set 0 limit to test OOM in memcg. I don't think 0 limit is buggy, there's no
much difference with 0 limit and a very low limit.
And the real issue is, now we can set limit to > usage, but not >= usage. It's odd that
usage can reach to limit but limit can't be shrinked to usage.
next prev parent reply other threads:[~2008-09-01 5:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 5:08 [PATCH] res_counter: fix off-by-one bug in setting limit Li Zefan
2008-09-01 5:30 ` KAMEZAWA Hiroyuki
2008-09-01 5:43 ` Li Zefan [this message]
2008-09-01 6:04 ` KAMEZAWA Hiroyuki
2008-09-01 6:28 ` Balbir Singh
2008-09-01 8:55 ` Pavel Emelyanov
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=48BB811D.6070106@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.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