public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Resource limits
@ 2005-09-25 14:12 Al Boldi
  2005-09-26  3:36 ` Rik van Riel
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Al Boldi @ 2005-09-25 14:12 UTC (permalink / raw)
  To: linux-kernel


Resource limits in Linux, when available, are currently very limited.

i.e.:
Too many process forks and your system may crash.
This can be capped with threads-max, but may lead you into a lock-out.

What is needed is a soft, hard, and a special emergency limit that would 
allow you to use the resource for a limited time to circumvent a lock-out.

Would this be difficult to implement?

Thanks!

--
Al


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Resource limits
@ 2002-10-24 12:13 Frank Cornelis
  2002-10-24 16:46 ` Randolph Bentson
  0 siblings, 1 reply; 24+ messages in thread
From: Frank Cornelis @ 2002-10-24 12:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Frank.Cornelis

Hi,

Wouldn't it make sense that somewhere in kernel/fork.c:dup_task_struct we 
copy the resource limits as follows.
	int i;
	for (i = 0; i < RLIM_NLIMITS; i++)
		tsk->rlim[i].rlim_cur =
			tsk->rlim[i].rlim_max =
			orig->rlim[i].rlim_cur;
This way a parent process is able to temporary drop some of its limits in 
order to make a restricted child process and restore its resource limits 
afterwards. Currenly it is not possible to make a child process with 
smaller resource limits than the parent process without the parent process 
losing its (hard) max limits (As far as I know, correct me if I'm wrong). 
I could very much use this to control core dumping of child processes in 
a better way. Of course I don't know to what extent this will break 
things. POSIX???...couldn't find anything on it.

Please CC me.

Frank.


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-09-27 21:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-25 14:12 Resource limits Al Boldi
2005-09-26  3:36 ` Rik van Riel
2005-09-26 14:18   ` Al Boldi
2005-09-26 15:56     ` Neil Horman
2005-09-26 17:32       ` Al Boldi
2005-09-26 17:51         ` Neil Horman
2005-09-26 20:26           ` Al Boldi
2005-09-27  1:05             ` Neil Horman
2005-09-27  5:08               ` Al Boldi
2005-09-27 12:08                 ` Neil Horman
2005-09-27 13:42                   ` Al Boldi
2005-09-27 14:36                     ` Neil Horman
2005-09-27 15:50                       ` Al Boldi
2005-09-27 17:25                         ` Neil Horman
2005-09-27 21:35                 ` Chandra Seetharaman
2005-09-26 12:28 ` Neil Horman
2005-09-26 14:44 ` Roger Heflin
2005-09-26 17:11   ` Alan Cox
2005-09-26 17:32     ` Al Boldi
2005-09-26 21:21     ` Roger Heflin
2005-09-27  3:50   ` Coywolf Qi Hunt
2005-09-26 19:07 ` Matthew Helsley
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24 12:13 Frank Cornelis
2002-10-24 16:46 ` Randolph Bentson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox