On 21.04.2006 11:00, Andrew Morton wrote: > James Morris <[email protected]> wrote: > >>On Fri, 21 Apr 2006, Daniel Walker wrote: >> >>> I included a patch , not like it's needed . Recently I've been >>>evaluating likely/unlikely branch prediction .. One thing that I found >>>is that the kfree function is often called with a NULL "objp" . In fact >>>it's so frequent that the "unlikely" branch predictor should be inverted! >>>Or at least on my configuration. >> >>It would be helpful to collect some stats on this so we can look at the >>ratio. > > Yes, kfree(NULL) is supposed to be uncommon. Not anymore, after the recent campaign to elliminate explicit NULL checks before calls to kfree(). > If someone's doing it a lot then we should fix up the callers. If that fixup amounts to re-adding the NULL check just elliminated then that's no improvement. It would be better to drop the assumption that kfree() calls with a NULL argument are uncommon, and consequently remove the unlikely() predictor. Adding likely() instead may or may not be a good idea. -- Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: kfree(NULL)
- From: Daniel Walker <[email protected]>
- Re: kfree(NULL)
- Prev by Date: Re: Time to remove LSM (was Re: [RESEND][RFC][PATCH 2/7] implementation of LSM hooks)
- Next by Date: Re: [PATCH/RFC] s390: Hypervisor File System
- Previous by thread: Re: kfree(NULL)
- Next by thread: Re: kfree(NULL)
- Index(es):