Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp58240imm; Thu, 28 Jun 2018 14:52:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI7AiNtiaYadnOZHvC9dg7MfBIU0MRS0Xdp7v51zJ8Yjv6Exosokyrrk1FdPnNV2PkGz5DU X-Received: by 2002:a17:902:8a8e:: with SMTP id p14-v6mr12112359plo.213.1530222737105; Thu, 28 Jun 2018 14:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530222737; cv=none; d=google.com; s=arc-20160816; b=g8tz30FkaWBkxsM65WAaSkYHrlYU0GHQoAafk7b699vzoFgGI3ZfESQprud/bXpHWT orGfqV72GWMk4ydYMmfwZavw2hjkA8btR3rCblYui9r+jqOEsUPm4YjGIX7qddPS+/PD 7oHyQRkq45PbsBjgWJklJcNW+tGPg3xAZJczG/vpuWYfNx3WtiIPSNRt8xZHMQWBRvyB Tj5kcY0yf/scy2OLTq+TU1IewUeN2UydaP7LpGK2eFac1g4ChBSG4Tbla2xJP5mAh9Ei WsCmySe8ihPqBqq3K+wlCH55LoIpmhbASvas+LnzEk1ERVaTHrPqk4p3lQ3mGTDESGsB S8hw== 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:arc-authentication-results; bh=IJyeyPBBjOjDnGGThrU89LQeCuZoxbSkrf59kGRVzU4=; b=iqZxJjG/ZccJdn+Zfj+cHjkhl8qKf1F4/t5CYxtAr2PY/SH4KcGQtHivU76KAEZwo4 /BIZBa8xZnHcs3r+X8gqg2SO9R/66xFAoIy/eyuz1l3Bh49pgjEfIMf7cvHxMPMXR3dK GMBpZMfHbi4VdLKaKrQJA9DTiAxseYs7x64JGPPwHr1R7U8e2Owvr4XMaa8G4T2Atgm+ xFcqAPtPMPV4eZk3dXGJz+sYMHXV6X6EXvNCsmlTGHE7Ri9W2VAfe1nHIRu8Awkrla1S M7pBFbxQHEnN5xapYVGI8E1rlZS42JQbPKAsQOMMdtPoHAK667GGsw4cp1hq7kbjaJLo NUnw== ARC-Authentication-Results: i=1; mx.google.com; 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 o1-v6si7372956pld.424.2018.06.28.14.52.00; Thu, 28 Jun 2018 14:52:17 -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; 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 S966798AbeF1Odn (ORCPT + 99 others); Thu, 28 Jun 2018 10:33:43 -0400 Received: from nautica.notk.org ([91.121.71.147]:46689 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966737AbeF1Odj (ORCPT ); Thu, 28 Jun 2018 10:33:39 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 5D1B5C009; Thu, 28 Jun 2018 16:33:38 +0200 (CEST) Date: Thu, 28 Jun 2018 16:33:23 +0200 From: Dominique Martinet To: Matthew Wilcox Cc: v9fs-developer@lists.sourceforge.net, Latchesar Ionkov , Eric Van Hensbergen , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ron Minnich Subject: Re: [V9fs-developer] [PATCH 4/6] 9p: Remove an unnecessary memory barrier Message-ID: <20180628143323.GA32547@nautica> References: <20180628132629.3148-1-willy@infradead.org> <20180628132629.3148-5-willy@infradead.org> <20180628134029.GA24673@nautica> <20180628140358.GG7646@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180628140358.GG7646@bombadil.infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote on Thu, Jun 28, 2018: > How about this? > > /* > * This barrier is needed to make sure any change made to req before > - * the other thread wakes up will indeed be seen by the waiting side. > + * the status change is visible to another thread > */ Yes, that sounds better. This code is fairly old and I was wondering if the new WRITE_ONCE and READ_ONCE macros would help but it looks like compile-time barriers only so I do not think they would be enough... Documentation/memory-barriers.txt still suggests something similar in the "SLEEP AND WAKE-UP FUNCTIONS" section so I guess this is fine. Thanks, -- Dominique Martinet | Asmadeus