[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5269AB47.4000007@hp.com>
Date: Thu, 24 Oct 2013 19:20:39 -0400
From: Waiman Long <waiman.long@...com>
To: Tim Chen <tim.c.chen@...ux.intel.com>
CC: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Rik van Riel <riel@...hat.com>,
Peter Hurley <peter@...leysoftware.com>,
Davidlohr Bueso <davidlohr.bueso@...com>,
Alex Shi <alex.shi@...aro.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrea Arcangeli <aarcange@...hat.com>,
Matthew R Wilcox <matthew.r.wilcox@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Michel Lespinasse <walken@...gle.com>,
Andi Kleen <andi@...stfloor.org>,
Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
George Spelvin <linux@...izon.com>,
"H. Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
Aswin Chandramouleeswaran <aswin@...com>,
Scott J Norton <scott.norton@...com>,
Davidlohr Bueso <davidlohr@...com>,
Jason Low <jason.low2@...com>
Subject: Re: [PATCH v8 10/10] MCS Lock: Make mcs_spinlock.h includable in
other files
On 10/24/2013 04:58 PM, Tim Chen wrote:
>
> Do we want to inline the unlock? Will that prevent proper profile
> accounting of unlock overhead?
>
> Can we keep the mcs_spin_unlock and mcs_spin_lock in the same
> kernel/mcs_spinlock.c file? That makes it easier to read and
> maintain the code.
The unlock code is fast. The lock code, however, can run for a long
time. It will greatly increase the reported time spent in the calling
function if it is inlined. The same is true for spinlock. The
_raw_spin_lock() is a real function while _raw_spin_unlock() is inlined
in most cases.
Yes, I can bring the lock function back to the mcs_spinlock.h file with
name like _raw_mcs_spin_lock() and the mcs_spin_lock() in mcs_spinlock.c
will include the raw function. In that way, the mcs_spin_lock() will
still be a separate function while both the lock and unlock code will be
together.
> Can you check if you have applied all the previous MCS patches?
> The last two for barrier corrections and optimizations seem
> to be missing.
>
> MCS Lock: optimizations and extra comments
> https://lkml.org/lkml/2013/10/2/644
> MCS Lock: Barrier corrections
> https://lkml.org/lkml/2013/10/2/650
>
> Thanks.
>
> Tim
>
Apparently, I does have all the MCS patch in my git tree. I will
regenerate a new one with the right diff. Thank for the review.
-Longman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists