The costs of expanding these two BUG_ON's is trivial,
considering that they get executed something like once per device,
during an initialization process. This is a section of code where I
would think correctness and ease of debugging would be more important,
especially since they might be from bug reports submitted by users who
might have limited tolerance for repeatedly trying new kernels.
If you're really squeezed for space, you're probably going to
have to define BUG() and BUG_ON() to something smaller that does not
generate a file name and line number (include/asm-i386/page.h an "#if"
for this, although mips does not), or even defining them as nothing.
By the way, if no bug is detected, BUG_ON(cond1 || cond2)
executes the same instructions as BUG_ON(cond1); BUG_ON(cond2),
although there are probably greater instruction prefetch costs due to
the the ~20 bytes of code (that is normally not executed) for the
different call or trap instruction, and instruction cache issues.
Adam J. Richter __ ______________ 575 Oroville Road
firstname.lastname@example.org \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/