Re: [PATCH v8 4/6] MCS Lock: Move mcs_lock/unlock function into its own

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Mon, Jan 20, 2014 at 05:24:31PM -0800, Tim Chen wrote:
> > +EXPORT_SYMBOL_GPL(mcs_spin_lock);
> > +EXPORT_SYMBOL_GPL(mcs_spin_unlock);
> 
> Do we really need the EXPORTs? The only user so far is mutex and that's
> core code. The other planned users are rwsems and rwlocks, for both it
> would be in the slow path, which is also core code.
>
> We should generally only add EXPORTs once theres a need.

In fact I'd argue the hot path needs to be inlined.

We only don't inline regular locking primitives because it would blow 
up the kernel's size in too many critical places.

But inlining an _internal_ locking implementation used in just a 
handful of places is a no-brainer...

Thanks,

	Ingo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]