From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DC65BA04F0 for ; Tue, 10 Dec 2019 06:56:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A33B11BDFD; Tue, 10 Dec 2019 06:56:45 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20069.outbound.protection.outlook.com [40.107.2.69]) by dpdk.org (Postfix) with ESMTP id 5239E23D; Tue, 10 Dec 2019 06:56:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8k2Mwr80QYdcG9s7qFtjgUNzAplO6dvmuBgCKiR+Yo0=; b=4DnCXuOCScNEDU6ria436dIdyuB/KeR9Glj3riVh+5C7nox0yZ8rHQk36EPDSXA3/gF66bKnQfACLNb3UfIgwl5IZNfI9WYAbrNCzgH3hlbu8VhDTU5BdwHIKBZbEkuGPXQeU6SCv7i6S16+GbtvAkKhwBUi7e9bW3igowtjRCQ= Received: from HE1PR0802CA0008.eurprd08.prod.outlook.com (2603:10a6:3:bd::18) by AM4PR08MB2644.eurprd08.prod.outlook.com (2603:10a6:205:c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.18; Tue, 10 Dec 2019 05:56:40 +0000 Received: from AM5EUR03FT023.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by HE1PR0802CA0008.outlook.office365.com (2603:10a6:3:bd::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.13 via Frontend Transport; Tue, 10 Dec 2019 05:56:40 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT023.mail.protection.outlook.com (10.152.16.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 10 Dec 2019 05:56:39 +0000 Received: ("Tessian outbound 1e3e4a1147b7:v37"); Tue, 10 Dec 2019 05:56:39 +0000 X-CR-MTA-TID: 64aa7808 Received: from 41dc551fa8df.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F76E9611-B0DC-4BF8-AD36-94031442C0A3.1; Tue, 10 Dec 2019 05:56:34 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 41dc551fa8df.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 10 Dec 2019 05:56:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AhoymCETau7EyITEhCUl2L+CtH2c8FUfdsYMsR/s1chKlrachRmNOsEoQXPHPqdamEZnTBtn9/5fJrFd6DqrxnGXnSuEkxFevtmfkIZMNKC3jCd3eeMgBbCDbYwWv0fuSqGb7CD0sJI87CuIhc9boAKo+fjw7P16N74apWScknH8veOKOdgoChoDvXp6GdpyC///PCBIyyy1wv4RGc470IU09fiGrUJ+jmJn4mwnAMa4wJPUt04MEjmGCxutwumd5mVy1Qq/2FkT6uUzgfTwg3rg9RCfxrBNNVj28hSFL0opNdL1BxQASW+/QwZv4iYM8CrK+JjoRhvOvCfxx+mcVA== 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=8k2Mwr80QYdcG9s7qFtjgUNzAplO6dvmuBgCKiR+Yo0=; b=hq2vhN18cXQD/0TnsdiX66RVry8yUgB1eYJbr1/yVzQTprg9Wv4s/goePFM9BDoiQ8TFux4fu8o/yZHuuJumPqpGcWxOhRW262hr14rk4suR7a/uyAQeTHXRQsu92CPKkG+KHLWLsv0Cz91kdAJS2k7XGtgn8Jp16YmsVLy1Xz/C5eJ65AINAsyM9i2j1E4py9WW9B3GV/o8qFQ9BiPddrG6tuJ6G2oIDG1IuPJ65GOg4IKRKE0qrlzq8KViW9Zq5T8uefB0Tkpz8Gmm2oKJxEHeB+uuEN1NZT0Qz1v5xvLdzFKNmscBaGJwz1oN89p4i51EWd7XD0LS5YHzG9JpjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8k2Mwr80QYdcG9s7qFtjgUNzAplO6dvmuBgCKiR+Yo0=; b=4DnCXuOCScNEDU6ria436dIdyuB/KeR9Glj3riVh+5C7nox0yZ8rHQk36EPDSXA3/gF66bKnQfACLNb3UfIgwl5IZNfI9WYAbrNCzgH3hlbu8VhDTU5BdwHIKBZbEkuGPXQeU6SCv7i6S16+GbtvAkKhwBUi7e9bW3igowtjRCQ= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB5117.eurprd08.prod.outlook.com (20.179.30.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.16; Tue, 10 Dec 2019 05:56:33 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9df4:7af6:b62d:f94e]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::9df4:7af6:b62d:f94e%7]) with mapi id 15.20.2516.018; Tue, 10 Dec 2019 05:56:32 +0000 From: Honnappa Nagarahalli To: Tom Barbette , Perugu Hemasai Chandra Prasad , "users@dpdk.org" , "dev@dpdk.org" CC: nd , nd Thread-Topic: [dpdk-dev] Sharing Data structure between logical cores in DPDK- regarding Thread-Index: AQHVq1UaK4vk8nwGHUCI5SfVJjgwcKerWhy1gAeLLnA= Date: Tue, 10 Dec 2019 05:56:32 +0000 Message-ID: References: <1575542540897.56972@kth.se> In-Reply-To: <1575542540897.56972@kth.se> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: cd19b776-2aee-4241-9157-c5c5b7ac80b1.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9f530bef-b642-42b7-9f2a-08d77d35b9ce X-MS-TrafficTypeDiagnostic: VE1PR08MB5117:|AM4PR08MB2644: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 02475B2A01 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(376002)(396003)(366004)(346002)(53754006)(199004)(189003)(316002)(55016002)(478600001)(966005)(76116006)(66946007)(66556008)(9686003)(66476007)(64756008)(66446008)(229853002)(5660300002)(2906002)(305945005)(8936002)(52536014)(81156014)(4326008)(186003)(6506007)(71190400001)(110136005)(54906003)(7696005)(81166006)(86362001)(71200400001)(33656002)(26005)(66574012); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5117; H:VE1PR08MB5149.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-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: tmWGvrK6wG1ppYp9uA32qfk5tH1LaBXnNkg8YTeWu2Yb5AidhPI6AhGhxhLM3u4gIRgrwX6sbrpmPhCLg7IDXajAv2voPyVBWD3pumPPShxGS/UATj7AYBeY14+no+T++IE1ovLgu0EVbXvbVv7iIJEp47ot1AkAEe+HYgNXu56eON45WaCfhZyYtADXKAHYGXsILb3ruasUzTwN4CDfF/3phI7AdQ7LbHjOnL0+0GabFsA3fzjcPAHv0OL8VguskGLLu9S1v6pGuAwCK4I51RkT+v/arANWZcqQqDvN7Nzs1GUNxOYeBYk+yYUfHM0hSmDmuylAWG6iGHFemPGsKErPCFfClbAeP+W/lMBvDq9NX86xXYMsOTQpBj0Yh7yLixhWxkHZUhUqYPPFOgxgETvEPmkH8hZETIOrQi/GlM674ofa8+K/Bl6b1Fx85ci+TRx+i+AFObS8g22fEMATVUIqfbWyuLV2YlXj8Kwx50Q5OqpoKRqxmQu2JPAsFtIKqwDDfIyxbqPXK6frssHpYURHw9NtOSgneBeyufgvAvk= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5117 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(136003)(376002)(396003)(53754006)(189003)(199004)(86362001)(110136005)(36906005)(966005)(76130400001)(26826003)(229853002)(5660300002)(52536014)(478600001)(70206006)(450100002)(70586007)(4326008)(33656002)(55016002)(9686003)(66574012)(356004)(2906002)(336012)(81166006)(8936002)(7696005)(316002)(81156014)(305945005)(186003)(54906003)(6506007)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB2644; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 84b8c23b-713d-4a55-58d6-08d77d35b59c NoDisclaimer: True X-Forefront-PRVS: 02475B2A01 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9QjnrsN/UQ+4MW2AKrcRKipcx9/m3L5bqRKld4bukKGNsQdfiqRQJs5V3iZwKxX2WXQG48a3hXFuTfNNOiMwRYaTt9wryu7W0GKb0rKtB55q2RSkvHRuL5qawAGsf1z5hipR0LrEAyoWfFUs2zdqAAYgaeyngdmqc+0fXMUp7zz4C5PAdewdlGvodxLDde4exYybgkQDqDjPZugeA0OcNw1Pu7RcH/HFXsjx0A2wmojzg2IiSQewYgF9gBYz0mWrrRb9//8TgCjFOU4a01evVqMcVL+aKBy+kJK7o5wz93Bd1R/W17CW8KrxYrtlJrJN81DR+GabHHNCYETM0BW/W+ctzB/FNCjTQ8haBsiVj0iwA1ruG53iYvE4k3rlz6uke0oSypx6jYCzVb7khZwNFpliKgZaNCKxDTtG/lqydQEL6jBxkDT62pMQ8jXCUu3ng8/rslVyzvOXdcvjUfLjyEGbbtrrGcSxTuUzNSu+JuoxJsvRPL3g0bZEU77fICMrbL6sMcjZd6O51k5fSZtxAls3KNfMg25E/U/pdusBWzo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2019 05:56:39.9468 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f530bef-b642-42b7-9f2a-08d77d35b9ce X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2644 Subject: Re: [dpdk-users] [dpdk-dev] Sharing Data structure between logical cores in DPDK- regarding X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" >=20 > It depends on the datastructure. >=20 > If you use rte_hash, with the thread safety flags, it's safe. >=20 > In any case having a lot of cores accessing the same DS will lead to bad > performance. You should try to have per-core data structures whenever > possible. Even better if you can create a lock free data structure and combine it wit= h RCU. You can look at lock-free version of rte_hash implementation. There = was a presentation done on this topic in the previous DPDK summit[1]. [1] https://dpdkuserspace2018.sched.com/event/G44w/lock-free-read-write-con= currency-in-rtehash >=20 > Tom >=20 > ________________________________________ > De : dev de la part de Perugu Hemasai Chandra > Prasad Envoy=E9 : jeudi 5 d=E9cembre 2019 > 11:16 =C0 : users@dpdk.org; dev@dpdk.org > Objet : [dpdk-dev] Sharing Data structure between logical cores in DPDK- > regarding >=20 > Hi All, > I have a small doubt, can we share a data structure between mul= tiple > logical cores in DPDK without locking? I have tested it by sharing a smal= l > structure with two variable and incrementing them in all logical cores. I= t ran > smooth I didn't get any issue. But I doubt if we can run it for long time= with > some huge data structure having many elements getting accessed by multipl= e > logical cores. > Can anyone please clarify this. >=20 > Thanks and regards, > Hemasai.