>> I see kfree used in several hot paths. Check out >> this /proc/latency_trace excerpt: > >Yes, but is the pointer being free'd NULL most of the time? "[...]In general, you should prefer to use actual profile feedback for this (`-fprofile-arcs'), as programmers are NOTORIOUSLY BAD AT PREDICTING how their programs actually perform." --gcc info pages. >The optimization does not help if you are releasing actual memory. It does not turn the real case (releasing memory) worse, but just improves the unreal case (releasing NULL). Jan Engelhardt -- No TOFU for me, please. - 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: "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]>
- [PATCH] no need to check for NULL before calling kfree() - fs/ext2/
- Prev by Date: Re: [PATCH] s390: claw network device driver
- Next by Date: Re: [PATCH] s390: qeth tcp segmentation offload
- Previous by thread: Re: [PATCH] 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):