Re: [PATCH 11/12] Generic semaphore implementation

From: Matthew Wilcox
Date: Mon Mar 03 2008 - 09:54:44 EST


On Thu, Feb 28, 2008 at 06:37:59PM -0800, Harvey Harrison wrote:
> > +/*
> > + * Because this function is inlined, the 'state' parameter will be constant,
> > + * and thus optimised away by the compiler.
> > + */
>
> If so, is unlikely() still needed?

It's needed for the case where the function is inlined into
__down_interruptible / __down_killable.

> Other than that small bit, looks great, any thoughts to getting rid of
> all the likely/unlikely as well? If they're no longer performance
> critical, it would be nice to have it that little bit cleaner.

I'd rather keep it as close to mutex.c as possible.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/