]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve VM page queue scalability.
authormarkj <markj@FreeBSD.org>
Tue, 24 Apr 2018 21:15:54 +0000 (21:15 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 24 Apr 2018 21:15:54 +0000 (21:15 +0000)
commit37d36b67f3db7603a3bbc37a53cd611e754bae4a
treef2f306153e24a67930aeebc81661be7027cb4aa0
parentaaf44aa5e12039cdb57b003317cc6f58855bbf6c
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
sys/amd64/include/vmparam.h
sys/kern/subr_witness.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c
sys/vm/vm_pagequeue.h
sys/vm/vm_phys.c
sys/vm/vm_swapout.c