Messages in this thread | | | Date | Mon, 08 Aug 2005 08:51:03 -0700 | From | Zachary Amsden <> | Subject | Re: [PATCH] CHECK_IRQ_PER_CPU() to avoid dead code in __do_IRQ() |
| |
Karsten Wiese wrote:
>Am Montag, 8. August 2005 13:19 schrieb Alexander Nyberg: > > >>There are many places where one could replace run-time tests with >>#ifdef's but it makes reading more difficult (and in longer terms >>maintainence). Have you benchmarked any workload that benefits >>from this? >> >> > >Performance gain is small, but measurable: 0,02% >Tested on an Atlon64 running at 1000MHz. >I took this value from 9 runs (each with/without the patch) of > $ time lame x.wav >where each took about 1 minute. >3000 Interrupts/s were generated at the time by running > $ jackd -R -dalsa -p64 -n2 > >0,02% really isn't that much....but Athlon64 is better than P4 >with branch predictions, I think. > >Erm... ok, I won't insist on having this patch applied ;-) > > Karsten > >
Removing dead code is always good - 0.02% is small, but if 100 kernel developers all did the same, that adds up to 2% rather quickly, and that is nothing to sneeze at. I like your patch, but you should add some comments for maintainability about what CHECK_IRQ_PER_CPU does - see include/asm-generic/pgtable.h for similar styling. If also probably doesn't hurt to leave IRQ_PER_CPU defined even when ARCH_HAS_CHECK_IRQ_PER_CPU is not, since it looks cleaner and prevents future collisions with bits defined inside of an #ifdef.
Zach - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |