NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/60584 CVS commit: src/sys/kern
The following reply was made to PR kern/60584; it has been noted by GNATS.
From: "Izumi Tsutsui" <tsutsui%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/60584 CVS commit: src/sys/kern
Date: Mon, 21 Sep 2026 04:24:36 +0000
Module Name: src
Committed By: tsutsui
Date: Mon Sep 21 04:24:36 UTC 2026
Modified Files:
src/sys/kern: vfs_bio.c
Log Message:
vfs_bio: retry fresh buffer allocation if recycling fails
getnewbuf() uses buf_lotsfree() to choose whether to
allocate a fresh buffer before trying BQ_AGE and BQ_LRU.
If fresh allocation is skipped and no buffer can actually be
recycled, it sleeps on needbuffer_cv even when the buffer cache
is still below its high water mark.
In that situation, a thread which could release a buffer may
itself need another buffer, resulting in a deadlock.
To avoid this, if recycling finds no usable buffer and bufmem is
still below bufmem_hiwater, make one more PR_NOWAIT fresh allocation
attempt before sleeping. See PR kern/60584 for details.
Worth to pullup to netbsd-11.
To generate a diff of this commit:
cvs rdiff -u -r1.308 -r1.309 src/sys/kern/vfs_bio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index