| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fix style issues around existing SDT probes.
** Changes to sys/netinet/in_kdtrace.c and sys/netinet/in_kdtrace.h skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r275121 (by kib). Only merge the syntax changes from r275121,
PROC_*LOCK() macros still lock the same proc spinlock.
The process spin lock currently has the following distinct uses:
- Threads lifetime cycle, in particular, counting of the threads in
the process, and interlocking with process mutex and thread lock.
The main reason of this is that turnstile locks are after thread
locks, so you e.g. cannot unlock blockable mutex (think process
mutex) while owning thread lock.
- Virtual and profiling itimers, since the timers activation is done
from the clock interrupt context. Replace the p_slock by p_itimmtx
and PROC_ITIMLOCK().
- Profiling code (profil(2)), for similar reason. Replace the p_slock
by p_profmtx and PROC_PROFLOCK().
- Resource usage accounting. Need for the spinlock there is subtle,
my understanding is that spinlock blocks context switching for the
current thread, which prevents td_runtime and similar fields from
changing (updates are done at the mi_switch()). Replace the p_slock
by p_statmtx and PROC_STATLOCK().
Discussed with: kib
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a bug in the CPU % limiting code
If you attempt to set a pcpu limit that is higher than
110% using rctl (for instance, you want a jail to be
able to use 2 cores on your system so you set pcpu to
200%) the thing you are trying to limit becomes unthrottled.
PR: 189870
Submitted by: dustinwenz@ebureau.com
Reviewed by: trasz
|
| |
|
|
|
|
|
|
| |
nit: Rename racct_alloc_resource to racct_adjust_resource.
This is more accurate as the amount can be negative.
|
|
|
|
|
|
|
|
| |
This is a direct commit to 10-STABLE - 11-CURRENT is not affected,
because tunables are automatically fetched there.
MFC after: ASAP
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add kern.racct.enable tunable and RACCT_DISABLED config option.
The point of this is to be able to add RACCT (with RACCT_DISABLED)
to GENERIC, to avoid having to rebuild the kernel to use rctl(8).
MFC r282901:
Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.
Note those two are MFC-ed together, because the latter one changes the
name of RACCT_DISABLED option to RACCT_DEFAULT_TO_DISABLED. Should have
committed the renaming separately...
Relnotes: yes
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
Submitted by: Rudo Tomori
Reviewed by: kib
|
|
|
|
|
|
| |
caused the problem.
Submitted by: mjg
|
|
|
|
|
|
|
|
| |
here is race between decaying the resource usage in containers, and updating
per-process usage; basically, the former may cause per-container usage
to get smaller than per-process usage.
Submitted by: Rudo Tomori
|
|
|
|
| |
Tested by: swills
|
|
|
|
| |
It was implemented by Rudolf Tomori during Google Summer of Code 2012.
|
|
|
|
|
|
|
|
| |
situations, due to fork1() calling racct_proc_exit() without calling
racct_proc_fork() first.
Submitted by: Mateusz Guzik <mjguzik at gmail dot com> (earlier version)
Reviewed by: Mateusz Guzik <mjguzik at gmail dot com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
PR: kern/161552
Reviewed by: trasz
Tested by: Nikos Vassiliadis
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
they would continue using old name, the one jail was created with.
PR: bin/165207
|
|
|
|
|
|
|
|
| |
This should fix the build failure introduced with r228424.
Also remove duplicate inclusion of sys/param.h.
Pointyhat to: avg
MFC after: 1 week
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
| |
and it's more logical this way.
MFC after: 3 days
|
|
|
|
|
|
| |
fields in 'struct proc' before they got initialized in do_fork().
MFC after: 3 days
|
|
|
|
|
|
| |
returned error -- the racct_destroy_locked() would get called twice.
MFC after: 3 days
|
|
|
|
|
|
|
| |
the rctl one - for example, it happens when someone reaches maximum
number of processes in the system.
Approved by: re (kib)
|
| |
|
| |
|
|
|
|
|
| |
performance-sensitive and not that useful, so I won't be merging them
before 9.0.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Submitted by: pjd
|
|
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)
|