From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754346AbbJPPSf (ORCPT ); Fri, 16 Oct 2015 11:18:35 -0400 Received: from casper.infradead.org ([85.118.1.10]:34513 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754111AbbJPPSe (ORCPT ); Fri, 16 Oct 2015 11:18:34 -0400 Date: Fri, 16 Oct 2015 17:18:30 +0200 From: Peter Zijlstra To: Will Deacon , Paul McKenney Cc: linux-kernel@vger.kernel.org, Oleg Nesterov , Ingo Molnar Subject: Q: schedule() and implied barriers on arm64 Message-ID: <20151016151830.GZ3816@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, IIRC Paul relies on schedule() implying a full memory barrier with strong transitivity for RCU. If not, ignore this email. If so, however, I suspect AARGH64 is borken and would need (just like PPC): #define smp_mb__before_spinlock() smp_mb() The problem is that schedule() (when a NO-OP) does: smp_mb__before_spinlock(); LOCK rq->lock clear_bit() UNLOCK rq->lock And nothing there implies a full barrier on AARGH64, since smp_mb__before_spinlock() defaults to WMB, LOCK is an "ldaxr" or load-acquire, UNLOCK is "stlrh" or store-release and clear_bit() isn't anything. Pretty much every other arch has LOCK implying a full barrier, either because its strongly ordered or because it needs one for the ACQUIRE semantics.