From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBEFDA0A02; Tue, 18 May 2021 12:17:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C4EC4068E; Tue, 18 May 2021 12:17:58 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2070.outbound.protection.outlook.com [40.107.236.70]) by mails.dpdk.org (Postfix) with ESMTP id E37DE40041 for ; Tue, 18 May 2021 12:17:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mc9WrYek/OSDN9Mj8mxUO7L45R8etMN7kBStZZms4YTk6HgiR3zT/Ejl/VlsetfeBhPcBgWKg86kaOnQ+tfqKKbxQZ8vjl9XgfQsgv2LACbP43QmLS3yyHPg1qOptqAOdiXrUVj8AcJTR6+em18+RGBMdrsjy5lY9R0NY1O0wXeBf7cVpBOHLxVAxDovDk7e95kzSNMWXBzYD1V25JWq2JQJ0hyluKyn66N7Mp4MrODisOKVfUTIisQxM3RvR3rxGsxiZP9AKJq17K7AGWHFr8S1Bm/xordofgA08tCToqwikI0QUyweh1+Wl2OPHDQtDWaswhZ87FnR1ewl/WuyIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H6Y/+uWrw6M6eXDc9dH8g9d6Xkz33/n05GODS8BCcDk=; b=ZVyDi5Zq1X0Yuzuu/SWkGEsH7EtvPKZSdyAdb2ap6LntSe1Oox72X5F+a1WTiPerZRQh1Ci/bM0cOm/yS9lPYzokNqN1642isDsPpxRuly2DefWVPhhogrb2IaG0nhKo6OICV9ISm+DP14I6LBm6qOcbNbhGA2tWQUba3VpHhnUA5uSpqnnWxKTYv5oc9RWDpM5lhr4rtgtc//qiUWaX8zCglDIldwO7R+CeQA9K7mM9JlXluwwGpl8LXzbmZdkommCC6kmu6Z7M3pvYlJH8BkdTn+yQ3EBQHev6DEBURoh1ZZ/CIBzr1oQ6A2NXK1P+nVWAybMfo6+JfDADkUh6UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H6Y/+uWrw6M6eXDc9dH8g9d6Xkz33/n05GODS8BCcDk=; b=CvyuGj99mJV7eHvw2deq609ib2pHuFR1iSd3ri0CTemcqBhQHPmrSBhP0L+ApsD3GMr3yBwNq6pYzfcoRCgz9Rkr5n+1AKj/ZwOiY98F2Cn8WFLewgiSXFzMuXSdEqvJDO8M/JY4ZlQ1jzm52sBLMwCum5YNuqm2xsJJf1WnveR6P06tLJ5uQ+0BxWEzG1lmM5yoeWYhKcG+2XiMnwCvkK4LyYhczn7sdcxDTKGpILq0vM7pX3Mu7EcOLDnecLoPM8W89LrGq2AZ9jCYEMF4shDFdjdEP7UDAYlXbIgk75eCqDn4nwuz4RxLGnfGsoNz2x6O4ehS/RgplEDhy0a6rg== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM5PR12MB1306.namprd12.prod.outlook.com (2603:10b6:3:6c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Tue, 18 May 2021 10:17:55 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4%5]) with mapi id 15.20.4129.031; Tue, 18 May 2021 10:17:54 +0000 From: Slava Ovsiienko To: Feifei Wang , Matan Azrad , Shahaf Shuler CC: "dev@dpdk.org" , "nd@arm.com" , Ruifeng Wang Thread-Topic: [PATCH v3 2/2] net/mlx5: remove unnecessary wmb for Memory Region cache Thread-Index: AQHXS8L1nVg4vPU6xk+TxKyblph5K6rpBiFg Date: Tue, 18 May 2021 10:17:54 +0000 Message-ID: References: <20210318071840.359957-1-feifei.wang2@arm.com> <20210518085058.630072-1-feifei.wang2@arm.com> <20210518085058.630072-3-feifei.wang2@arm.com> In-Reply-To: <20210518085058.630072-3-feifei.wang2@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [188.163.75.124] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f7383121-867f-4cee-935d-08d919e633a2 x-ms-traffictypediagnostic: DM5PR12MB1306: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gqNPyu3AIq/QDxfLl1hZRXzdka4vR2LSwt2tJ4MtWcbW5aYzc/x/+S3kWJLKVfhKNJmJfVQvu/k6XN5QKr+IYwsnoeS2JT2ju0QPEzg9mEutSW8eCUYjtXVQctIOwC0Xk1WE2u4unTpTtjUIIY4FThLQ/uW2cW52/IWIK4RQTl5IKLYwF0U3fRSIk28PQKO8g7Lpo0Ra3tnDdMvXXrzhBMWQHCkV+/OIKXcPjWx2KGU1pC84eeWhOATqUl7ZO+PmgDhC9ksR2U/2HOVSpSY8vk34pIE3X+J0HSvi3196D4F8Q9Tzb917cTXxsN6mEQN16XCTYmyc7ZYYP3leAJO8W+LQ7EnSylNKe9wjdFqnwcmo2pONG79cEY8EHeSRQtJ6ZiezxWP12TSC9nrxSEdAvYtGY0JNawVo2IEzkxP7mSWfvCtBq6avHwml+CDBnU2HuPFRkPCVK6Xs39xGdqnLCO60m5Fi1t+OHkngmAXhoqey7yfbuJd6jyENC0db+4eQU7TWae/z6arMEXofZyUb30/wu/igMT6v8GNcrH69ZukSc/49aH989BD05hADEcALEqzOadbymCgaoaJz45X6zjaysPjFlQ0ag0Sj35w4/MM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(396003)(39850400004)(136003)(346002)(83380400001)(9686003)(5660300002)(38100700002)(86362001)(26005)(33656002)(2906002)(6506007)(8676002)(8936002)(71200400001)(76116006)(66556008)(64756008)(66446008)(66476007)(55016002)(122000001)(66946007)(7696005)(52536014)(186003)(478600001)(54906003)(6636002)(110136005)(316002)(4326008)(53546011)(55236004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?StaNanfowTcZqkw5bCPKNvX5progy+khOG6JMdQzAUz1jl9pzYO9iL987/G9?= =?us-ascii?Q?qIw1hYUceon6BpWhyELFEtOI3XcubF1qsKbNsgaDcOLJol53y+YC8Tu4K6Gk?= =?us-ascii?Q?97wziB4jHlpTsD90VJP7V0Hv6CONM483QNCC67fFy/cXTK2kXYXe2LdYb7Uz?= =?us-ascii?Q?7IBS4WEEUTH6YRcxGiAb3KW3MNIpHCVRCwVj8Xb2oE83cJOxIRDv4/MyVleL?= =?us-ascii?Q?Kd6fTgMluuOt58vjvwk/w+57NL6ndmplQTrNoeTMkXNkhSSIN0luRTKZ2Jvp?= =?us-ascii?Q?Qcm+XT3T8b7f37P9jzweYj8xo709nZptErifOAvl2q41vTGGiuMZfzonutDD?= =?us-ascii?Q?ZuJdiZintH2Be3uOGio/CNKki21QkDCLxFFil4skWTj/7bt525QGB2pMQDqp?= =?us-ascii?Q?U5cDVUl4IkuIrhf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C?= =?us-ascii?Q?WHW8vKskzK2XAs1UavVHVvJ+?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7383121-867f-4cee-935d-08d919e633a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2021 10:17:54.7641 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cB8YIu0Hk06KQkRjAp4fx28tfunpaSKGV0siZZBQuJFvPtK24qy0jbVhsJbn+lhcA/iEjzJj43nYheovcJnW7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1306 Subject: Re: [dpdk-dev] [PATCH v3 2/2] net/mlx5: remove unnecessary wmb for Memory Region cache X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Feifei Wang > Sent: Tuesday, May 18, 2021 11:51 > To: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko > Cc: dev@dpdk.org; nd@arm.com; Feifei Wang ; > Ruifeng Wang > Subject: [PATCH v3 2/2] net/mlx5: remove unnecessary wmb for Memory > Region cache >=20 > 'dev_gen' is a variable to trigger all cores to flush their local caches = once the > global MR cache has been rebuilt. >=20 > This is due to MR cache's R/W lock can maintain synchronization between > threads: >=20 > 1. dev_gen and global cache updating ordering inside the lock protected > section does not matter. Because other threads cannot take the lock until > global cache has been updated. Thus, in out of order platform, even if ot= her > agents firstly observe updated dev_gen but global does not update, they > also have to wait the lock. As a result, it is unnecessary to add a wmb > between global cache rebuilding and updating the dev_gen to keep the > memory store order. >=20 > 2. Store-Release of unlock provides the implicit wmb at the level visible= by > software. This makes 'rebuilding global cache' and 'updating dev_gen' be > observed before local_cache starts to be updated by other agents. Thus, > wmb after 'updating dev_gen' can be removed. >=20 > Suggested-by: Ruifeng Wang > Signed-off-by: Feifei Wang > Reviewed-by: Ruifeng Wang Acked-by: Viacheslav Ovsiienko Thanks a lot for patience and cooperation. With best regards, Slava