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 Roberson 2018-03-26 18:36:17 +00:00
parent 5db02b50ce
commit e8cbe51a04
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331561

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);
}
}