From: Jerome Marchand <jmarchan@redhat.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: bsingharora@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC PATCH V2] Enforce RSS+Swap rlimit
Date: Wed, 16 Nov 2011 10:40:33 +0100 [thread overview]
Message-ID: <4EC38511.3020006@redhat.com> (raw)
In-Reply-To: <4EC2FDA9.6050401@jp.fujitsu.com>
On 11/16/2011 01:02 AM, KOSAKI Motohiro wrote:
> On 11/15/2011 8:10 AM, Jerome Marchand wrote:
>>
>> Change since V1: rebase on 3.2-rc1
>>
>> Currently RSS rlimit is not enforced. We can not forbid a process to exceeds
>> its RSS limit and allow it swap out. That would hurts the performance of all
>> system, even when memory resources are plentiful.
>>
>> Therefore, instead of enforcing a limit on rss usage alone, this patch enforces
>> a limit on rss+swap value. This is similar to memsw limits of cgroup.
>> If a process rss+swap usage exceeds RLIMIT_RSS max limit, he received a SIGBUS
>> signal.
>
> No good idea.
> - RLIMIT_RSS has clear definition and this patch break it. you should makes
> another rlimit at least.
I couldn't decide if we needed a new rlimit or not. I shall admit that I chose
the lazy option. If that's a problem, I can add a new rlimit, RLIMIT_MEMSW for
instance.
> - SIGBUS can be ignored. rlimit shouldn't ignorable.
The SIGBUS can be ignored, not the rlimit: if RLIMIT_RSS is exceeded, the process
does not the memory it requested. The SIGBUS is here to notify the process that
something wrong has happened.
Thanks,
Jerome
next prev parent reply other threads:[~2011-11-16 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 14:45 [RFC PATCH] Enforce RSS+Swap rlimit Jerome Marchand
2011-11-15 13:10 ` [RFC PATCH V2] " Jerome Marchand
2011-11-16 0:02 ` KOSAKI Motohiro
2011-11-16 9:40 ` Jerome Marchand [this message]
2011-11-16 10:09 ` Balbir Singh
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=4EC38511.3020006@redhat.com \
--to=jmarchan@redhat.com \
--cc=bsingharora@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).