HomeFreeBSD

Fix inverse sleep logic in buf_daemon().

Description

Fix inverse sleep logic in buf_daemon().

Before commit 3cec5c77d617 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: https://reviews.freebsd.org/D33890

(cherry picked from commit e76c0108990b52a25f548cba4c0f1b8db59c6b8b)

Details

Provenance
mavAuthored on Jan 16 2022, 12:32 AM
Reviewer
kib
Differential Revision
D33890: Fix inverse sleep logic in buf_daemon()
Parents
rGe265658e4e36: rc: make ctld depend on NETWORKING
Branches
Unknown
Tags
Unknown