From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60089.outbound.protection.outlook.com [40.107.6.89]) by dpdk.org (Postfix) with ESMTP id A95B24C91; Tue, 13 Nov 2018 18:16:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mFKr6HSy4P3JbTnwMtYaBPQHUGQLy595wfZE/3LeAAs=; b=KkdkFNn0Dq87FUGdhImeP3DLKlIWkPJ8T4MKuD1jgKtLgXxxW6kUU0F18MfBx+tnYmLlReiUcnkvWzETBbwTernSXInVCwL0AIwtQQf+yUxe59hsE8thm2zzs8XwOu1/x+inC03BTSvvVVnW+xBwyZWIXXMLmOMSK1/AftRpyhM= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3605.eurprd08.prod.outlook.com (20.177.115.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Tue, 13 Nov 2018 17:16:36 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27%6]) with mapi id 15.20.1294.045; Tue, 13 Nov 2018 17:16:36 +0000 From: Honnappa Nagarahalli To: Thomas Monjalon , Bruce Richardson , Yipeng Wang CC: "stable@dpdk.org" , "dev@dpdk.org" , nd , nd Thread-Topic: [dpdk-stable] [dpdk-dev] [PATCH v2 2/4] hash: add local cache for TSX region Thread-Index: AQHUenUnhTpWWqfANECzeFHeMz/st6VMZdSggAGETQCAAAULsA== Date: Tue, 13 Nov 2018 17:16:36 +0000 Message-ID: References: <20181105173913.61225-1-bruce.richardson@intel.com> <20181112104719.62568-3-bruce.richardson@intel.com> <2853815.6en7p1Z5Aa@xps> In-Reply-To: <2853815.6en7p1Z5Aa@xps> 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=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3605; 6:KN4d2hs0fTu1J7pm/1nNKutmoBGW7iqEpsCHMSvW66DPOYJ4lXgh7PKJ7Yecan2tMHUYNRZIwZuLWtj4ySFGYWbP55WKdTeJhHO84g5itkwyvf6zXiI2EemNyVKdh7tBpuuCJd4JjHq+rZg95oEhEJsx3phGl5B3/TOSl1bn8k/7QvyJHzfwoqz5CwCUXsvjHN6ZFRYU256J+wK95Kwh4oJ/zuZSsx8RvU2hNhW6U6ytqdwbF+Pq910OLG7OSGJGAQ8O7vjZIoE2rxs7gJc341OPTDu2d+etu9XzqkjHyFQqmnZZmBJ04hQ4DT5uNjBhS6oFCt2zEJotBxrc62Od+hvoo39DVCTaSHDrI35/uJdLMKQU0JGXR1X7bqG0+G8KGvtOOpQtQlEf9qF0y82QjduMwWVscwKabgHzpCm7Jd2F6P1hrl8g//vqfLagv2QkI9j0V2k/7vk4HBdX28m4CQ==; 5:m9c0sLl6Fq8sFmCv2eKyQGAmITbSM/iVRxkDLTvZC+JXGL/3Hopsv2QscPCe9ScwXr3qpCNg6CfNrWkU0kjSCjm6m6k4rgDGeEtk8EHFxBNHDKWxj/Jp25m6oZvZQ1BiLFoqUAlySXQtGGImwqRSphOmn/ohm5weZPJ2ROo7/Oo=; 7:TadE7nkbg2xOS6OlitzGi/vQi/Xf5Q1tkKrp8j+gCoFsGQhrYKa4A1ITq3aBCylAuRml6ztYVRzFoIKpROgGsN9l+3fs5BkW3IsjXlC9AY4Yly6zsuoAvdJiNVKU0A0CjYU9qm9UoEhci3ONkE7apg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 30c5fb38-f029-47c0-69bd-08d6498bc491 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390060)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3605; x-ms-traffictypediagnostic: AM6PR08MB3605: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231382)(944501410)(52105112)(3002001)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM6PR08MB3605; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3605; x-forefront-prvs: 085551F5A8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(346002)(136003)(199004)(189003)(256004)(476003)(76176011)(446003)(102836004)(99286004)(14444005)(11346002)(229853002)(6436002)(7696005)(71200400001)(71190400001)(6246003)(5660300001)(72206003)(9686003)(8936002)(25786009)(81166006)(81156014)(105586002)(478600001)(55016002)(8676002)(53936002)(6506007)(106356001)(86362001)(4326008)(186003)(26005)(486006)(14454004)(74316002)(316002)(305945005)(2906002)(97736004)(54906003)(110136005)(66066001)(68736007)(33656002)(93886005)(2900100001)(3846002)(7736002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3605; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OZN+5ed7234FS7GKuo0nhwBrIJfSyObh8mRg04kv7GCRr3QeNaQyoIv6u72Nb09dJ8W67pCgJvTo0LcXla2K78M5HoNIutFYh+BKPexWMSiO2BhNvFEF2bw7/UpUUZtkImxjHKNCnbjkY9DRQ4WGKA2N3S+Zcgjbkq4Lclbgzt4N/br78pw/wvefYqL/2F9hEXJ2PzJaN4INxqth5WF7iloGpZKT6XTnJHmIUkwZowU6qgotN64O0u+jw5iQSsQBNwy2imsiEYKfZ5luPAzWkXYjl/hbg5HF1a5eYFd+TJXBvnCX2ZnrzNIf+0fPcli6GW2eG103kVjaJcIWiIWS2xhRw8NaLXnMn2i7ppE+a9c= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30c5fb38-f029-47c0-69bd-08d6498bc491 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2018 17:16:36.5518 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3605 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/4] hash: add local cache for TSX region X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2018 17:16:37 -0000 > > > > > > From: Yipeng Wang > > > > > > This patch adds back the local cache when TSX support is turned on. > > > > > > When TSX is turned on, free key-data slot ring would be contended by > > > various TSX regions. The purpose of this commit is to reduce > > > possible memory collisions during key insertion. > > > > > > Signed-off-by: Yipeng Wang > > > Acked-by: Bruce Richardson > > > --- > > > lib/librte_hash/rte_cuckoo_hash.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/lib/librte_hash/rte_cuckoo_hash.c > > > b/lib/librte_hash/rte_cuckoo_hash.c > > > index 76f5dc8..5d5f9f1 100644 > > > --- a/lib/librte_hash/rte_cuckoo_hash.c > > > +++ b/lib/librte_hash/rte_cuckoo_hash.c > > > @@ -180,8 +180,10 @@ struct rte_hash * > > > } > > > > > > /* Check extra flags field to check extra options. */ > > > - if (params->extra_flag & > > > RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) > > > + if (params->extra_flag & > > > RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) { > > > + use_local_cache =3D 1; > > Do you see the issue even in the case of single writer? Enabling this f= lag > creates local caches on all the data plane cores. This increases the memo= ry > usage for the single writer use case. Then there is 'writers on the contr= ol > plane' use case, the requirement on hash_add rate is comparatively lower > when compared to 'writers on the data plane'. The writers also are not pi= nned > to any core as well. In this use case, I am not sure how much having a lo= cal > cache matters. > > > > Enabling this flag effectively changes the free slot allocation from a = ring to a > stack data structure. Does it indicate that for single writer use case wi= th TSX, > the free slot (global) data structure should be a stack (rather than a ri= ng)? >=20 > Is it blocking this patchset from entering in 18.11? > If I understand well, there are some fixes for 18.11. >=20 I am fine with the other fixes in this patchset