Re: [PATCH v7 1/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2014-01-20 Thread Tim Chen
On Mon, 2014-01-20 at 13:07 +0100, Peter Zijlstra wrote: > On Thu, Jan 16, 2014 at 04:08:16PM -0800, Tim Chen wrote: > > +/* > > + * We don't inline mcs_spin_lock() so that perf can correctly account for > > the > > + * time spent in this lock function. > > + */ > > +static noinline > > +void mcs_

Re: [PATCH v7 1/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2014-01-20 Thread Peter Zijlstra
On Thu, Jan 16, 2014 at 04:08:16PM -0800, Tim Chen wrote: > +/* > + * We don't inline mcs_spin_lock() so that perf can correctly account for the > + * time spent in this lock function. > + */ > +static noinline > +void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node) But given

Re: [PATCH v7 1/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2014-01-19 Thread Paul E. McKenney
On Thu, Jan 16, 2014 at 04:08:16PM -0800, Tim Chen wrote: > We will need the MCS lock code for doing optimistic spinning for rwsem > and queue rwlock. Extracting the MCS code from mutex.c and put into > its own file allow us to reuse this code easily. > > Signed-off-by: Tim Chen > Signed-off-by:

[PATCH v7 1/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2014-01-16 Thread Tim Chen
We will need the MCS lock code for doing optimistic spinning for rwsem and queue rwlock. Extracting the MCS code from mutex.c and put into its own file allow us to reuse this code easily. Signed-off-by: Tim Chen Signed-off-by: Davidlohr Bueso --- include/linux/mcs_spinlock.h | 64 +