Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4669752imu; Tue, 29 Jan 2019 05:39:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN6TtkuBCkhq7VHRFhRl96VucVDc1o1TCqOiT2CeNFQAOjYSDC/QBnrhPkVxqJamO+icYmDd X-Received: by 2002:a17:902:9887:: with SMTP id s7mr25389253plp.199.1548769188298; Tue, 29 Jan 2019 05:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548769188; cv=none; d=google.com; s=arc-20160816; b=fz89VhnJht2aFQZ5CioDrEAw2jFMOQyMh8YBFDNe3ljo7b30pyT6SNRfEun85+03eK Wc8Oi5ky3P6/5TgYlfq38MbsHGksZPqHPs8QuJIVFVwfg/1/FYYpDX3LdIbOeZMcCXKP qRcdmPXE6FgHpGGEDZwesfeKFxE10/hEhQum3fnn3yqE7CI+vMMYYn1HkYNgtPqKyvxU 5x2tZ1C85gSb7RuZn0R7rSVakx372hnMnrH7yyvg2RsLFMKWW/wOdwVgEP00Wh69kQmg KMaegsMMF7dnrQuvhrPvxcVeljFXqn+KNLSJkYlCoWUqaTSzN43/73IMQS8uM8KvTBHo SxkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=IFqg0fDKCvNQZqAawUm+bxibxVXMHAWgrz++ss8RX6s=; b=NJi9XBW/Ue4vJ5El9lcASwzoXRCkeWRg4CxOoKm/4mi2FjOn83IuNV/ZksIdhj4Xqj TkMaFhXYstZkGg5qJHUmW6F4nX6qy5S1+hRaPHlFfUAJfnRLYnH4Ae4JoQNofpZHinSD AuE37/HaGFRxVu+STZDDryhGusIRTINuM0xe/8jslIBMiPg7DgIRa1m7CoHuJFLJzt7t kVPht1tKG9+S3P9NxvyOslhgWLug4nKlUkXmpKvPiS4CYAS9LZubGZvoxh1hDyoORKY0 0YcOpazHcOE1eiQhXLJi29nat/No32wzqs0sg9AMvMN7ASgyz8LtWOCDPFm3W+1dLp43 M8cA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si33948591pgv.456.2019.01.29.05.39.32; Tue, 29 Jan 2019 05:39: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbfA2NjW convert rfc822-to-8bit (ORCPT + 99 others); Tue, 29 Jan 2019 08:39:22 -0500 Received: from mga04.intel.com ([192.55.52.120]:32997 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfA2NjW (ORCPT ); Tue, 29 Jan 2019 08:39:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2019 05:39:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,537,1539673200"; d="scan'208";a="122249300" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga003.jf.intel.com with ESMTP; 29 Jan 2019 05:39:19 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.65]) by IRSMSX108.ger.corp.intel.com ([169.254.11.205]) with mapi id 14.03.0415.000; Tue, 29 Jan 2019 13:39:18 +0000 From: "Reshetova, Elena" To: Peter Zijlstra , Andrea Parri CC: "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 Thread-Topic: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Thread-Index: AQHUtwJjl6FToBsL5EumdKDVAgvWOaXEvaUAgAFE0QCAAD1W8A== Date: Tue, 29 Jan 2019 13:39:17 +0000 Message-ID: <2236FBA76BA1254E88B949DDB74E612BA4B98D02@IRSMSX102.ger.corp.intel.com> References: <1548677377-22177-1-git-send-email-elena.reshetova@intel.com> <20190128142910.GA7232@andrea> <20190129095144.GH28467@hirez.programming.kicks-ass.net> In-Reply-To: <20190129095144.GH28467@hirez.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDNiODYyZTItODllMS00OGU5LWFlMGMtOWVhNTgwOWM4ZTU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRlVTbUdXUm83bE10N3VWTDNsd1JGXC9HaldURm5VblNMSTFKSkpsZ3lSVVBPRzZTY1VTT09hbEpKZHBncTFPTWkifQ== x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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. I am very sorry about this, smth is really wrong with my system, in addition to all above, I haven't even received Andrea reply to my inbox, neither this patch itself. I will fix all the whitespacing/trailing stuff and address this comment from Andrea: "Mmh, this property (A-cumulativity) isn't really associated to ACQUIREs in the LKMM; I'd suggest to simply remove the last sentence." Anything else that needs fixing, content-wise? Best Regards, Elena.