From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by kanga.kvack.org (Postfix) with ESMTP id 712A96B0035 for ; Mon, 20 Jan 2014 11:44:00 -0500 (EST) Received: by mail-pb0-f53.google.com with SMTP id md12so2185467pbc.40 for ; Mon, 20 Jan 2014 08:44:00 -0800 (PST) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTP id qv10si2061303pbb.52.2014.01.20.08.43.58 for ; Mon, 20 Jan 2014 08:43:59 -0800 (PST) Subject: Re: [PATCH v7 5/6] MCS Lock: allow architectures to hook in to contended paths From: Tim Chen In-Reply-To: <20140120141157.GC9868@mudshark.cambridge.arm.com> References: <1389917311.3138.15.camel@schen9-DESK> <20140120121948.GD31570@twins.programming.kicks-ass.net> <20140120141157.GC9868@mudshark.cambridge.arm.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 20 Jan 2014 08:43:45 -0800 Message-ID: <1390236225.3138.21.camel@schen9-DESK> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Will Deacon Cc: Peter Zijlstra , Ingo Molnar , Andrew Morton , Thomas Gleixner , "Paul E.McKenney" , "linux-kernel@vger.kernel.org" , linux-mm , "linux-arch@vger.kernel.org" , Linus Torvalds , Waiman Long , Andrea Arcangeli , Alex Shi , Andi Kleen , Michel Lespinasse , Davidlohr Bueso , Matthew R Wilcox , Dave Hansen , Rik van Riel , Peter Hurley , Raghavendra K T , George Spelvin , "H. Peter Anvin" , Arnd Bergmann , Aswin Chandramouleeswaran , Scott J Norton , "Figo.zhang" On Mon, 2014-01-20 at 14:11 +0000, Will Deacon wrote: > On Mon, Jan 20, 2014 at 12:19:48PM +0000, Peter Zijlstra wrote: > > On Thu, Jan 16, 2014 at 04:08:31PM -0800, Tim Chen wrote: > > > +#ifndef arch_mcs_spin_lock_contended > > > +/* > > > + * Using smp_load_acquire() provides a memory barrier that ensures > > > + * subsequent operations happen after the lock is acquired. > > > + */ > > > +#define arch_mcs_spin_lock_contended(l) \ > > > + while (!(smp_load_acquire(l))) { \ > > > + arch_mutex_cpu_relax(); \ > > > + } > > > +#endif > > > > I think that wants to be: > > > > #define arch_mcs_spin_lock_contended(l) \ > > do { \ > > while (!smp_load_acquire(l)) \ > > arch_mutex_cpu_relax(); \ > > } while (0) > > > > So that we properly eat the ';' in: arch_mcs_spin_lock_contended(l);. > > Yeah, that's better. > > Tim: are you happy making that change please? > > Will Sure, will do. Tim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org