Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4462153imu; Tue, 29 Jan 2019 01:52:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN5RToFh9RggGsg40PcXubPAfOqKUqvdJXCyWDRtSrxHM9wSNI4sF09S0XqXM9u7P6s5L9p/ X-Received: by 2002:a63:334a:: with SMTP id z71mr23277743pgz.400.1548755530532; Tue, 29 Jan 2019 01:52:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548755530; cv=none; d=google.com; s=arc-20160816; b=fbCGQ5HlH08ltag5dFQ0Zt/KyHeg9zN4ZrCGvFIpa+jrj+1vUgLmX8L5QdTERf0Vfe d/SqSMER16ZTqFRtWzw3D/Zgak5Ly1QrzEwKR2tZHQ1d9aZZt6kXQIsBcFfy1WaPueS9 f+y2bQomCYS/lbuBn5R3HKqGWCBkXVPknc+BNdHJzpEbblshA8LC8pxN+f55zLuUNfd0 Nhz77Ij7UZGHxaN/V9/rZvZUS6WA/N1sC/bKzI9ih3FRrRG7yBTCUlhH2DaeDMQTy8qb 2tbT0MeThxpkDXD7it5HuI+t2eLcGzYE3lGGh1ot6Ttor+kX8OVzBnU+ijyhEfGXHWEy KXfw== 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=6XIjcDQwIP+WQY5IcwlIazckl7rG6gnBTyMGW7XwXgQ=; b=NgmjjVOfWcgeZod5H9BGA1O8yq8j4+6B7ghz5UjqCxFz22Q/6AkbzJdE77d8O5CyEV sVncs7PW2Tf+7kXJF3xaFHp/U57xVv+tpdPSJCMzOzyjtVhKIAP9NhYn/SD/qq1cu0fT Qcuhua8JPALydVaWYWqVMygV5B+DAPTmqOr6R3CwmOl1YSRdlkoXg3IL9u+bByTh1iyr WlYLgRGfDIs/t+STNiI4NyEvxUcbeVhKIMbAT3jb32xzKnC2WCwJl18PwH4WYTxo/qg2 ck5bVp0hnOd9y1VcWDe9wZpkApoF29Cx69aYjp3u7G7uAwhLjur/9Tv0LabV3INT/IwD gTlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T5mEmXym; 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 c4si3129243pfi.110.2019.01.29.01.51.54; Tue, 29 Jan 2019 01:52:10 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=T5mEmXym; 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 S1727735AbfA2Jvu (ORCPT + 99 others); Tue, 29 Jan 2019 04:51:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:47646 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbfA2Jvu (ORCPT ); Tue, 29 Jan 2019 04:51:50 -0500 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=6XIjcDQwIP+WQY5IcwlIazckl7rG6gnBTyMGW7XwXgQ=; b=T5mEmXymdKzGkOEdBkSqsPyDE 8GYPzUzKbVvXliqAgHLN9mFfDjUq+UgzKxXcZb40czx2ppLxizGPw6yL4vZlRPofRIA8la1cnsUnv 1aA0KwL7hLWULZRvgJgfONslon5Tvx/Bghh6tcgeTpzFsvzwsL8TcD2Eb88PCS1oHiw8PpOpLp+U8 /f2E0lGBzxFjwkCxGvPiGqM34RzdG2pKvBZ1y9OBHDYZ1zgq9IPsRq//im3c3umgUtvOBPIYPmm7r S/9qdW88Nrl3mqKLOXFE+DoqECJswuRKRpFHLms5O3TmX5YjpdBSm2aWfUH6ss8FiBzp6zzy4QxgK l+Dr8spgA==; 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 1goQ3W-0003Lm-8Z; Tue, 29 Jan 2019 09:51:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AE9F92018338A; Tue, 29 Jan 2019 10:51:44 +0100 (CET) Date: Tue, 29 Jan 2019 10:51:44 +0100 From: Peter Zijlstra To: Andrea Parri Cc: Elena Reshetova , linux-kernel@vger.kernel.org, keescook@chromium.org, Alan Stern , Dmitry Vyukov Subject: Re: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Message-ID: <20190129095144.GH28467@hirez.programming.kicks-ass.net> References: <1548677377-22177-1-git-send-email-elena.reshetova@intel.com> <20190128142910.GA7232@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128142910.GA7232@andrea> 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, Jan 28, 2019 at 03:29:10PM +0100, Andrea Parri wrote: > > diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h > > index dbaed55..ab8f584 100644 > > --- a/arch/x86/include/asm/refcount.h > > +++ b/arch/x86/include/asm/refcount.h > > @@ -67,16 +67,29 @@ static __always_inline void refcount_dec(refcount_t *r) > > static __always_inline __must_check > > bool refcount_sub_and_test(unsigned int i, refcount_t *r) > > { > > - return GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl", > > + bool ret = GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl", > > REFCOUNT_CHECK_LT_ZERO, > > r->refs.counter, e, "er", i, "cx"); > > + > > + if (ret) { > > + smp_acquire__after_ctrl_dep(); > > + return true; > > + } > > + > > + return false; > > There appears to be some white-space damage (here and in other places); > checkpatch.pl should point these and other style problems out. It's worse... patch: **** malformed patch at line 81: diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h And yes, there's a lot of whitespace damage all around. Lots of trailing spaces too.