linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH 2/4] posix-timers: limit the number of posix timers per process
Date: Tue, 30 Aug 2011 15:22:16 -0700	[thread overview]
Message-ID: <20110830152216.dffd3cc3.akpm@linux-foundation.org> (raw)
In-Reply-To: <4E5D5EE6.3070708@linux.intel.com>

On Tue, 30 Aug 2011 15:06:30 -0700
Andi Kleen <ak@linux.intel.com> wrote:

> 
> > Sorry, it should be an rlimit from day one, IMO.
> >
> 
> Ok.
> 
> > Partly because rlimits are a better implementation.
> 
> The reason I went with a sysctl is that rlimits are more intrusive for 
> user space,
> requires special tools or patching bash.

Yes, deployment for new rlimits is a big PITA.  It would be sensible to
modify the shells to take some anonymous numeric argument, so you could
do

	ulimit 42 1000

to set rlimit number 42 if your shell version doesn't understand the
symbolic representation of more recent additions.  Who do I call?

There was code floating about which would permit rlimits to be modified
from other processes, perhaps by making /proc/pid/limits writable.  I
don't think it got merged.  I have a vague feeling that this might be
my fault.

> > Partly because once rlimits are added, the /proc knob no longer has any
> > sane behaviour.  Does it only modify /sbin/init?  Does it do a global
> > process walk, modifying all threads?
> 
> There's no way to modify: you would need to kill the process or randomly
> take timers away. The limit only applies to new timers.

Sure, it applies to new timers.  My concern is: what does a write to
the old /proc knob _do_?  Modify all the system's task_struct.rlim[],
overwriting whatever was there?  Something else?  It would need to at
least roughly emulate the old behaviour.


  reply	other threads:[~2011-08-30 22:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 23:39 [PATCH 1/4] posix-timers: move global timer id management to signal_struct v2 Andi Kleen
2011-08-29 23:39 ` [PATCH 2/4] posix-timers: limit the number of posix timers per process Andi Kleen
2011-08-30 21:44   ` Andrew Morton
2011-08-30 22:06     ` Andi Kleen
2011-08-30 22:22       ` Andrew Morton [this message]
2011-08-30 22:47         ` Andi Kleen
2011-08-30 23:02           ` Andrew Morton
2011-08-31  6:45             ` Jiri Slaby
2011-09-02  9:30   ` Thomas Gleixner
2011-08-29 23:39 ` [PATCH 3/4] posix-timers: Don't disable interrupts in idr_lock Andi Kleen
2011-08-29 23:39 ` [PATCH 4/4] posix-timers: turn it_signal into it_valid flag Andi Kleen
2011-09-02 10:06   ` Thomas Gleixner
2011-09-02 11:49     ` Eric Dumazet
2011-09-02 14:19       ` Thomas Gleixner
2011-09-04 16:56     ` Oleg Nesterov
2011-09-04 19:07       ` Andi Kleen
2011-09-04 20:29       ` Oleg Nesterov
2011-09-06  3:14         ` Andi Kleen
2011-09-06 14:51           ` Oleg Nesterov
2011-09-06 15:39             ` Eric Dumazet
2011-09-06 16:27               ` Oleg Nesterov
2011-09-06 18:47               ` Thomas Gleixner
2011-09-06 18:49                 ` Oleg Nesterov
2011-09-06 19:16                   ` Thomas Gleixner
2011-09-06 19:26                     ` Oleg Nesterov
2011-09-06 19:45                       ` Thomas Gleixner
2011-09-06 22:08                         ` Oleg Nesterov
2011-09-06 22:34                           ` Thomas Gleixner
2011-09-21 16:46                           ` Thomas Gleixner
2011-09-21 17:56                             ` Thomas Gleixner
2011-09-22 11:19                               ` Thomas Gleixner
2011-09-06 19:30                     ` Eric Dumazet
2011-09-06 20:10                       ` Thomas Gleixner
2011-09-06 20:27                         ` Eric Dumazet
2011-09-06 19:04                 ` Eric Dumazet
2011-08-31  8:53 ` [PATCH 1/4] posix-timers: move global timer id management to signal_struct v2 Eric Dumazet
2011-08-31 16:57   ` Andi Kleen
2011-09-02  9:19 ` Thomas Gleixner
2011-09-02 10:05   ` Eric Dumazet
2011-09-19 21:46   ` Andi Kleen

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=20110830152216.dffd3cc3.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.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).