#
fdafd315 |
|
24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
|
#
95ee2897 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
|
10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
|
#
c6d31b83 |
|
18-Jul-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
AST: rework Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For instance, signal delivery code on return to userspace is now moved to kern_sig.c. Also, it allows to have some handlers designated as the cleanup (kclear) type, which are called both at AST and on thread/process exit. For instance, ast(), exit1(), and NFS server no longer need to be aware about UFS softdep processing. The dynamic registration also allows third-party modules to register AST handlers if needed. There is one caveat with loadable modules: the code does not make any effort to ensure that the module is not unloaded before all threads processed through AST handler in it. In fact, this is already present behavior for hwpmc.ko and ufs.ko. I do not think it is worth the efforts and the runtime overhead to try to fix it. Reviewed by: markj Tested by: emaste (arm64), pho Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
|
#
bce7ee9d |
|
28-Oct-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Drop "All rights reserved" from all my stuff. This includes Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980
|
#
448db4f7 |
|
07-Dec-2018 |
Mateusz Guzik <mjg@FreeBSD.org> |
racct: add RACCT_ENABLED macro and racct_set_unlocked This allows to remove PROC_LOCK/UNLOCK pairs spread thorought the kernel only used to appease racct_set. Sponsored by: The FreeBSD Foundation
|
#
eec8d0a3 |
|
28-Nov-2018 |
Mateusz Guzik <mjg@FreeBSD.org> |
Convert racct_enable to bool and annotate as __read_frequently Sponsored by: The FreeBSD Foundation
|
#
64cf6a62 |
|
28-Nov-2018 |
Mateusz Guzik <mjg@FreeBSD.org> |
Deinline racct throttling out of syscall exit path. racct is not enabled by default and even when it is enabled processes are typically not throttled. The order of checks is left unchanged since racct_enable will be annotated as __read_frequently, while checking for the flag in the processes would probably require an extra fetch. Sponsored by: The FreeBSD Foundation
|
#
2554f86a |
|
17-Sep-2018 |
Mateusz Guzik <mjg@FreeBSD.org> |
vm: stop taking proc lock in mmap to satisfy racct if it is disabled Limits can be safely obtained with lim_cur from the thread. racct is compiled in but disabled by default. Note that racct enablement is a boot-only tunable. This eliminates second most common place of taking the lock while pkg building. While here don't take the lock in mlockall either. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17210
|
#
c4e20cad |
|
27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/sys: further adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
|
#
bbe4eb6d |
|
21-Apr-2016 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Get rid of rctl_lock; use racct_lock where appropriate. The fast paths already required both of them, so having a separate rctl_lock didn't buy us anything. Reviewed by: mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5914
|
#
8691cc73 |
|
19-Apr-2016 |
Conrad Meyer <cem@FreeBSD.org> |
Make Racct macro slightly more gracious given RACCT_UNDEFINED rctl_string_to_rule could previously index below the zeroth element of racct_types via the macro. Maybe it shouldn't use the macro on RACCT_UNDEFINED. But given every other RACCT_ definition is non-negative, it seems pretty easy to foot-shoot this one without the check. Reported by: Coverity CID: 1305574 Sponsored by: EMC / Isilon Storage Division
|
#
ae34b6ff |
|
06-Apr-2016 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add four new RCTL resources - readbps, readiops, writebps and writeiops, for limiting disk (actually filesystem) IO. Note that in some cases these limits are not quite precise. It's ok, as long as it's within some reasonable bounds. Testing - and review of the code, in particular the VFS and VM parts - is very welcome. MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5080
|
#
c4563b16 |
|
31-Mar-2016 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Improve comments. MFC after: 1 month Sponsored by: The FreeBSD Foundation
|
#
2b4035ee |
|
08-Nov-2015 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Speed up rctl(8) rule retrieval; the difference shows mostly in "rctl -n", as otherwise most of the time is spent resolving UIDs to names. Reviewed by: mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4059
|
#
4b5c9cf6 |
|
29-Apr-2015 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
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). Differential Revision: https://reviews.freebsd.org/D2369 Reviewed by: kib@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation
|
#
dff9862c |
|
23-Nov-2014 |
Mateusz Guzik <mjg@FreeBSD.org> |
ifdef RACCT ui_racct_foreach and struct uidinfo's ui_racct Change racct_ create and destroy to macros evaluating to nothing without RACCT so that their callers passing ui_racct don't have to be ifdefed.
|
#
dd2390be |
|
05-Oct-2014 |
Mateusz Guzik <mjg@FreeBSD.org> |
Convert racct stubs to inline functions. This saves some symbols and function calls for kernel without RACCT. MFC after: 1 week
|
#
36af9869 |
|
26-Oct-2012 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu". It was implemented by Rudolf Tomori during Google Summer of Code 2012.
|
#
c34bbd2a |
|
06-Mar-2012 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Make racct and rctl correctly handle jail renaming. Previously they would continue using old name, the one jail was created with. PR: bin/165207
|
#
72a401d9 |
|
03-Oct-2011 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
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
|
#
85a2f1b4 |
|
14-Jul-2011 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Rename resource names to match these in login.conf.
|
#
4fe84775 |
|
07-Jul-2011 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Style fix - macros are supposed to be uppercase.
|
#
7e2548ae |
|
27-May-2011 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
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.
|
#
097055e2 |
|
29-Mar-2011 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
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)
|