From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00088.outbound.protection.outlook.com [40.107.0.88]) by dpdk.org (Postfix) with ESMTP id 2F42E28FD for ; Fri, 9 Nov 2018 03:20:52 +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=ShubsVXAiJL91kBuL10Ul7T+woEI7SldYCQB+kLOPa0=; b=WLRTj6aotJKP0NvGdV+hHQwmMo+q+NGRzUi5SXuKrvRbFpDfxLJC+EOnCTucwOhbvT/mwudsgB2IMEiAtYMqrljZwWckV3INVaKUAVdEAB34CZuJEJxX9AJ/WuY+tkp+bov6FSQCIAM74Zeyfui2SCMKvSbGq376sjA8o7r8bxk= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3287.eurprd08.prod.outlook.com (52.135.164.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Fri, 9 Nov 2018 02:20:50 +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.034; Fri, 9 Nov 2018 02:20:50 +0000 From: Honnappa Nagarahalli To: Jerin Jacob CC: "bruce.richardson@intel.com" , "pablo.de.lara.guarch@intel.com" , "dev@dpdk.org" , "yipeng1.wang@intel.com" , Dharmik Thakkar , "Gavin Hu (Arm Technology China)" , nd , "thomas@monjalon.net" , "ferruh.yigit@intel.com" , "hemant.agrawal@nxp.com" , "chaozhu@linux.vnet.ibm.com" , "Kapoor, Prasun" , nd , nd Thread-Topic: [dpdk-dev] [PATCH v7 4/5] hash: add lock-free read-write concurrency Thread-Index: AQHUbO4hC1hG0V5Pe0K6GLHhoSzYDKU9/ZaAgAA/xYCAA9sPQIAAbsAAgAQrzkCAABiUEA== Date: Fri, 9 Nov 2018 02:20:50 +0000 Message-ID: References: <1540532253-112591-1-git-send-email-honnappa.nagarahalli@arm.com> <1540532253-112591-5-git-send-email-honnappa.nagarahalli@arm.com> <20181103115240.GA3608@jerin> <20181103154039.GA25488@jerin> <20181106090953.GA5671@jerin> In-Reply-To: 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; AM6PR08MB3287; 6:mcTFdQLzDzoO97AHZYfyWxvOwHdmETU7wG2yydfYRKfDAOsVXoJq2+n1spTFNhFQya3V8Xecs5lXMF39H2bedWPMA2aFI5QQIhUqfKob6mX/5MOWX0S13r/waPLIHIVSIlFjrNXg+QGh6Dn5QM2ebLfHkfWu2HRjajQ1Ki0PHMWf+A344hMsKhJM54/7SzcZUhcz/ScUxCcOO6r+s7w/8LeanT1McdJESZG9VU6ZTlNoYywghabVwChln45J0Se0Ej2piIZ3qJ6ht4giiRN2bXgkj8KKWMH5KLEWRVmtaUlLqb5r8ZFLYAyajruO0SoM7wYKXtqOQkCH5ZqODZfL9RnxHE7csO3lyLpsXwNNSz5as8VBC1Q3/T1D2BpeNRs8saP4VNeuZP7xuHN7fdokHHPhJYyP9XGoL+iImRqZKZ1BQTydfRzenofDY71PwZ34S/JayeM8Sbczo59Mg9V3Sw==; 5:HvqYmgHspLh67gQpaA+JsZ4WHVbbereT2OUyxxH7otp53ClpHR4+TUIUmDkclixn1I6CNOfaOIf9hoPmArO3iL7aN78yuOrnSkOicQloQ/LbRvA/E10jsyah++IpirtwqeXvY6QCxJ+mar5zXZTc1apV8+dIDVHBepwCFB8dBvk=; 7:hdq0Ao/pI04m5U6PFYBgda8VPd56iKXfh4VA7B9SUAF99cUyOJFaKfttxzWi9ZRIaQAz9F4322P8VB/eGk1vHjGD0RpzNIPyJKuZ3bXnYKv3KVhROlXGO5PtMz1qzTGV4z6r0vnZKH5LjD71XocEhA== x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: bde04cc1-b45c-4b78-6f8c-08d645e9f7df x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3287; x-ms-traffictypediagnostic: AM6PR08MB3287: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:AM6PR08MB3287; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3287; x-forefront-prvs: 08512C5403 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(39860400002)(136003)(376002)(189003)(199004)(86362001)(4326008)(53936002)(3846002)(66066001)(7416002)(256004)(6246003)(9686003)(54906003)(316002)(55016002)(33656002)(97736004)(72206003)(14454004)(6506007)(81156014)(71190400001)(102836004)(71200400001)(478600001)(8676002)(81166006)(76176011)(8936002)(68736007)(7696005)(25786009)(6116002)(99286004)(446003)(11346002)(74316002)(93156006)(186003)(229853002)(26005)(6436002)(476003)(14444005)(93886005)(305945005)(5660300001)(2940100002)(2906002)(106356001)(7736002)(6916009)(486006)(105586002)(2900100001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3287; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Lngv2jTHwn+27A2/Ie6qJRAuaTCEL+5c4N3SlwgvBvEsp7ViArCeeB4xbs5ZAp+/i3T7mrjDIYZp07YNVXybTrvmn+CRRp1UWO+GXlLkqMPFLbF/MIL3ppIM7LNtjBVff3XqyHSDE+kKBkopnOsJP05WIkuw+lO6l+5lXsxCcbnKGth6eMlNTXifutxWuHmdoEd4UegxqZIv0UugX5/aoUddqpO5uwXlTOsv3ROBJ6PmddIj3lCJWBp7G/ZxF5khadfCLIxgvsPX5AqPAvKBRFtDcpCNnc+9DhnB47okQYOnG7YLevb1Uax57xwMbySNwlyteWaBzbOc3825sLyx6S10tIM1UX7x45HgrP2aM1w= 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: bde04cc1-b45c-4b78-6f8c-08d645e9f7df X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2018 02:20:50.6715 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3287 Subject: Re: [dpdk-dev] [PATCH v7 4/5] hash: add lock-free read-write concurrency 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: Fri, 09 Nov 2018 02:20:52 -0000 >=20 > > > Agree. There are multiple micro-architectures in Arm eco-system. We > > should establish few simple rules to make sure algorithms perform well > > on all the available platforms. I established few rules in VPP and > > they are working fine so far. > > > > Can you share that rules for everyone's benefit? > > > These are just few simple rules anyone can think of, but avoid the surpri= ses. > We identified a owner for each platform (we have this already in DPDK, ev= en > across platforms) Each patch submitted for Arm platforms is marked with -= 2 > (VPP uses Gerrit) Every platform owner tests on her/his platform. -2 will= be > removed only if it does not cause regression on any platforms. Platform > owner helps out with optimization where required as they understand their > micro-architecture best. I guess this is what is supposed to happen throu= gh > the review process in DPDK. But making sure everyone tests it before it g= ets > merged avoids the surprises. >=20 > > > > > > > > IMO, This scheme won't work. I think, we are introducing such > > > > performance critical feature, we need to put under function > > > > pointer scheme so that if an application does not need such > > > > feature it can use > > plain loads. > > > > > > > IMO, we should do some more debugging before going into exploring > > > other > > options. > > > > Yes. But, how do we align with v18.11 release? > > > I think I have spent enough time optimizing the code. Please provide the > feedback and I will work on completing the fix. >=20 > However, if the new patch is not satisfactory enough, we need another pla= n. >=20 > You had mentioned about using function pointers. I suggest, we use the > function pointer only for lookup function. Otherwise, it will be too much= of > code duplication. > When lock-free is not used, the function with no memory-orderings will be > called. However, I am not sure about the function pointer overhead. But t= his > will be a simple change. Yipeng/Bruce, would this work for you?