Commit e76c0108 authored by Alexander Motin's avatar Alexander Motin
Browse files

Fix inverse sleep logic in buf_daemon().

Before commit 3cec5c77 buf_daemon() went to longer 1s sleep if
numdirtybuffers <= lodirtybuffers.  After that commit new condition
!BIT_EMPTY(BUF_DOMAINS, &bdlodirty) got opposite -- true when one
or more more domains is above lodirtybuffers.  As result, on freshly
booted system with no dirty buffers buf_daemon() wakes up 10 times
per second and probably only 1 time per second when there is actual
work to do.

MFC after:	1 week
Reviewed by:	kib, markj
Tested by:	pho
Differential revision:
parent 10af8e45
......@@ -3464,7 +3464,7 @@ buf_daemon()
* to avoid endless loops on unlockable buffers.
if (!BIT_EMPTY(BUF_DOMAINS, &bdlodirty)) {
if (BIT_EMPTY(BUF_DOMAINS, &bdlodirty)) {
* We reached our low water mark, reset the
* request and sleep until we are needed again.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment