Commit graph

72 commits

Author SHA1 Message Date
Warner Losh 5e3934b15a usr.bin: 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
2023-11-26 22:24:01 -07:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Warner Losh 4d846d260e 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
2023-05-12 10:44:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Edward Tomasz Napierala bce7ee9d41 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
2020-10-28 13:46:11 +00:00
Mateusz Guzik 0a17b9e03e rctl: fix sysctl kern.racct.enable use after r341182
The value was changed from int to bool. Since the new type
is smaller, the rest of the variable in the caller was left
unitialized.

PR:		236714
Reported by:	trasz
Diagnosed by:	markj
Sponsored by:	The FreeBSD Foundation
2019-04-03 20:37:14 +00:00
Eitan Adler bd67d6b2b1 rctl: correct use of "vmem" instead of "vmemoryuse"
Submitted by:	Jamie Landeg-Jones <jamie@catflap.org>
PR:		228482
MFC after:	1 month
2018-05-25 13:40:07 +00:00
Edward Tomasz Napierala f9f0cd1f00 .Xr rctl(8) and cpuset(1).
PR:		225935
Submitted by:	D. Ebdrup <debdrup at gmail.com> (earlier version)
MFC after:	2 weeks
2018-02-26 18:04:17 +00:00
Pedro F. Giffuni 1de7b4b805 various: general 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.

No functional change intended.
2017-11-27 15:37:16 +00:00
Baptiste Daroussin d0ab9cbec0 Remove __unused attributed on arguments that are actually used
MFC after:	3 days
2017-11-11 15:18:25 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Edward Tomasz Napierala f26315bd9e Use proper capitalization with .Dd.
Submitted by:	oshogbo
MFC after:	2 weeks
2017-06-01 15:03:43 +00:00
Edward Tomasz Napierala f2e34224fa Declutter rctl(8) by moving kernel build instructions into newly
created rctl(4).

MFC after:	2 weeks
2017-05-28 17:25:47 +00:00
Edward Tomasz Napierala 859f4b702e Random tweaks to rctl(8).
MFC after:	2 weeks
2017-05-28 17:13:38 +00:00
Edward Tomasz Napierala ae34b6ff96 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
2016-04-07 04:23:25 +00:00
Enji Cooper c281fdb153 Fix typos in error messages dealing with unknown groups/users
MFC after: 1 month
X-MFC with: r291447, r291452
Sponsored by: EMC / Isilon Storage Division
2015-12-01 19:37:24 +00:00
Edward Tomasz Napierala 508744b2b1 Fix rctl rule filters - eg the 'rctl -r :' case.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-12-01 14:02:14 +00:00
Edward Tomasz Napierala 5c859bfb63 Improve error reporting to clearly show problematic rules.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 13:14:45 +00:00
Edward Tomasz Napierala 4cf0d89598 Simplify rule retrieval and improve error handling.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:33:56 +00:00
Edward Tomasz Napierala 5e7a25553c Fix some memory management problems.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:21:02 +00:00
Edward Tomasz Napierala f4e361a725 Handle asprintf(3) errors in a standards-compliant way.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:09:12 +00:00
Edward Tomasz Napierala 0971623e61 Rewrite the rctl(8) utility to make it possible to add multiple rules
in a single run.  This speeds up operation with large rulesets.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 12:01:36 +00:00
Edward Tomasz Napierala 478f7a726b User and group identifiers the rctl(8) utility receives from the kernel
are always in numeric form; don't try to resolve them by names.  This
speeds up rule listing with large rulesets by about 50%.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-29 11:30:17 +00:00
Edward Tomasz Napierala 18e1f46eae Make rctl(8) use more reasonable buffer size for retrieving the rules.
Reviewed by:	mjg@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-05 19:15:39 +00:00
Edward Tomasz Napierala 6ced1f7802 Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-05 17:26:56 +00:00
Edward Tomasz Napierala d051ac804a Make it clear that 'swapuse' is swap reservation and not actual swap usage.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-14 15:37:19 +00:00
Joel Dahl 37cba721ff mdoc: add missing .El 2015-07-14 19:43:10 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Edward Tomasz Napierala ba8f0eb8fc 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.

Differential Revision:	https://reviews.freebsd.org/D2407
Reviewed by:	emaste@, wblock@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-14 14:03:55 +00:00
Edward Tomasz Napierala 82224d7df8 Remove spurious period.
MFC after:	1 month
Sponsored by:	International OCD Foun^W^W^WThe FreeBSD Foundation
2015-04-29 17:01:28 +00:00
Edward Tomasz Napierala aae2a24b49 Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:41:49 +00:00
Baptiste Daroussin 3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Edward Tomasz Napierala aaa995f25c Fix typo.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-09-11 19:54:30 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin 2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty 3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Edward Tomasz Napierala 1de5b5eb55 Mention that rctl(8) was sponsored by the Foundation.
Sponsored by:	The FreeBSD Foundation
2014-02-16 08:42:52 +00:00
Bryan Drewery c0a04e017b Rework rctl(8) manpage
- Note that kernel options are required
- Shift parameters around in SYNOPSIS to make it more clear that there are
  different modes
- For all literal symbols such as 'process' or 'loginclass' or 'wallclock',
  etc, make them into bold symbols with .Sy
- For each subject:subject-id:etc: use .Em to underline to make it more clear
  they relate to the rule syntax
- Document how devd(8) support works
- Move RSS warning to BUGS and replace RSS with 'memoryuse' since 'RSS' is not
  defined in the manpage
- Add more examples around listing existing rules
- Make rule syntax into a list to improve readability
- Add a list of subjects and their corresponding subject-id same as
  RESOURCES/ACTIONS have lists
- Note that rctl(8) takes affect on all current and future processes
- Note that amount can take human numbers
- Add reference to login.conf(5) in few places login class is mentioned

Reviewed by:	trasz
Approved by:	bapt (mentor)
MFC after:	1 week
2014-02-15 14:56:50 +00:00
Simon J. Gerraty 69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Joel Dahl 2063b2c09b Minor spelling and grammar fixes. 2013-04-11 19:05:24 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00