Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp619394pxx; Mon, 26 Oct 2020 17:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRBOuGSURM5Z+dq/COJfuhVHbMZteDui0WF0HuukdvWB4gHWnNAvhi90v3PJ8n0v5j53HC X-Received: by 2002:a05:6402:1653:: with SMTP id s19mr19137073edx.124.1603757219498; Mon, 26 Oct 2020 17:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603757219; cv=none; d=google.com; s=arc-20160816; b=k82dPdWGZiY7vd7sIWHX0dPBOC6mEqHH8VO2ZzBdu3InvOJB6+jDVVsjt/NGQp9dfL sGfZOfhzOA4MYQ7xhRUfKzUtBRp6JHFY4g8z2Pzh0djfylAluFI0pGlfag4yGiOoIOlv DPamdEVCYDjxyGKEL/8K5fdWdezIndgNfcqcPGl0i6jzLr4TPtjsnKQhmRTpqXtOjgy/ XXljOxI1WXkWWQEEfkW+pOiocFmzukHnVzXVa2oYSJ6hReJGpPMpSOqrGm3hbHgECzrz TA0ECtPIckoB0/2ybt5Es31NFncV87PDWir22gG6cSijJ88X8gPw+DyC8j4XwxrfUyxn i6zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/QWdKjer4+ETV2flVF88a2pHK6iQ48uyu6umSmd9O84=; b=o/U3XRRfKVg57dWh2qTldGiDof9ivP4wzESENZQHuCfvxBP0BpSE2sRDQA504kSt5r lExj8JghHmlTRVwUs6hwwI/TmKMYq17nhJOhYV1vZ5uFKd5NsBi9RzMtm8G+yV06xz26 18EoVZEKVRAP8jFef2+1q1cq+QCJizl6WHsajiNXnkAlppcqFxhaBe0TOUc0SL6R8RV1 +3xYw+sMCS6yLBeIt0V1CwvhsIELn9L1jt1lqO7vJTdj7fAlfJlip7CQNTw/TSvYny+O 3OP5LXecmMSQ67unJ7Q1Ho7cP1QgqEZW7RHMdcSIEy4NbXA+RdDO/+eL/anqKPMQ9GAp gInA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec18si8409819ejb.679.2020.10.26.17.06.37; Mon, 26 Oct 2020 17:06:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391358AbgJZV7b (ORCPT + 99 others); Mon, 26 Oct 2020 17:59:31 -0400 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:55205 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391338AbgJZV7b (ORCPT ); Mon, 26 Oct 2020 17:59:31 -0400 Received: from dread.disaster.area (pa49-179-6-140.pa.nsw.optusnet.com.au [49.179.6.140]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 9674B58BF63; Tue, 27 Oct 2020 08:59:24 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1kXAWR-004fZW-3k; Tue, 27 Oct 2020 08:59:23 +1100 Date: Tue, 27 Oct 2020 08:59:23 +1100 From: Dave Chinner To: Davidlohr Bueso Cc: viro@zeniv.linux.org.uk, akpm@linux-foundation.org, peterz@infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH] fs/dcache: optimize start_dir_add() Message-ID: <20201026215923.GA306023@dread.disaster.area> References: <20201022211650.25045-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201022211650.25045-1-dave@stgolabs.net> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=F8MpiZpN c=1 sm=1 tr=0 cx=a_idp_d a=uDU3YIYVKEaHT0eX+MXYOQ==:117 a=uDU3YIYVKEaHT0eX+MXYOQ==:17 a=kj9zAlcOel0A:10 a=afefHYAZSVUA:10 a=7-415B0cAAAA:8 a=jnOd6L2yOPG0MfuFbw4A:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 02:16:50PM -0700, Davidlohr Bueso wrote: > Considering both end_dir_add() and d_alloc_parallel(), the > dir->i_dir_seq wants acquire/release semantics, therefore > micro-optimize for ll/sc archs and use finer grained barriers > to provide (load)-ACQUIRE ordering (L->S + L->L). This comes > at no additional cost for most of x86, as sane tso models will > have a nop for smp_rmb/smp_acquire__after_ctrl_dep. > > Signed-off-by: Davidlohr Bueso > --- > Alternatively I guess we could just use cmpxchg_acquire(). Please us cmpxchg_acquire() so that people who have no clue what the hell smp_acquire__after_ctrl_dep() means or does have some hope of understanding of what objects the ordering semantics in the function actually apply to.... Cheers, Dave. -- Dave Chinner david@fromorbit.com