aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_pidctrl.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | 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
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | 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
* When pidctrl_daemon() is called multiple times within an interval, itAlan Cox2018-06-071-1/+1
| | | | | | | should use the cumulative error to calculate the output. Notes: svn path=/head/; revision=334769
* pidctrl_daemon() implements a variation on the classical, discrete PIDAlan Cox2018-06-071-16/+16
| | | | | | | | | | | | | | | | | | | controller that tries to handle early invocations of the controller, in other words, invocations before the expected end of the interval. However, there were some calculation errors in this early invocation case. Notably, if an early invocation occurred while the error was negative, the derivative term was off by a large amount. One visible effect of this error was that processes were being killed by the virtual memory system's OOM killer when in fact there was plentiful free memory. Correct a couple minor errors in the sysctl descriptions, and apply some style fixes. Reviewed by: jeff, markj Notes: svn path=/head/; revision=334752
* pidctrl Actually use the variables that we assign to as seatbelts to prevent ↵Matt Macy2018-05-191-6/+6
| | | | | | | | | | | divide by zero Reviewed by: jeffr Notes: svn path=/head/; revision=333823
* subr_pidctrl: use standard 2-Clause FreeBSD license and disclaimerEd Maste2018-05-151-12/+12
| | | | | | | Approved by: jeff Notes: svn path=/head/; revision=333618
* Add a generic Proportional Integral Derivative (PID) controller algorithm andJeff Roberson2018-02-231-0/+157
use it to regulate page daemon output. This provides much smoother and more responsive page daemon output, anticipating demand and avoiding pageout stalls by increasing the number of pages to match the workload. This is a reimplementation of work done by myself and mlaier at Isilon. Reviewed by: bsdimp Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D14402 Notes: svn path=/head/; revision=329882