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 CAD5AA04F2 for ; Thu, 5 Dec 2019 11:42:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5C5B1BF8B; Thu, 5 Dec 2019 11:42:27 +0100 (CET) Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by dpdk.org (Postfix) with ESMTP id EB6B71BF7F; Thu, 5 Dec 2019 11:42:24 +0100 (CET) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id A95199EF4; Thu, 5 Dec 2019 11:42:24 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WS9fO995FJCX; Thu, 5 Dec 2019 11:42:23 +0100 (CET) Received: from exdb02.ug.kth.se (exdb02.ug.kth.se [192.168.32.112]) by smtp-3.sys.kth.se (Postfix) with ESMTPS id 86BA9A34E; Thu, 5 Dec 2019 11:42:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1575542543; bh=2oG7rFDUjJxhUR/fWQZjZGJH2QO9hnNYVwQaXz/+JF4=; h=From:To:Subject:Date:References:In-Reply-To; b=QR49DZv0L5AYRClsVC4q6Lpt1UZpKCtX2MSlTaHRbO0gggg9vBie7PfgzhpJqWmnF uHaXnidR92Rha2jrKkqdP1+hIVdcy1Byi4dtzL+9R6un7R799SsmjOZ/oFxnWmiu4w XkC8/pzAiSbKcOUra4qQjigji8kqN9DRB74ubi+c= Received: from exdb06.ug.kth.se (192.168.32.116) by exdb02.ug.kth.se (192.168.32.112) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 5 Dec 2019 11:42:22 +0100 Received: from exdb05.ug.kth.se (192.168.32.115) by exdb06.ug.kth.se (192.168.32.116) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 5 Dec 2019 11:42:22 +0100 Received: from exdb05.ug.kth.se ([192.168.32.115]) by exdb05.ug.kth.se ([192.168.32.115]) with mapi id 15.00.1473.005; Thu, 5 Dec 2019 11:42:23 +0100 From: Tom Barbette To: Perugu Hemasai Chandra Prasad , "users@dpdk.org" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Sharing Data structure between logical cores in DPDK- regarding Thread-Index: AQHVq1UaK4vk8nwGHUCI5SfVJjgwcKerWhy1 Date: Thu, 5 Dec 2019 10:42:22 +0000 Message-ID: <1575542540897.56972@kth.se> References: In-Reply-To: Accept-Language: fr-FR, sv-SE, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [87.64.116.183] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" It depends on the datastructure.=0A= =0A= If you use rte_hash, with the thread safety flags, it's safe.=0A= =0A= In any case having a lot of cores accessing the same DS will lead to bad pe= rformance. You should try to have per-core data structures whenever possibl= e.=0A= =0A= Tom=0A= =0A= ________________________________________=0A= De : dev de la part de Perugu Hemasai Chandra Prasad= =0A= Envoy=E9 : jeudi 5 d=E9cembre 2019 11:16=0A= =C0 : users@dpdk.org; dev@dpdk.org=0A= Objet : [dpdk-dev] Sharing Data structure between logical cores in DPDK- = regarding=0A= =0A= Hi All,=0A= I have a small doubt, can we share a data structure between=0A= multiple logical cores in DPDK without locking? I have tested it by sharing= =0A= a small structure with two variable and incrementing them in all logical=0A= cores. It ran smooth I didn't get any issue. But I doubt if we can run it= =0A= for long time with some huge data structure having many elements getting=0A= accessed by multiple logical cores.=0A= Can anyone please clarify this.=0A= =0A= Thanks and regards,=0A= Hemasai.=0A=