Fix a bug introduced in r329612 that slowly invalidates all clean bufs.

Reported by:	bde
Reviewed by:	bde
Sponsored by:	Netflix, Dell/EMC Isilon
This commit is contained in:
jeff 2018-03-26 18:36:17 +00:00
parent 8f5156d5ad
commit 63a483ed5f

View File

@ -821,7 +821,8 @@ bufspace_daemon(void *arg)
* which will inefficiently trade bufs with bqrelse
* until we return to condition 2.
*/
do {
while (bd->bd_bufspace > bd->bd_lobufspace ||
bd->bd_freebuffers < bd->bd_hifreebuffers) {
if (buf_recycle(bd, false) != 0) {
if (bd_flushall(bd))
continue;
@ -842,9 +843,7 @@ bufspace_daemon(void *arg)
BD_UNLOCK(bd);
}
maybe_yield();
} while (bd->bd_bufspace > bd->bd_lobufspace ||
bd->bd_freebuffers < bd->bd_hifreebuffers);
}
bufspace_daemon_wait(bd);
}
}