diff options
author | Mark Johnston <markj@FreeBSD.org> | 2018-04-24 21:15:54 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2018-04-24 21:15:54 +0000 |
commit | 5cd29d0f3cdad565df4c35e3f45825009db26003 (patch) | |
tree | f2f306153e24a67930aeebc81661be7027cb4aa0 /sys/amd64/include | |
parent | 55ba21d4fdd4003bab66e79325f21322307c7ae8 (diff) | |
download | src-5cd29d0f3cdad565df4c35e3f45825009db26003.tar.gz src-5cd29d0f3cdad565df4c35e3f45825009db26003.zip |
Improve VM page queue scalability.
Currently both the page lock and a page queue lock must be held in
order to enqueue, dequeue or requeue a page in a given page queue.
The queue locks are a scalability bottleneck in many workloads. This
change reduces page queue lock contention by batching queue operations.
To detangle the page and page queue locks, per-CPU batch queues are
used to reference pages with pending queue operations. The requested
operation is encoded in the page's aflags field with the page lock
held, after which the page is enqueued for a deferred batch operation.
Page queue scans are similarly optimized to minimize the amount of
work performed with a page queue lock held.
Reviewed by: kib, jeff (previous versions)
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D14893
Notes
Notes:
svn path=/head/; revision=332974
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/vmparam.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index bb8c3221eb6f..abfee488daf4 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -227,4 +227,10 @@ #define ZERO_REGION_SIZE (2 * 1024 * 1024) /* 2MB */ +/* + * Use a fairly large batch size since we expect amd64 systems to have lots of + * memory. + */ +#define VM_BATCHQUEUE_SIZE 31 + #endif /* _MACHINE_VMPARAM_H_ */ |