Module Name: src Committed By: chs Date: Wed Nov 4 01:30:19 UTC 2020
Modified Files: src/sys/kern: init_main.c src/sys/uvm: uvm_aobj.c uvm_init.c uvm_pdaemon.c Log Message: In uvmpd_tryownerlock(), if the initial try-lock of the owner lock fails then rather than do more try-locks and eventually sleep for a tick, take a hold on the current owner's lock, drop the page interlock, and acquire the lock that we took the hold on in a blocking fashion. After we get the lock, check if the lock that we acquired is still the lock for the owner of the page that we're interested in. If the owner hasn't changed then can proceed with this page, otherwise we will skip this page and move on to a different page. This dramatically reduces the amount of time that the pagedaemon sleeps trying to get locks, since even 1 tick is an eternity to sleep in this context and it was easy to trigger that case in practice, and with this new method the pagedaemon only very rarely actually blocks to acquire the lock that it wants since the object locks are adaptive, and when the pagedaemon does block then the amount of time it spends sleeping will be generally be much less than 1 tick. To generate a diff of this commit: cvs rdiff -u -r1.531 -r1.532 src/sys/kern/init_main.c cvs rdiff -u -r1.151 -r1.152 src/sys/uvm/uvm_aobj.c cvs rdiff -u -r1.54 -r1.55 src/sys/uvm/uvm_init.c cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_pdaemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.