NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/58666 CVS commit: [netbsd-10] src/sys/kern
The following reply was made to PR kern/58666; it has been noted by GNATS.
From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/58666 CVS commit: [netbsd-10] src/sys/kern
Date: Sun, 15 Dec 2024 14:58:46 +0000
Module Name: src
Committed By: martin
Date: Sun Dec 15 14:58:45 UTC 2024
Modified Files:
src/sys/kern [netbsd-10]: subr_pool.c
Log Message:
Pull up following revision(s) (requested by chs in ticket #1028):
sys/kern/subr_pool.c: revision 1.292
pool: fix pool_sethiwat() to actually do something
The change that I made to the pool code back in April 2020
("slightly change and fix the semantics of pool_set*wat()" ...)
accidental broke pool_sethiwat() by making it have no effect.
This was discovered after the crash reported in PR 58666 was fixed.
The same machine (32-bit, with 10GB RAM) would hang due to the buffer
cache causing the system to run out of kernel virtual space. The
buffer cache uses a separate pool for buffer data for each power of 2
between DEV_BSIZE and MAXBSIZE, and if the usage pattern of buffer
sizes changes then memory has to be moved between the different pools
in order to create buffers of the new size. The buffer cache handles
this by using pool_sethiwat() to cause memory freed from the buffer
cache back to the pools to not be cached in the buffer cache pools but
instead be freed back to the pools' back-end allocator (which
allocates from the low-level kva allocator) as soon as possible. But
since pool_sethiwat() wasn't doing anything, memory would stay cached
in some buffer cache pools and starve other buffer cache pools (and a
few other pools that do no use the kmem layer for memory allocation).
Fix pool_sethiwat() to do what it is supposed to do again.
To generate a diff of this commit:
cvs rdiff -u -r1.285.4.1 -r1.285.4.2 src/sys/kern/subr_pool.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