Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1648456imu; Wed, 28 Nov 2018 12:47:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQdnqRb6IQyPuDMjTydpDV4smQIJRxbda790L7ljNeBDdjNzW6Jy124PtscaeM6TtHT4aJ X-Received: by 2002:a63:f959:: with SMTP id q25mr34913119pgk.315.1543438068045; Wed, 28 Nov 2018 12:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543438068; cv=none; d=google.com; s=arc-20160816; b=rN0ZKcvpVoOJiz5T//ZZQy4zj5ZBDYE/4mtoYiP+PEGuClMHL4LcDAjMYunImBfNuL gMDd9uPFw4QKIZcON6qJl0OkC6QBJ/WepfphV6Jg1X0rUofBIEc7f6rdGQVvfcULHdWU Io3pAmVYXbDNoZXRt/KaS1ISRCEbRbhEGckoX6DZW8MKEizRGT17yzGnBT1NLAXoIvZZ yB8EzRidR44cn9oqZP/xml9B4vdLRfpPKhMg5VcVFiqHS2o2G9v2FGhsUKIB4GPeNiOA KoyD6VbzHca23PEMvQEDZw2jUE8vSeY8eDAmm93KCTSvb8FKvaCLNDemPJrNr85ttx0v g8ig== 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; bh=qkIU8ANFxK92+K1ZAwkgAqqJJ/gVt3nrYv81jkIB5V0=; b=qD/NvdxptCw/KvaiUcmwkuhq2689vpQw41JR7kOsKCfiqA223JVk8OYScB9f5zgNGx B4/UuJedU/3DaiU24idANAGWsy/Q7E6N3k9wrlfrBijiRCJTNXyhPViiYBL/UaqFW9qj Jjvr5Yvrc2WfsDXpulmS6GMVjcFILVUF6gUSb3D2y9RD+Q2ugLPM1zxnNdw/ypra6nxu 8IfiuYSZu2JD90X/3ru3QxT5x6cYdcZyup3f5tcMck8i7djncAL5dj6tEiMnYzII5Edu kqwXT2I8jt0x80lkjQks5fYzD5SWGpAioCaucFNWuWXsbpN25LPITtiP3bbFcBLTYz91 PRRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kiHjQbuO; 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 f16si7795405pgb.140.2018.11.28.12.47.30; Wed, 28 Nov 2018 12:47:48 -0800 (PST) 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=pass header.i=@amarulasolutions.com header.s=google header.b=kiHjQbuO; 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 S1726318AbeK2Hs1 (ORCPT + 99 others); Thu, 29 Nov 2018 02:48:27 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:39024 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbeK2Hs1 (ORCPT ); Thu, 29 Nov 2018 02:48:27 -0500 Received: by mail-ed1-f67.google.com with SMTP id b14so25974edt.6 for ; Wed, 28 Nov 2018 12:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qkIU8ANFxK92+K1ZAwkgAqqJJ/gVt3nrYv81jkIB5V0=; b=kiHjQbuORkZnW8mi5sY+q9KzsQsjj7rpmm0TwgXSDiGJm/jvPC3wGsitkrCIYrv/G/ 2dTuaH8+htMFh9vHZS+uN4lhEez68TcGTREWAW6V4+gOcO4U1ScejTeKlibQF+JJL4TP q1haE0vSuXUgXbPyld1OOjFCXMM+/97E/qmI8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qkIU8ANFxK92+K1ZAwkgAqqJJ/gVt3nrYv81jkIB5V0=; b=pNxL/hGO9LAUfIYisyQqzHIFH7xqkwPvEFtoA5dePf6Xa0xfTDZOpg8uKZw02FeMpA QS1XOJel2AQAF3xZNCJvfAO2ArACMnQGE+P0Ag9OMAoC/Z7fO1F+kbITcgek4aJwxHnL hdLUIPTFfv0V/D0mu0zjpKXMfn3Fa1PjgE7zlxXqApEO2Zkm9WeCotIwXdhblBEeuWFz jqjCGjeuzpx9tjbsIWA+IQCQqwbmJ4Afo6ZEukZs1YNC1sr82RK7Jj+NDDgBiI3NNB37 V9wYe2lJ1K/HZWnZs1GIP19dTmq1PcKbPo5sj7O92kk41tbS6TTccM2vrIwDSt2Vjl+r 8XZA== X-Gm-Message-State: AA+aEWZ0F74K325mP0C5ssDEyAp6suhMs/kSS9ilWgCDf0MzzuFGdwG+ hRiXwgihTl1e2GmAYKmAGOdRvA== X-Received: by 2002:a50:ba3d:: with SMTP id g58mr31879434edc.35.1543437931570; Wed, 28 Nov 2018 12:45:31 -0800 (PST) Received: from andrea (dynamic-2a00-1028-8386-da8a-eacb-c188-78b9-634c.ipv6.broadband.iol.cz. [2a00:1028:8386:da8a:eacb:c188:78b9:634c]) by smtp.gmail.com with ESMTPSA id j21-v6sm1805ejz.51.2018.11.28.12.45.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 12:45:30 -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> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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