Received: by 10.213.65.68 with SMTP id h4csp194045imn; Tue, 20 Mar 2018 00:40:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELsYfSNnR1HgFegeNz88hdeaDKnSkpDpj9qGYybu2v8cH6HShdu6udoAcgNbHNJtqIxLgWFG X-Received: by 10.99.185.71 with SMTP id v7mr11525609pgo.12.1521531604288; Tue, 20 Mar 2018 00:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521531604; cv=none; d=google.com; s=arc-20160816; b=O/s26fG5jwoL3ujpAScRnJCG+RXVMA8MC6mCfSwVPFTxg/3JH2PD4/BY0ao3K7Oybc zSuccp12cc5jIsN9JD3AzREFjP7PqhVcOxFlTWrRZEr/okhL139YsJY0zXbqIvGfnTWJ 86cc8uZAE1RV6Y2OPBDUyeDZUhubtzf5uwvDfMsx8wDJtHKFbmATZW0DdjxQ3PlJrXIQ +X5rkS7q+FoO68u44zbqze1aNOeH/83q8oEQmmbamqPN/tdRxinI6A6fUDUkjQv89iPg VCaTWC4Dfk0NYg7rlXq/eJzzeSWGDAnJeYw9ckOPblv3/ZfSQ/g4FGk6RIqnNI1QSBia TeoA== 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=aPejia7ZJR3IZuvxh3cD6bCFH2dioJcn3RKZaDJRrdY=; b=hoC/4FKkMuUK3BBUU7GizxiqpQFwlC7EhY5ElbiEtpYFPu1aA1lnt3ytNHc8PY8vgY txqQFe5mm0ZdwjRKYtpb3qvUh0393WRtWN43nGyI/+rsYFk/FLp4ybchSAkgGZHn5SXN zBJFtyuQpjwpbvAGFTmM5V9ETWylE1ugUMphHw0ymNmVIdw8OTbAHJB53JowHsStChOV Yv9u3ZmT3RppYeJfanRfjFrNYhiaPK7TkVyOa0pET8Q2tHSmsXeF8wLbdh2z/X1TIuAs DsB3/ojYOBzTmHODsVMZCuQSzMXUBVj4s61Nz+LxA0l8dvjsnr0PR2tBXTx7I6l/E/pL 6/5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=ZduVVS1V; 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 d6-v6si1050334plo.661.2018.03.20.00.39.49; Tue, 20 Mar 2018 00:40:04 -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=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=ZduVVS1V; 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 S1751548AbeCTHi5 (ORCPT + 99 others); Tue, 20 Mar 2018 03:38:57 -0400 Received: from mail-bl2nam02on0064.outbound.protection.outlook.com ([104.47.38.64]:59709 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751105AbeCTHiw (ORCPT ); Tue, 20 Mar 2018 03:38:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=aPejia7ZJR3IZuvxh3cD6bCFH2dioJcn3RKZaDJRrdY=; b=ZduVVS1VKmXOiOxVFRhhlq7Hu6iRetYcknxTYn7/7i8y8dEw7LCXQiSOREyCJ1WzC5LtWVySUujpaD+S0zzaYMW6aqjdoNZUt/eKA4Qvm6YLPOupaymVfaHy14PSz6NDDTT72JIcHhidP+Vh0/szhhtsEW7OpsFim3Up2lbETWk= Received: from CY1PR0701MB2012.namprd07.prod.outlook.com (10.163.142.11) by CY1PR0701MB1209.namprd07.prod.outlook.com (10.160.146.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 07:38:49 +0000 Received: from CY1PR0701MB2012.namprd07.prod.outlook.com ([10.163.142.11]) by CY1PR0701MB2012.namprd07.prod.outlook.com ([10.163.142.11]) with mapi id 15.20.0588.017; Tue, 20 Mar 2018 07:38:48 +0000 From: "Kalderon, Michal" To: Sinan Kaya , "linux-rdma@vger.kernel.org" , "timur@codeaurora.org" , "sulrich@codeaurora.org" CC: "linux-arm-msm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Elior, Ariel" , Doug Ledford , Jason Gunthorpe , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 6/6] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2 Thread-Topic: [PATCH v4 6/6] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2 Thread-Index: AQHTv/XgDF5N2M61Z0a+5WLZn1a4n6PYvOhw Date: Tue, 20 Mar 2018 07:38:48 +0000 Message-ID: References: <1521514068-8856-1-git-send-email-okaya@codeaurora.org> <1521514068-8856-7-git-send-email-okaya@codeaurora.org> In-Reply-To: <1521514068-8856-7-git-send-email-okaya@codeaurora.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michal.Kalderon@cavium.com; x-originating-ip: [31.168.140.228] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0701MB1209;7:DXUf+D8QGzFqf0gKvc4oNH+TdM3lkpVnHUOX0nCxWwB1ujtgY1yk/jV28yLJ6+hZG5oVntcuDHZPEJnjWkGi2JcEIVCo8zcEjk48lsr+LGm2eCdvvCYHYsKPCdpYUsP7JudWFyvQvAOHq/+wAiiAnSnP+UleVw2whb9cGmowjFsJGmZnBJG/G+WVwdm6ixIOJOPVSrz61/US9OuB15CLiHB7jQawKcHrqfioYZIip9EnP/B7KjiE9jEKkXnWi10+ x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(376002)(366004)(346002)(39380400002)(396003)(39860400002)(189003)(199004)(2900100001)(7736002)(4326008)(106356001)(26005)(6436002)(316002)(77096007)(6116002)(53936002)(3846002)(2201001)(186003)(2906002)(68736007)(3280700002)(55016002)(9686003)(5660300001)(86362001)(2950100002)(66066001)(97736004)(105586002)(99286004)(72206003)(6506007)(7696005)(14454004)(33656002)(102836004)(54906003)(110136005)(229853002)(8676002)(81156014)(74316002)(6246003)(305945005)(25786009)(81166006)(3660700001)(8936002)(76176011)(2501003)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1209;H:CY1PR0701MB2012.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 60d49b38-eb41-4df7-d777-08d58e359e77 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:CY1PR0701MB1209; x-ms-traffictypediagnostic: CY1PR0701MB1209: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501244)(52105095)(93006095)(93001095)(10201501046)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:CY1PR0701MB1209;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1209; x-forefront-prvs: 061725F016 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: BtVFo+HVoA7bIeCdqfKxQpCydH5T7rRJPWdjSD8Z1rRGo086yyQ8NG8sfceU5tmUYrFem2nnEzVroD9ZU08849w6Z4bV9jbkxSIEdyz1BJQTdjSCagziB3zncD5nd40M9LBZmwLQGfJ/1ubNRhV7fNGcCRSXiQ8bPEsuLm9hVy0ZlOo7UpfHZaFS//fj/GatMyAYGb0EREXm+wS8z5dwIFaRjGsye6gGbMjRBTTETba+8LQ99hfltnxYZs3A/3lEFebAgf80+b0MW2TdodowQWUuaudYaeqTAukZ0Hxup11rTmEHEOqI7sPIQBZRCA4GC2CFItPUK0PBKaHUUFiv/A== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60d49b38-eb41-4df7-d777-08d58e359e77 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2018 07:38:48.3983 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1209 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Sinan Kaya [mailto:okaya@codeaurora.org] > Sent: Tuesday, March 20, 2018 4:48 AM >=20 > Code includes wmb() followed by writel() in multiple places. writel() alr= eady > has a barrier on some architectures like arm64. >=20 > This ends up CPU observing two barriers back to back before executing the > register write. >=20 > Since code already has an explicit barrier call, changing writel() to > writel_relaxed(). >=20 > Signed-off-by: Sinan Kaya > --- > drivers/infiniband/hw/qedr/verbs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/infiniband/hw/qedr/verbs.c > b/drivers/infiniband/hw/qedr/verbs.c > index ccd55f4..db60360 100644 > --- a/drivers/infiniband/hw/qedr/verbs.c > +++ b/drivers/infiniband/hw/qedr/verbs.c > @@ -860,7 +860,7 @@ static void doorbell_cq(struct qedr_cq *cq, u32 cons, > u8 flags) > wmb(); > cq->db.data.agg_flags =3D flags; > cq->db.data.value =3D cpu_to_le32(cons); > - writeq(cq->db.raw, cq->db_addr); > + writeq_relaxed(cq->db.raw, cq->db_addr); >=20 > /* Make sure write would stick */ > mmiowb(); > @@ -3338,7 +3338,7 @@ int qedr_post_recv(struct ib_qp *ibqp, struct > ib_recv_wr *wr, >=20 > qp->rq.db_data.data.value++; >=20 > - writel(qp->rq.db_data.raw, qp->rq.db); > + writel_relaxed(qp->rq.db_data.raw, qp->rq.db); >=20 > /* Make sure write sticks */ > mmiowb(); > -- > 2.7.4 Acked-by: Michal Kalderon