Subject: Re: Fork bomb protection patch
To: Matthew Mondor <mmondor@gobot.ca>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 12/16/2002 21:00:20
Matthew Mondor wrote:
> On Thu, Dec 05, 2002 at 02:50:24PM -0500, Gary Thorpe wrote:
> 
> > Would lowering the process priority of the offending process
> > temporarily be a good alternative to sleeping or is it all just a bad
> > idea? Would cpu hogs get lowered priorities anyway, making this
> > unneeded?
> 
> Some seem to reply to this that it isn't consistant with traditional
> UNIX behavior, others that the kernel already has all necessary
> restrictions implemented...
> 
> I therefore seem to see the same problem, and as well suggest a
> kernel solution (not a hack). This .5s sleep appears like an
> incomplete hack to cope with a larger problem at hand which
> hasn't been dealt with properly at the scheduler level.

FWIW, the inconditional 0.5s sleep thing was changed
so that it's possible to set the length via sysctl (kern.forkfsleep,
in ms), with default zero (no sleep).

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-