lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] posix-timers: limit the number of posix timers per process
On Mon, 29 Aug 2011 16:39:15 -0700
Andi Kleen <andi@firstfloor.org> wrote:

> Now this is the main reason I wrote the whole patchkit: previously
> there was no limit on the maximum number of POSIX timers a process
> could allocate. This limits the amount of unswappable kernel memory
> a process can pin down this way.
>
> With the POSIX timer ids being per process we can do this limit
> per process now without allowing one process DoSing another.
>
> I implemented it as a sysctl, not a rlimit for now, because
> there was no clear use case for rlimit.
>
> The 1024 default is completely arbitrary, but seems reasonable
> for now.

Sorry, it should be an rlimit from day one, IMO.

Partly because rlimits are a better implementation.

Partly because if we later do it via rlimit, we're stuck having to
maintain the /proc knob for ever.

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?


\
 
 \ /
  Last update: 2011-08-30 23:47    [W:0.379 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site