tech-kern archive

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

Re: CVS commit: src/sys/kern



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%.

Nick


Home | Main Index | Thread Index | Old Index