summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_rctl.c
Commit message (Collapse)AuthorAgeFilesLines
* Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu".trasz2012-10-261-0/+48
| | | | It was implemented by Rudolf Tomori during Google Summer of Code 2012.
* Stop treating system processes as special. This fixes panicstrasz2012-04-171-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | like the one triggered by this: # kldload geom_vinum # pwait `pgrep -S gv_worker` & # kldunload geom_vinum or this: GEOM_JOURNAL: Shutting down geom gjournal 3464572051. panic: destroying non-empty racct: 1 allocated for resource 6 which were tracked by jh@ to be caused by checking p->p_flag, while it wasn't initialised yet. Basically, during fork, the code checked p_flag, concluded the process isn't marked as P_SYSTEM, incremented the counter, and later on, when exiting, checked that the process was marked as P_SYSTEM, and thus didn't decrement it. Also, I believe there wasn't any good reason for checking P_SYSTEM in the first place. Tested by: jh
* Enforce upper bound on the input buffer length.trasz2012-04-171-0/+3
| | | | Reported by: Mateusz Guzik
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Fix another bug introduced in r225641, which caused rctl to access certaintrasz2011-10-031-11/+16
| | | | | | fields in 'struct proc' before they got initialized in do_fork(). MFC after: 3 days
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-11/+11
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Fix whitespace.trasz2011-09-071-1/+1
| | | | | Submitted by: amdmi3 Approved by: re (rwatson)
* Work around a kernel panic triggered by forkbomb with an rctl ruletrasz2011-09-061-0/+11
| | | | | | | | such as j:name:maxproc:sigkill=100. Proper fix - deferring psignal to a taskqueue - is somewhat complicated and thus will happen after 9.0. Approved by: re (kib)
* Since r224036 the cputime and wallclock are supposed to be in seconds,trasz2011-09-041-2/+2
| | | | | | not microseconds. Make it so. Approved by: re (kib)
* Rename resource names to match these in login.conf.trasz2011-07-141-15/+15
|
* Style fix - macros are supposed to be uppercase.trasz2011-07-071-6/+6
|
* Remove definitions for RACCT_FSIZE and RACCT_SBSIZE - these two are rathertrasz2011-05-271-2/+0
| | | | | performance-sensitive and not that useful, so I won't be merging them before 9.0.
* Change the way rctl interfaces with jails by introducing prison_raccttrasz2011-05-031-58/+37
| | | | | | 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.
* Rename a misnamed structure field (hr_loginclass), and reorder priv(9)trasz2011-04-101-19/+19
| | | | constants to match the order and naming of syscalls. No functional changes.
* Add rctl. It's used by racct to take user-configurable actions basedtrasz2011-03-301-0/+1850
on the set of rules it maintains and the current resource usage. It also privides userland API to manage that ruleset. Sponsored by: The FreeBSD Foundation Reviewed by: kib (earlier version)
OpenPOWER on IntegriCloud