Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S946987AbdDTTRJ (ORCPT ); Thu, 20 Apr 2017 15:17:09 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58222 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946804AbdDTTRG (ORCPT ); Thu, 20 Apr 2017 15:17:06 -0400 Date: Thu, 20 Apr 2017 21:05:30 +0200 From: Peter Zijlstra To: Yury Norov Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ingo Molnar , Arnd Bergmann , Catalin Marinas , Will Deacon , Jan Glauber Subject: Re: [PATCH 3/3] arm64/locking: qspinlocks and qrwlocks support Message-ID: <20170420190530.GA6873@worktop> References: <1491860104-4103-1-git-send-email-ynorov@caviumnetworks.com> <1491860104-4103-4-git-send-email-ynorov@caviumnetworks.com> <20170413181212.y3ezah76qoztxhnn@hirez.programming.kicks-ass.net> <20170420182318.4ddtfiobxz6hgbo4@yury-N73SV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170420182318.4ddtfiobxz6hgbo4@yury-N73SV> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1091 Lines: 26 On Thu, Apr 20, 2017 at 09:23:18PM +0300, Yury Norov wrote: > Is there some test to reproduce the locking failure for the case. Possibly sysvsem stress before commit: 27d7be1801a4 ("ipc/sem.c: avoid using spin_unlock_wait()") Although a similar scheme is also used in nf_conntrack, see commit: b316ff783d17 ("locking/spinlock, netfilter: Fix nf_conntrack_lock() barriers") > I > ask because I run loctorture for many hours on my qemu (emulating > cortex-a57), and I see no failures in the test reports. And Jan did it > on ThunderX, and Adam on QDF2400 without any problems. So even if I > rework those functions, how could I check them for correctness? Running them doesn't prove them correct. Memory ordering bugs have been in the kernel for many years without 'ever' triggering. This is stuff you have to think about. > Anyway, regarding the queued_spin_unlock_wait(), is my understanding > correct that you assume adding smp_mb() before entering the for(;;) > cycle, and using ldaxr/strxr instead of atomic_read()? You'll have to ask Will, I always forget the arm64 details.