aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_pagequeue.h
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2018-02-23 22:51:51 +0000
committerJeff Roberson <jeff@FreeBSD.org>2018-02-23 22:51:51 +0000
commit5f8cd1c0bfac427a058b19b7f4f3fc7962e0be88 (patch)
tree7dac21318eac02c8406a402e8293987e7935fc6f /sys/vm/vm_pagequeue.h
parent16680b6af533546a29e469772d0395aa4aa99ea9 (diff)
downloadsrc-5f8cd1c0bfac427a058b19b7f4f3fc7962e0be88.tar.gz
src-5f8cd1c0bfac427a058b19b7f4f3fc7962e0be88.zip
Add a generic Proportional Integral Derivative (PID) controller algorithm and
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
Notes: svn path=/head/; revision=329882
Diffstat (limited to 'sys/vm/vm_pagequeue.h')
-rw-r--r--sys/vm/vm_pagequeue.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h
index 3e3654cb0cfc..6380ccb22da1 100644
--- a/sys/vm/vm_pagequeue.h
+++ b/sys/vm/vm_pagequeue.h
@@ -73,6 +73,8 @@ struct vm_pagequeue {
const char * const pq_name;
} __aligned(CACHE_LINE_SIZE);
+#include <sys/pidctrl.h>
+struct sysctl_oid;
struct vm_domain {
struct vm_pagequeue vmd_pagequeues[PQ_COUNT];
@@ -83,6 +85,7 @@ struct vm_domain {
long vmd_segs; /* bitmask of the segments */
/* Paging control variables, locked by domain_free_mtx. */
+ struct pidctrl vmd_pid; /* Pageout controller. */
u_int vmd_free_count;
boolean_t vmd_oom;
int vmd_oom_seq;
@@ -113,6 +116,10 @@ struct vm_domain {
u_int vmd_pageout_wakeup_thresh;/* (c) min pages to wake pagedaemon */
u_int vmd_interrupt_free_min; /* (c) reserved pages for int code */
u_int vmd_free_severe; /* (c) severe page depletion point */
+
+ /* Name for sysctl etc. */
+ struct sysctl_oid *vmd_oid;
+ char vmd_name[sizeof(__XSTRING(MAXMEMDOM))];
} __aligned(CACHE_LINE_SIZE);
extern struct vm_domain vm_dom[MAXMEMDOM];