NetBSD-Bugs archive

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

re: port-i386/57641: -current/i386 no longer installs in 32 MB



The following reply was made to PR port-i386/57641; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: Andrew Doran <ad%netbsd.org@localhost>
Cc: gnats-bugs%netbsd.org@localhost, port-i386-maintainer%netbsd.org@localhost,
    gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
    Andreas Gustafsson <gson%gson.org@localhost>,
    Taylor R Campbell <riastradh%NetBSD.org@localhost>
Subject: re: port-i386/57641: -current/i386 no longer installs in 32 MB
Date: Sat, 07 Oct 2023 15:51:34 +1100

 Andrew Doran writes:
 > On Wed, Oct 04, 2023 at 10:50:25PM +0000, Taylor R Campbell wrote:
 >
 > > > From: Andrew Doran <ad%netbsd.org@localhost>
 > > > =
 
 > > > It's probably not an satisfying answer but I don't think it's a vali=
 d test
 > > > because DIAGNOSTIC uses a lot more memory and we shouldn't be shippi=
 ng
 > > > actual release kernels with it enabled.
 > > =
 
 > > How much more memory?  DIAGNOSTIC is supposed to be reasonably cheap,
 > > mostly cheap predicted-not-taken branches in assertions.
 >
 > There's not an easy formula for that.  kmem adds sizeof(size_t) to every
 > allocation to track that size allocated is the same as size freed, which
 > eats a lot more space than expected because alignment requirements (for
 > cache friendliness) still need to be met.
 
 while i agree it may not be true to the "reasonably cheap" rule,
 i think that the damage caused by wrong kmem_free() size is far
 too dangerous to push this to only DEBUG.
 
 (i am suddenly thinking about turning on KMEM_SIZE in all my
 kernels anyway, cuz this cost enables something i'd rather see
 crash than corrupt.)
 
 
 .mrg.
 


Home | Main Index | Thread Index | Old Index