From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f65.google.com ([209.85.208.65]:42994 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbeK2Hs1 (ORCPT ); Thu, 29 Nov 2018 02:48:27 -0500 Received: by mail-ed1-f65.google.com with SMTP id j6so12367edp.9 for ; Wed, 28 Nov 2018 12:45:32 -0800 (PST) Date: Wed, 28 Nov 2018 21:45:23 +0100 From: Andrea Parri To: David Howells Cc: "Paul E. McKenney" , gregkh@linux-foundation.org, Kiran Kumar Modukuri , viro@zeniv.linux.org.uk, sandeen@redhat.com, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] fscache: Fix race in fscache_op_complete() due to split atomic_sub & read Message-ID: <20181128204522.GA3183@andrea> References: <20181126165606.GA11282@andrea> <20181017164848.GA9795@andrea> <20181017151134.GA8966@andrea> <153978619457.8478.3813964117489247515.stgit@warthog.procyon.org.uk> <153978621809.8478.2198040871218302573.stgit@warthog.procyon.org.uk> <14408.1539790333@warthog.procyon.org.uk> <26942.1543249596@warthog.procyon.org.uk> <4283.1543416204@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4283.1543416204@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > > Sure. My point was: those operations are currently not atomic _and_ > > they provide no ordering; I think that the above commit message does > > a good work in explaining *why* we need atomicity, but can't say the > > same for the memory-ordering requirement. > > Having discussed it with Paul McKenney and thought about it some more, I think > relaxed is probably okay since there isn't a pair of variables that need > ordering. Count several troubled, and exiting!, weekends spent "processing" (my) conversations with Paul... so been there! ;-) Makes all sense to me of course, thank you for the clarification. Andrea > > David