svn commit: r353293 - head/sys/vm
Mateusz Guzik
mjg at FreeBSD.org
Mon Oct 7 23:19:10 UTC 2019
Author: mjg
Date: Mon Oct 7 23:19:09 2019
New Revision: 353293
URL: https://svnweb.freebsd.org/changeset/base/353293
Log:
vm: stop trylocking page queues in vm_page_pqbatch_submit
About 11 minutes of poudriere -s -j 104 and probing on return value of
trylocks reveals that over 10% of attempts fail, which in turn means
there are more atomics performed than necessary.
Trylocking was there to try preventing migration, but it's not very likely
to happen if the lock is uncontested.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21925
Modified:
head/sys/vm/vm_page.c
Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c Mon Oct 7 22:40:05 2019 (r353292)
+++ head/sys/vm/vm_page.c Mon Oct 7 23:19:09 2019 (r353293)
@@ -3216,12 +3216,10 @@ vm_page_pqbatch_submit(vm_page_t m, uint8_t queue)
critical_exit();
return;
}
- if (!vm_pagequeue_trylock(pq)) {
- critical_exit();
- vm_pagequeue_lock(pq);
- critical_enter();
- bq = DPCPU_PTR(pqbatch[domain][queue]);
- }
+ critical_exit();
+ vm_pagequeue_lock(pq);
+ critical_enter();
+ bq = DPCPU_PTR(pqbatch[domain][queue]);
vm_pqbatch_process(pq, bq, queue);
/*
More information about the svn-src-all
mailing list