Nick Hudson <skrll%netbsd.org@localhost> writes: > On 07/22/14 12:49, Greg Troxel wrote: >> "Maxime Villard" <maxv%netbsd.org@localhost> writes: >> >>> Module Name: src >>> Committed By: maxv >>> Date: Tue Jul 22 07:38:41 UTC 2014 >>> >>> Modified Files: >>> src/sys/kern: subr_kmem.c >>> >>> Log Message: >>> Enable KMEM_REDZONE on DIAGNOSTIC. It will try to catch overflows. >>> >>> No comment on tech-kern@ >> I didn't see this on tech-kern (nor did I see anything about defining >> KMEM_POISON), and now that I'm aware I object. >> >> DIAGNOSTIC, by longstanding tradition, is a lightweight and not have a >> significant performance hit. Basically it's about KASSERT of things >> that must be true. This is changing the size of memory allocations, >> which is far more far-reaching. > > options(4) says this > > options DIAGNOSTIC > Adds code to the kernel that does internal consistency > checks. This code > will cause the kernel to panic if corruption of internal data > structures > is detected. These checks can decrease performance up to 15%. > > I'd guess that KMEM_REDZONE add much less than 15%. I think that options(4) is buggy here. The historical norms for DIAGNOSTIC are nowhere near 15% being acceptable. There is also no notion of increasing memory usage under DIAGNOSTIC.
Attachment:
pgpW7FPTA1ey0.pgp
Description: PGP signature