From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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