Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-11] src/sys/kern



Module Name:    src
Committed By:   martin
Date:           Thu Oct  1 14:22:46 UTC 2026

Modified Files:
        src/sys/kern [netbsd-11]: vfs_bio.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #493):

        sys/kern/vfs_bio.c: revision 1.309

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.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.306.2.1 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