Pekka wrote: > (4) The cleanups Jesper and others are doing are to remove the > _redundant_ NULL checks (i.e. it is now checked twice). Even such obvious changes as removing redundant checks doesn't seem to ensure a performance improvement. Jesper Juhl posted performance data for such changes in his microbenchmark a couple of days ago. As I posted then, I could swear that his numbers show: > Just looking at the third run, it seems to me that "if (likely(p)) > kfree(p);" beats a naked "kfree(p);" everytime, whether p is half > NULL's, or very few NULL's, or almost all NULL's. Twice now I have asked Jesper to explain this strange result. I have heard no explanation (not even a terse "you idiot ;)"), nor anyone else comment on these numbers. Maybe we should be following your good advice: > You don't know that until you profile! instead of continuing to make these code changes. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <[email protected]> 1.650.933.1373, 1.925.600.0401 - 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: no need to check for NULL before calling kfree() -fs/ext2/
- From: Jesper Juhl <[email protected]>
- Re: no need to check for NULL before calling kfree() -fs/ext2/
- From: "Pekka J Enberg" <[email protected]>
- Re: 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: 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]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Dave Jones <[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: Pekka Enberg <[email protected]>
- Re: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
- From: Jan Engelhardt <[email protected]>
- Re: no need to check for NULL before calling kfree() -fs/ext2/
- From: "Pekka J Enberg" <[email protected]>
- [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- Prev by Date: Re: i386/x86_64 segment register issuses (Re: PATCH: Fix x86 segment register access)
- Next by Date: Re: Linux 2.4.30-rc3 md/ext3 problems
- Previous by thread: Re: no need to check for NULL before calling kfree() -fs/ext2/
- Next by thread: Re: no need to check for NULL before calling kfree() -fs/ext2/
- Index(es):