From: Peter Zijlstra Subject: Re: [PATCH v7 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock Date: Wed, 22 Jan 2020 10:22:38 +0100 Message-ID: <20200122092238.GV14879@hirez.programming.kicks-ass.net> References: <20191125210709.10293-1-alex.kogan@oracle.com> <20191125210709.10293-4-alex.kogan@oracle.com> <20200121202919.GM11457@worktop.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20200121202919.GM11457@worktop.programming.kicks-ass.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane-mx.org@lists.infradead.org To: Alex Kogan Cc: linux-arch@vger.kernel.org, guohanjun@huawei.com, arnd@arndb.de, dave.dice@oracle.com, jglauber@marvell.com, x86@kernel.org, will.deacon@arm.com, linux@armlinux.org.uk, steven.sistare@oracle.com, linux-kernel@vger.kernel.org, rahul.x.yadav@oracle.com, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, longman@redhat.com, tglx@linutronix.de, daniel.m.jordan@oracle.com, linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On Tue, Jan 21, 2020 at 09:29:19PM +0100, Peter Zijlstra wrote: > @@ -92,8 +92,8 @@ static int __init cna_init_nodes(void) > } > early_initcall(cna_init_nodes); > > -static inline bool cna_try_change_tail(struct qspinlock *lock, u32 val, > - struct mcs_spinlock *node) > +static inline bool cna_try_clear_tail(struct qspinlock *lock, u32 val, > + struct mcs_spinlock *node) > { > struct mcs_spinlock *head_2nd, *tail_2nd; > u32 new; Also, that whole function is placed wrong; it should be between cna_wait_head_or_lock() and cna_pass_lock(), then it's in the order they appear in the slow path, ie. the order they actually run.