Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4628294yba; Tue, 30 Apr 2019 01:26:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3O67ZB/rTaialnfYRHd4Rhx+upmlMjW7KJcrlPlFNfXldaiWqXYP5qHToXUkxQUzHJ4pK X-Received: by 2002:a62:6497:: with SMTP id y145mr19776032pfb.255.1556612810136; Tue, 30 Apr 2019 01:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556612810; cv=none; d=google.com; s=arc-20160816; b=H+QR96ouh9Y6hI8QFlLGD66gI/FxUFsCKiBk1YR0T4kvZ3yEqt2zLOkuyIiH5zqgfQ g/4yyB2LHKUfuX7bHCy7udJdG7ITA5KpS8vzlu4xA3EXxtDIG6ws3u0QskkBYMzSfYWQ 9o8Mfx2dSWxPphsXicMXqhR3ab/SmmvSYE1ih67jP9Vog1PjbY2q3kCmbA4SDbtNoyOi /PfcALHyBo+xq7+U3NfNZrQtjpGCvNgYqHMWnoNSjLkUTTY6xETCYEb+unpxLOK3wbm4 j6zJF0tzt1CWoZOAs875E3CWtRpUeBjIKFmYINGjdVD2Rimr6XgZB16NUgZeczlSdRTU FRxg== 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=NZBXO1ME4yyhNikKDn25Wx/qhHtX/guFa4/8R+Ntg+Y=; b=Hjipe5nFrB4qy/o4aYv0ADqtsOw2Sg4kJYJhXUHZ482Gm6BW002y5kkqJXDxmovQ34 5ohZttK4XMj3rPHAJX79t6iKmJ5Rcp/mF5HjxCKWH7QXsgSGWVQRd+24GG/WNhoXiBQe e7SjGr+wq3Gr8VTXPGkW0udwiV9DWLmeCRwh7AvhDDYMBig1nQU56VPa1J/r4A1iDX90 vJqcoDrDx1N7X+E6eB5/OvifCOsMnJhWF6s9VpMkX4Q19GkPsHH3LpVQ1Iw67v6zq2IO hp2XuLb5UyoS+iMjl1YIjpjzwFiZ6W4Cp6MFW59AYU37mGlgWUql9BCJl8NMgzn5o2VK /Mhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G3TUd0H0; 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 d6si10413862pgk.129.2019.04.30.01.26.34; Tue, 30 Apr 2019 01:26:50 -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=G3TUd0H0; 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 S1726583AbfD3IXf (ORCPT + 99 others); Tue, 30 Apr 2019 04:23:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59880 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfD3IXe (ORCPT ); Tue, 30 Apr 2019 04:23:34 -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=NZBXO1ME4yyhNikKDn25Wx/qhHtX/guFa4/8R+Ntg+Y=; b=G3TUd0H0Lh2EYnrNVTvuVyRLB p6pHt9vlLF0QLkapwZMYwuiZGgRG5nqILhQdEldK2Q5ku+eWhOMMsFZuRTthTK8Vaj6yNr9G54AXa VqzBhoWej4S3X7Se06W0n7BRMUS95nn89oFIyVjBt6OBJyEta7tADh+jbNq8OxpzU62PtyLDJZwcg A4qlbpX5xjzGIsu7w2QXJgno6DCXC7RAuuYRUvefMQtf42OsIemUxBmtQ72NTHQnWZ7Dpo5khsmeA vYBLOLAYixvT0RaOkkcLGB3tD4N4zSxUdTDkHqSrgzC1ej0rPOcG4a63mKQBQgyFGZirJJApeJEQf zvEKEnWhw==; 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 1hLO33-00082Z-LQ; Tue, 30 Apr 2019 08:23:33 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 334EE29D2D6D6; Tue, 30 Apr 2019 10:23:32 +0200 (CEST) Date: Tue, 30 Apr 2019 10:23:32 +0200 From: Peter Zijlstra To: Andrea Parri Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Yan, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel@vger.kernel.org Subject: Re: [PATCH 4/5] ceph: fix improper use of smp_mb__before_atomic() Message-ID: <20190430082332.GB2677@hirez.programming.kicks-ass.net> References: <1556568902-12464-1-git-send-email-andrea.parri@amarulasolutions.com> <1556568902-12464-5-git-send-email-andrea.parri@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556568902-12464-5-git-send-email-andrea.parri@amarulasolutions.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 10:15:00PM +0200, Andrea Parri wrote: > This barrier only applies to the read-modify-write operations; in > particular, it does not apply to the atomic64_set() primitive. > > Replace the barrier with an smp_mb(). > > @@ -541,7 +541,7 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, > long long release_count, > long long ordered_count) > { > - smp_mb__before_atomic(); same /* * XXX: the comment that explain this barrier goes here. */ > + smp_mb(); > atomic64_set(&ci->i_complete_seq[0], release_count); > atomic64_set(&ci->i_complete_seq[1], ordered_count); > } > -- > 2.7.4 >