Re: [patch 1/3] move WARN_ON() out of line

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: <linux-kernel@...>, Ingo Molnar <mingo@...>, Andrew Morton <akpm@...>
Date: Saturday, January 5, 2008 - 2:45 pm

Arjan van de Ven wrote:

Yeah, that seems reasonable if you're optimising for overall size.  Did
you count the difference of including the function name?  We decided not
to include it for BUG because its usefulness/size tradeoff didn't seem
terribly important.

But my goal was actually to reduce icache pollution, so by my reckoning
code bytes were much more expensive than data ones, so putting all BUG
information in a separate section makes those bytes much less
significant than putting anything inline in code.  Also, the trap for
WARN_ON would be smaller than BUG, because it wouldn't need the spurious
infinite loop needed to make gcc understand the control flow of a BUG.

On the other hand, you could put the call to out of line warning
function in a separate section to achieve the same effect.

    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Wed Jan 2, 8:56 pm)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:41 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:01 pm)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:45 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 4:02 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:08 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:37 pm)
Re: [patch 1/3] move WARN_ON() out of line, Dmitri Vorobiev, (Sat Jan 5, 1:09 am)
Re: [patch 1/3] move WARN_ON() out of line, Pekka Enberg, (Thu Jan 3, 7:20 am)
Re: [patch 1/3] move WARN_ON() out of line, Ingo Molnar, (Thu Jan 3, 5:25 am)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:42 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 12:22 pm)
Re: [patch 1/3] move WARN_ON() out of line, Olof Johansson, (Thu Jan 3, 12:58 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 5:03 pm)
Re: [patch 1/3] move WARN_ON() out of line, Matt Mackall, (Wed Jan 2, 9:59 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 5:06 pm)
Re: [patch 1/3] move WARN_ON() out of line, Herbert Xu, (Fri Jan 4, 10:35 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:33 pm)