git: DragonFly_RELEASE_5_8 kernel - Reduce SMP contention during low-memory stress
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Feb 28 09:16:46 PST 2020
commit c28c2bcfa89bf3c6fa351296c2a7a9b29f93c0ac
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Feb 14 21:39:32 2020 -0800
kernel - Reduce SMP contention during low-memory stress
* When memory gets low vm_page_alloc() is forced to stray into
adjacent VM page queues to find free pages. This search can
expand to the whole queue and cause massive SMP contention on
systems with many cores.
For example, if PQ_FREE has almost no pages but PQ_CACHE has
plenty of pages, the previous scan code widened its search
to the entire PQ_FREE queue (causing a ton of SMP contention)
before beginning a search of PQ_CACHE.
* The new scan code starts in PQ_FREE but once the search widens
sufficiently it will also simultaneously begin searching PQ_CACHE.
This allows the system to continue to allocate memory with minimal
contention as long as PQ_FREE or PQ_CACHE have pages.
* The new mechanism integrated a whole lot better with pageout
daemon behavior. The pageout daemon generally triggers off
the FREE+CACHE total and not (generally) off of low levels
for one or the other.
Summary of changes:
sys/vm/vm_page.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++----
sys/vm/vm_pageout.c | 4 +-
2 files changed, 271 insertions(+), 21 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c28c2bcfa89bf3c6fa351296c2a7a9b29f93c0ac
--
DragonFly BSD source repository
More information about the Commits
mailing list