On Sun, Mar 27, 2005 at 05:12:58PM +0200, Jan Engelhardt wrote: > Well, kfree inlined was already mentioned but forgotten again. > What if this was used: > > inline static void kfree_WRAP(void *addr) { > if(likely(addr != NULL)) { > kfree_real(addr); > } > return; > } > > And remove the NULL-test in kfree_real()? Then we would have: Am I the only person who is completely fascinated by the effort being spent here micro-optimising something thats almost never in a path that needs optimising ? I'd be amazed if any of this masturbation showed the tiniest blip on a real workload, or even on a benchmark other than one crafted specifically to test kfree in a loop. That each occurance of this 'optimisation' also saves a handful of bytes in generated code is it's only real benefit afaics. Even then, if a functions cache performance is better off because we trimmed a few bytes from the tail of a function, I'd be completely amazed. I guess April 1st came early this year. Dave - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Lee Revell <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Geert Uytterhoeven <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Horst von Brand <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Paul Jackson <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Pekka Enberg <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Jan Engelhardt <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- References:
- [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- From: linux-os <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: linux-os <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Lee Revell <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Paul Jackson <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Jan Engelhardt <[email protected]>
- [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- Prev by Date: Re: [PATCH] Fix preemption off of irq context on x86-64 with PREEMPT_BKL
- Next by Date: Re: Can't use SYSFS for "Proprietry" driver modules !!!.
- Previous by thread: Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- Next by thread: Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- Index(es):