Received: by 10.213.65.68 with SMTP id h4csp2191367imn; Thu, 5 Apr 2018 10:29:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+uf/Mb8VfVKxIsPpjsOllVqMt1f3pAv++pwyHLacr5PmlBhllon0dzebT05ixJuhdV91UJ X-Received: by 2002:a17:902:5501:: with SMTP id f1-v6mr23471243pli.50.1522949377022; Thu, 05 Apr 2018 10:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522949376; cv=none; d=google.com; s=arc-20160816; b=NyCoxtliLt7eTTczgXNNi0qndYAwBfSKXEJmpI/PElQ8zfAI9mBiBNGRfu0r/2nfHa AcS32wikryjotpxxgfUBIYBpohSHtXXBw6sUO7+l1QgeAbY8gnVD282LvAqZ7HXxByKC zix6mj6xdyHdVwsNBdoRSSrRmEh6kFeWsqtKVWzU+E7YZnxs8/IIyFE44Fa3IgzYFy+s UJomXMKjrAkWTy7oBAoLetOZ7pFAFq2djui6FGk+/WYbqXq1oKz3ms/IyKrpI7ptkoH5 vofIZHYwqxKnKYlfICjDwylmaw7vICsesARutdHELIIjejs7ujQj55oi+jhca4NiJjsY j9Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ZDml5teCXjc7hscjFD1QeotRm7vwUYn5gRx/Sub7r18=; b=F+pw4oflN9TKr4fd4fe9jp4O8qa80BPgEC5ETEUAHwnpJivb9TGIfWGm0e3j3b00u2 dYCej6aI1h8OPOiMDiExl+VKxbwYB1Am4tY0ensm0gD+roYOwgiuDkqF8pV5pVjLiAVD SgwcpILwySXelFaQxUBwc5k8A8DUH1zlD24fs9FJvQ5+AlnzEa28PKTqHGLBsOUm8LwN 3uhiugjLgsqWuW7yyk3sbIRhLzPbSitATubmDVJ9iB5lTJUYub97dqYAVH+ce2btmx6r euuAco4Sow5j8lLTC2NUKK92jflpfrHGRf6KzOi9FWLOGw/k6LYtX09MOTzu1qn+Sz0R 0NLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cgHzeZPr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g66si6379255pfc.383.2018.04.05.10.29.22; Thu, 05 Apr 2018 10:29:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cgHzeZPr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbeDER2P (ORCPT + 99 others); Thu, 5 Apr 2018 13:28:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41510 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbeDER2O (ORCPT ); Thu, 5 Apr 2018 13:28:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZDml5teCXjc7hscjFD1QeotRm7vwUYn5gRx/Sub7r18=; b=cgHzeZPrq3H8BwBx3dz7lUDuF MpQ6xSW5TPP2AtnVMFHH7I1CrRGocoi0nifCEKXc8U8IIsnnksy9AuSsIjsShY5PS9kXcFaKFiG0w ph1C8zvJ3KqVSXs+GKmTZNzknoU3l7dsR/xWrYQf2z3y5hKz6uRmCD0O1jTsjzpRifpTx4R8AoCCe 88USnNfLY2hJMClZmmEjIOcuGORsViFPEWsOt+VZ05oSOhc62bO51+Ru3s3NMQBvxaJaO8jGoPSRr Gn+H8i0OhJbJMTBKhP3cbLEkkA6ABnuk3LtO3p8Yl+kqChiW24IK1zeEf7CZ3xMg2+Ab8aYPU51iP TyqpnnINg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f48gE-0004mO-Kr; Thu, 05 Apr 2018 17:28:10 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 01A2F20298CFA; Thu, 5 Apr 2018 19:28:08 +0200 (CEST) Date: Thu, 5 Apr 2018 19:28:08 +0200 From: Peter Zijlstra To: Will Deacon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mingo@kernel.org, boqun.feng@gmail.com, paulmck@linux.vnet.ibm.com, catalin.marinas@arm.com, Waiman Long Subject: Re: [PATCH 10/10] locking/qspinlock: Elide back-to-back RELEASE operations with smp_wmb() Message-ID: <20180405172808.GG4082@hirez.programming.kicks-ass.net> References: <1522947547-24081-1-git-send-email-will.deacon@arm.com> <1522947547-24081-11-git-send-email-will.deacon@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522947547-24081-11-git-send-email-will.deacon@arm.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 05, 2018 at 05:59:07PM +0100, Will Deacon wrote: > @@ -340,12 +341,17 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val) > goto release; > > /* > + * Ensure that the initialisation of @node is complete before we > + * publish the updated tail and potentially link @node into the > + * waitqueue. > + */ > + smp_wmb(); Maybe an explicit note to where the matching barrier lives..