Commit Graph

12 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
c0c0936205 Actually enforce limit for inheritable resources on fork.
MFC after:	3 days
2011-10-04 14:56:33 +00:00
Edward Tomasz Napierala
2d8696d1e8 Move some code inside the racct_proc_fork(); it spares a few lock operations
and it's more logical this way.

MFC after:	3 days
2011-10-03 17:40:55 +00:00
Edward Tomasz Napierala
72a401d918 Fix another bug introduced in r225641, which caused rctl to access certain
fields in 'struct proc' before they got initialized in do_fork().

MFC after:	3 days
2011-10-03 16:23:20 +00:00
Edward Tomasz Napierala
ac6fafe6c2 Fix bug introduced in r225641, which would cause panic if racct_proc_fork()
returned error -- the racct_destroy_locked() would get called twice.

MFC after:	3 days
2011-10-03 15:32:15 +00:00
Edward Tomasz Napierala
2419d7f93b Fix panic that happens when fork(2) fails due to a limit other than
the rctl one - for example, it happens when someone reaches maximum
number of processes in the system.

Approved by:	re (kib)
2011-09-03 08:08:24 +00:00
Edward Tomasz Napierala
85a2f1b4f2 Rename resource names to match these in login.conf. 2011-07-14 19:18:17 +00:00
Edward Tomasz Napierala
4fe8477539 Style fix - macros are supposed to be uppercase. 2011-07-07 17:44:42 +00:00
Edward Tomasz Napierala
7e2548ae0a Remove definitions for RACCT_FSIZE and RACCT_SBSIZE - these two are rather
performance-sensitive and not that useful, so I won't be merging them
before 9.0.
2011-05-27 19:57:58 +00:00
Edward Tomasz Napierala
a7ad07bff3 Change the way rctl interfaces with jails by introducing prison_racct
structure, which acts as a proxy between them.  This makes jail rules
persistent, i.e. they can be added before jail gets created, and they
don't disappear when the jail gets destroyed.
2011-05-03 07:32:58 +00:00
Edward Tomasz Napierala
c98fe0a557 Add missing stubs. 2011-04-05 19:50:34 +00:00
Edward Tomasz Napierala
d31b45e164 Remove pointless (always true) KASSERTs.
Submitted by:	pjd
2011-03-29 19:19:10 +00:00
Edward Tomasz Napierala
097055e26d Add racct. It's an API to keep per-process, per-jail, per-loginclass
and per-loginclass resource accounting information, to be used by the new
resource limits code.  It's connected to the build, but the code that
actually calls the new functions will come later.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-03-29 17:47:25 +00:00