From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30050.outbound.protection.outlook.com [40.107.3.50]) by dpdk.org (Postfix) with ESMTP id 020AA5F25 for ; Wed, 3 Oct 2018 19:39:15 +0200 (CEST) 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=e2UdjdczG8z4OLqW1AMWyJuwrmpd4qeVUmspSD3hdqg=; b=T3U0t9DaRUSOwlUrSsRw2n/+vAopemowk9R3xNYxcajLqq6Tgiq38EyQRTiQxnyNt4S1hjIqa86dV+pOvieH5nqPXCcJwMjAratVzbWhAaWJ+VsRq4EBB591q2GSbXgDX4IkrCN867hMOQ1Iq7bDh74A17ZTtrFrUBNOwqWXjR4= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3191.eurprd08.prod.outlook.com (52.135.164.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Wed, 3 Oct 2018 17:39:13 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::f423:e46a:a03c:e928]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::f423:e46a:a03c:e928%2]) with mapi id 15.20.1185.026; Wed, 3 Oct 2018 17:39:13 +0000 From: Honnappa Nagarahalli To: "Wang, Yipeng1" , "Richardson, Bruce" , "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "Gavin Hu (Arm Technology China)" , Steve Capper , Ola Liljedahl , nd , "Gobriel, Sameh" Thread-Topic: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys Thread-Index: AQHURgTOka1Jda13D0abVoUE3K2emKUE/J/wgAUQ84CAARZ74IABp7xAgAEn6lA= Date: Wed, 3 Oct 2018 17:39:13 +0000 Message-ID: References: <1536253938-192391-1-git-send-email-honnappa.nagarahalli@arm.com> <1536253938-192391-4-git-send-email-honnappa.nagarahalli@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3191; 6:t5Rkc0Lxz0ERuCp/uGmDOfaxK3TsAjbRM6pDaz1HDrTJsvvT2msx4oyYjG34tE43zjnWLJRrkScCnOlcBcxUYdYnnychB0+RizA2Ja3+GhVCY17SRnK/XKpNUVBqSo2XZ3K5k3694dkBjTSK2UF0D0Cg2YgrmFmaWMJ1v3cUOJBR/9fOBF1HQqmvSXo+17pM7hsgZ1M5OyVn6Z1I+nm3/cC4zrDnCaP8dS4LV5BYiyKVO6XDCdhWi7t2GevDPR/MdjyIfWZ+GlIkT6B7Q9hw52nAly7tH/+M6i19XoKkPgMBSArPDmwMIVnmC53bY/fSoKAl7Ot8t+d6tpD7iVSsDGRQnn8Lo4wXG5/nSAE20jAUnNPUf3uBYAfwiEqJNxs8B0lZTNypYg727LVes/Fj8p0GbnfWJXBBHB7bYoU6PdoY0MN5rRlNCidiU+x8yF5hVth8gKdB7KWYDqbU7MIwgg==; 5:BC0B9EWiSz0r447/sOvuiBy36TvRNm5EYpTsJaONxyhgs64Iq5/W2QsWC0hZc13wRQfbTVrFVoeIbFR1Xkhidu7iROnfSDy2dLC7YCDKp0pCxm4N6eP4TtSiqtwBNuMkldTgpoUmar/IwIJKfPpIKdnxHwyZ7juxn+Z/HEJmhU4=; 7:fVXGT9ph4cnusHCjXhz4q0l24nzdh65I1+lLNE/5iWLzzbpG+RKyK73cviTAHG7+7dpkM1GXZi/TjKNkgKSPrLHAAsiV1NtienT9szO/iaQkGaC3bxvPrDBXDd/uH5Xapu1sBMBI6UhegZ1ooVoCe1N9f4dhXH+oHILcc6AfvKu1J8vaNg65eRlyNmPeX2DbZC5Dtvgau6p5xruLmVL+H9rblsvswvr/Ll2SsUhsVLz8QbgU1xFcreKbcUmnM4WT x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: a7431319-be48-4a83-607a-08d62957226d 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:AM6PR08MB3191; x-ms-traffictypediagnostic: AM6PR08MB3191: 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)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991048); SRVR:AM6PR08MB3191; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3191; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(396003)(39860400002)(136003)(13464003)(189003)(199004)(478600001)(68736007)(72206003)(14454004)(25786009)(2900100001)(4326008)(33656002)(55016002)(6436002)(86362001)(229853002)(5250100002)(9686003)(97736004)(7736002)(3846002)(74316002)(5660300001)(8936002)(305945005)(81156014)(8676002)(2906002)(81166006)(6116002)(53936002)(71200400001)(71190400001)(316002)(110136005)(54906003)(14444005)(256004)(6346003)(66066001)(7696005)(93886005)(99286004)(6506007)(102836004)(76176011)(26005)(105586002)(6246003)(476003)(106356001)(186003)(11346002)(486006)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3191; 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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-microsoft-antispam-message-info: 668A30a4yNVn0LQv0aPWpuuAkELlKp5udAn9CQaVo83WjvssU9D1f/RQUWgy3jDTuTQ5g55jaYWXJzuQlsbeg61xvrwhkkLh3O0kBnmRQknPXSngmjfGGG4veOjSmeOxNqdnMGsnvOg1isJEcGtHTgBTBOknmrVJSaQ0HpfekPELQxMp+navZoTuCCbgaIC14xjFqzpf6qT6FLrGaYaY1mpDVZ4UoOBMemwrm++WTyaGHqiy2rwQSKInh/1C4SV8AS0Jm2Y6FxZwTSOhVNGn0GPFTSN/jYcV4rnKBLIHEdXumBkxvrN9k/Wauvq+CS+7lli4MzrJHq8+BYFyUAZV5dX3ymacV/bDhGOiZ/kOKn0= 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: a7431319-be48-4a83-607a-08d62957226d X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2018 17:39:13.5209 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3191 Subject: Re: [dpdk-dev] [PATCH 3/4] hash: fix rw concurrency while moving keys 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: Wed, 03 Oct 2018 17:39:15 -0000 > >-----Original Message----- > >[Wang, Yipeng] I was thinking about another corner case and wondering > >if the version counter needs to be done on key deletion as well. > >For example, a reader reads out the index and falsely matches a > >signature, before it reads out the data and the key, the key-data pair > >got deleted, removed, and recycled by another writer thread. This > >writer partially overwrote the key (because key store is too large to be > atomic). > >Now, the reader begins to compare the key, and accidentally matches the > >key (because the key is partially written and accidentally matches), > >will The reader read the wrong data out (which should have been a lookup > miss)? > > > [Wang, Yipeng] As a second thought after reading your slides, I think the > scenario I described above should be handled by the upper level applicati= on > using RCU-like mechanisms to recycle key-data only after the grace period= . > So I think it is OK. Please ignore my last comment. >=20 > But if convenient, please add more comment in the API doc and in user > guide as well just in case users might not understand the restriction. >=20 Agree, it needs careful documentation. I plan to change the documentation a= fter the patch is completed. > Thanks > Yipeng