Received: by 10.213.65.68 with SMTP id h4csp2160494imn; Sun, 8 Apr 2018 21:17:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/YQXpWBrW+25Xh6Cg+nmtXIbBBCE4cOFVvALCEAABNUDGLAvcYugK49XzX5p5rRRK6w+Na X-Received: by 10.99.109.72 with SMTP id i69mr24475852pgc.417.1523247439474; Sun, 08 Apr 2018 21:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523247439; cv=none; d=google.com; s=arc-20160816; b=CA0hSSUcs6biFwh0ywqmZ1yAEEboVbx6PHZlwpmzyOZF5BsoTrk77+LslRCLWhq7JU Ur+N+Bwyxh0YV09Cgz8TeO6edgre8hVH8Qcr+w6FNVPpAOYmozRM54XUlKdLqnioehpA VqeT+qr5jc8wI3xiG+NxwKOm+t2Kus0AxxNjmNcZ8j7Ne3+3vf/cH0Pvmt9CiOgCsm1r oROpbUfupr7MtAMpV2tyeyxLd+xtEpcCNYAPtKp1hXnxmXxrIvsjzd3Je4prL/ArlA7n 0VD4l1v7ZnXs4oDtjgLlnqAe/EYhkTyvB5WKJdV/iczVC9d02PYsCnsrIIwLyQIqGlEb gRVw== 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 :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=t3+S5T1SQvbM7HS1mHUAHCUwbYrSy4QelidoN/ffFdA=; b=brOA3B6OJg8Lae8tka5qW8EEl7OMSJLDeSGHXh01RcDDfeixXBzqUYJlHKIhCRaVJ4 jTM+FgcQ8nJupV0y2kxeIOHXU/lBJX6nPMVMcoUG2xPChbHjho96fvYTyZa6evkODLS+ Mgh94uz/uLSlKoWcnv6Ey7UJJUQ/ZcxOS4GAeA6LKoGQs+ilc//zn7AAkvBjDVF1se2K wY6rga2VuXJ63GHDHO0iqcE3K2N7bn0F2Zavm7ENFtuxfZjbnXJAPnbiIfta/eApCIsH HxinAwkPw2xsoKEHfebNi7AR0JVby6Te08pwdH478xs6SguGU1k6CFkNr/jHPBwumleW afVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=J5Z3+P1O; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si13671959plh.469.2018.04.08.21.16.42; Sun, 08 Apr 2018 21:17:19 -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=pass header.i=@microsoft.com header.s=selector1 header.b=J5Z3+P1O; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754405AbeDIEKz (ORCPT + 99 others); Mon, 9 Apr 2018 00:10:55 -0400 Received: from mail-co1nam03on0101.outbound.protection.outlook.com ([104.47.40.101]:48974 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752996AbeDIARC (ORCPT ); Sun, 8 Apr 2018 20:17:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=t3+S5T1SQvbM7HS1mHUAHCUwbYrSy4QelidoN/ffFdA=; b=J5Z3+P1OKFBZo/FcYedBqEzJNOTTCKVaoMTZUXn9ntviRLrBoGxkvMluWBvMFQ/41uIPZ1GzANSi6EPQbQZSDwU7vWxT0HFLGOufDYCJ00C/nZUmk8VvTXq231XDUSuxKOTL4YrVCq0ku9AM4dRwwxRnoEMaaYQuroSmXHWXrA8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1127.namprd21.prod.outlook.com (52.132.132.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:16:58 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:16:58 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Chuck Lever , Anna Schumaker , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 018/189] xprtrdma: Eliminate unnecessary lock cycle in xprt_rdma_send_request Thread-Topic: [PATCH AUTOSEL for 4.15 018/189] xprtrdma: Eliminate unnecessary lock cycle in xprt_rdma_send_request Thread-Index: AQHTz5gSrWCSqHGLUkS2s/TqYTxTKA== Date: Mon, 9 Apr 2018 00:16:58 +0000 Message-ID: <20180409001637.162453-18-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1127;7:SFqyHYm8LNCKZnGiPwoniw7x3jvktniyH4Ryyuepk0tq22am1Vr6LV4JNUrN+msY8Di6RvxqBVDl1aaFZYwkTjjIARJ0L1qbjrVerDnZN4BvA5+X/xf0j+aH50EnpHWVKL1kNAyz98X4eCLVBGWDE3YHlcY8aFrVKHAbQhx2pw1I1Wkr8/M5x3doJoYUx++nFOArhkW4ZRuXF6k5idZzNjtvk7hP2G56h9Uvcg+HE257N0eGvSy6/sMPQJL1SxPW;20:IU4QKFpC22xb8EpcpnypHdgdDO4BIEc9oIOuBvaNvXDa0qP6RBQvt6/LPZ+Numgioyn242Jak38LltFSiRjNTuMDVD6x1M7Z/5il6nKn2nBTkU34AI+eXV6a46sQE1enVjHTdrisd+YIcDTG773E0S5MriCCrS511tH3y/g46Lc= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: cdda8afe-5513-4d76-73a1-08d59daf3583 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1127; x-ms-traffictypediagnostic: DM5PR2101MB1127: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(21532816269658)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1127;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1127; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(189003)(199004)(105586002)(186003)(66066001)(6486002)(54906003)(7736002)(26005)(575784001)(86362001)(316002)(305945005)(110136005)(478600001)(3280700002)(86612001)(10290500003)(25786009)(5250100002)(2616005)(99286004)(22452003)(5660300001)(3660700001)(2900100001)(81166006)(3846002)(2906002)(106356001)(6506007)(59450400001)(107886003)(486006)(8676002)(81156014)(14454004)(10090500001)(68736007)(4326008)(6116002)(1076002)(72206003)(102836004)(97736004)(11346002)(8936002)(476003)(2501003)(6436002)(6512007)(446003)(76176011)(36756003)(53936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1127;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9Kr+oHxp51za33G0sXRGvTM3pvQrD4Eon3mJPuvufmrhkKwm2lwz4li3hycUglTFeoE7cE+v2WfLkF+JEAqVUMbybZdY5eEqYwOJ5PKc4u6v3zi3nqv8Kcgfh5HglC+dW3IpLMQ0y2kEmizBbq1dMaPxXd9IaZJ5P02xXbqbN/lYeijRqxdVhMdoXUpQ4E4d+L9kVzG2pl5Ij2dFP3IeWHJgag8bqbp9VMsSOmDaNNpXYkz4eI+b8e4ASmXINj0+oTRrmm/xK2ETF6kK+Vc+IcDUKZPNfojn8SNWBrBDMC3WpOgYdTBTUBFtrIZQXugdMUSebu2zrCe4cElJp/zvqSxDcVCeI1yen8ijZwNhH8oszmEQaieCgheH3NnXQcYDz1euCkZnl2ARx+HhhUFlodr7hZydQO4AW0+CeJGzEgY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: cdda8afe-5513-4d76-73a1-08d59daf3583 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:16:58.4344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuck Lever [ Upstream commit 42b9f5c58aa8c59c91ead0254f0c193e3438b020 ] The rpcrdma_req is not shared yet, and its associated Send hasn't been posted, thus RMW should be safe. There's no need for the expense of a lock cycle here. Fixes: 0ba6f37012db ("xprtrdma: Refactor rpcrdma_deferred_completion") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- net/sunrpc/xprtrdma/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transpor= t.c index 6ee1ad8978f3..76c03aa6cb57 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -744,7 +744,7 @@ xprt_rdma_send_request(struct rpc_task *task) goto drop_connection; req->rl_connect_cookie =3D xprt->connect_cookie; =20 - set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags); + __set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags); if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req)) goto drop_connection; =20 --=20 2.15.1