svn commit: r244112 - head/sys/kern

Navdeep Parhar np at FreeBSD.org
Mon Dec 17 22:23:57 UTC 2012


On 12/17/12 14:02, Adrian Chadd wrote:
> On 17 December 2012 13:47, Andriy Gapon <avg at freebsd.org> wrote:
> 
>> But you see, the following is still illogical _to me_.
> 
> And this is the core of the problem.
> 
> A lot of developers are interpreting the KASSERT() conditions as an
> invariant condition that, if in any way enabled, should be completely
> trusted, believed and cause an immediate panic().
> 
> However, we leave them out on shipping, production kernels. Why's
> that? Because the contract here is "the code should never hit these
> situations, so we don't bother checking."
> 
> It's totally understandable at this point why there's such a huge
> amount of confusion here. On one hand we have a construct that allows
> the developer to enforce correct behaviour and panic early if it gets
> caught out; on the other hand we totally ignore all of that in
> shipping, production kernels.
> 
> Why are they there, if we just ship production releases with
> INVARIANTS disabled?

Read the section titled "NOTE TO PEOPLE WHO THINK THAT FreeBSD 10.x IS
SLOW:" in /usr/src/UPDATING if you're wondering why.

Regards,
Navdeep


More information about the svn-src-all mailing list