From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 711D745CD8; Mon, 11 Nov 2024 06:46:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58C4D40685; Mon, 11 Nov 2024 06:46:33 +0100 (CET) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1F4D24067A for ; Mon, 11 Nov 2024 06:46:30 +0100 (CET) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AANlSe9013706; Sun, 10 Nov 2024 21:46:26 -0800 Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2045.outbound.protection.outlook.com [104.47.56.45]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42tvvc12g6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Nov 2024 21:46:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dtSHCRe6RA+WXmHawnYDMJGroTMJqcANilqDwpIwTTr4fjI7lpbJ2IXMhq/SbiUJCrZEuTeeoWxZePu/jA3/jhd+0aNxbZrtNYePJsnJ09l6S8zn7/Oo7mm6X1TV1ujkRsPU9fhzMdbSy60mmrE8FDcH7nt0rlVGWrMPYQvep0iyyjfYRrFz25CwasgDU1DbXJEao/O7mTKDVJ4b/tfcZYbTBmtLTQKa30w+uI5RQ1G6crcj3LJ0PtJrni5UkkGwBwQri+7MELF4H3jcwPhRyUi0hzauK6gP8jZqNzi5rtWosL4is6PvpZbfQTVdHVCUY9Wx6wVUZxbv98/33l/N5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IFysRTm4Q9v5ai5EzO8KFA2YzxU50/m+vz6phFZpq/A=; b=vvvnTmrr5TmBgLM8DqpqQnEbu9FMSD47S/rmy6srWD2We2Ht776K+n18SWxSxxt7wAbwu2jokxTfxxuzaVhBQc8I2NMIO4D05ttXI4Xey4mBEJ2AHo9moeUm/wrroxBQ4RvK4QySMT/pJIJZBzaVbZcq81cS9H0AOYEHnSS7BWpnN1LcII+lu/4jGtph4jadHtbRfLSK7F9CIAVJs5tZ963qNpFgnMG6thY4J5MadddhD3gVMiRCQ0fDamSlEJzh3KQZ+mjvYe7By1IGfziKRf8wB/9K0RfD3z9Mna6GzlLS+Pl52DCRsbe7CA7hAzr0rS/ttw0eiNYpwKeeoSCLCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IFysRTm4Q9v5ai5EzO8KFA2YzxU50/m+vz6phFZpq/A=; b=liCSQxVikrZccELR19ZV060rzO3gHFfVAXMOoazwHwL2uAlmH20A/ZAypfPWgbMH/hz95mH/5FbtXlkbQvylNdrCEVgS5DfpOnO3i77385q6bAtX2hvsknK6rCJuhi7o5/G92rn7jdGfBVf3JMf9iniqMJXaBDHCGzn93J31uXM= Received: from BY3PR18MB4785.namprd18.prod.outlook.com (2603:10b6:a03:3cc::18) by PH0PR18MB4053.namprd18.prod.outlook.com (2603:10b6:510:3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 05:46:20 +0000 Received: from BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576]) by BY3PR18MB4785.namprd18.prod.outlook.com ([fe80::4f9f:e101:dad7:c576%4]) with mapi id 15.20.8137.022; Mon, 11 Nov 2024 05:46:20 +0000 From: Jerin Jacob To: Huichao Cai , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , "yanzhirun_163@163.com" , "david.marchand@redhat.com" , Thomas Monjalon CC: "dev@dpdk.org" Subject: RE: [EXTERNAL] [PATCH v2] graph: mcore: optimize graph search Thread-Topic: [EXTERNAL] [PATCH v2] graph: mcore: optimize graph search Thread-Index: AQHbM+61xN+kiyaY2kip8H5FatwddbKxkdWw Date: Mon, 11 Nov 2024 05:46:20 +0000 Message-ID: References: <1730966682-2632-1-git-send-email-chcchc88@163.com> <1731297797-3662-1-git-send-email-chcchc88@163.com> In-Reply-To: <1731297797-3662-1-git-send-email-chcchc88@163.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR18MB4785:EE_|PH0PR18MB4053:EE_ x-ms-office365-filtering-correlation-id: f3372591-8e21-4ab7-f9d7-08dd02142b6f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?eldlSGFhQkZuT0twNTN3MlZjMElYWjU1Z1pFL2JzdFcxYUJ6ckw3ZHY5cDJr?= =?utf-8?B?OHJSTW5UdDFHejFUaFNPK2J0ZnRqMkdvYUtwajllYlB1VUdIaUxBd1BjcHcx?= =?utf-8?B?eDhmazBWVnk5K0htbmNLNjdCK0tDeWlDQ3hSTmk2NnhyYmNaam5OUkFiVXlm?= =?utf-8?B?ZngxcitnQzNCTXNDQTV1QXRPYk5iY3NtdHNwVS9yZGF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UZYa3E0Y1pNSVorbDBjZmZUd0oyY2JTdk1o?= =?utf-8?B?c1YwZUlkZDZtSjVsZzFGK3BiVzlpUFhhaHcxN1llQWpmNzdWeGRVbUlXaGdi?= =?utf-8?B?VlhKNW1aemZlN2pJTUtRbXBmZldVR3hob0U3SDZTT3JnMTFhQzdOTlYzTHFw?= =?utf-8?B?bktNZXBBQWF0L1NrSDFZczgxQUo0d2RvY0FPL0RhTlZKN0VhangxdkxMNmw5?= =?utf-8?B?ODdFRDUvRHV6WmhUaHZ2cHFUWXFvTUJtWmZmWmpPZnNYcmtuUDVLaTF2c2dQ?= =?utf-8?B?bkhYL01TdEluYWFSQmMrRk1Mdk9ta09nVFRxRVVlUHVuajBtakxnZ09rZUND?= =?utf-8?B?N2ZJWGgyejBySjVETnhGR1d1UHE3aHlhbkNxTWF2aWFqZDlzM1A2OEZRbGFG?= =?utf-8?B?RjRuU0ltU0dreklCTGtuVGhLczdGNVVReVhnRk9jVGRuNmxXOUNQQnl6dXls?= =?utf-8?B?NG9jMDZBaXkwNXFndjd5Y2laTmdKRUVCN013TEJhZHo5eWV0WVUyTUdHdUM1?= =?utf-8?B?emlJaE1PMzU2UU9QeWY2Z00wVDU0b0NQajNpWUo1a3JlNXQrc1lNZzJnbWpM?= =?utf-8?B?ZU9Bb2MyVVlpU2lkRnYzNFlGckpjcU1kSCtkZjRZeHY5OWpyT3AzYm45VGZr?= =?utf-8?B?SG5CektVTW1NZU9nZTFFSGNJWTd6NFR2L1VtQjNXek42bHVEbUZYMzlFRmx3?= =?utf-8?B?Wk9PeHcyMWNhK1pBMlJzZz09?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR18MB4785.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?ut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VhYXJ1UVg3QXYwMjFtNWUwTjZlcWUyV2JzcDRyYzk5OXQr?= =?utf-8?B?bHBZMnlYa1lNWnpMcTRMeWltcUhMR1dBYTd4Sml5TEd2Wko2MlhnV3B4Q1dy?= =?utf-8?B?WVhyemlFSjZSaGV0MGdjZCtlNzdzbjEyTnc1b2xmdk5oQkhHNXZaa3JubGdJ?= =?utf-8?B?WWhTUDhOUExxdVFrYmRkUEVUVnpyUVkyS1FsN2J5aWZQcWNmUFp0U3ZWUEpJ?= =?utf-8?B?Nk5TdVlqVUlzNG5LTkVNUjJuM2MvOWJnajBvWncxcTV3aUl0dkFyYkJ2ZDA3?= =?utf-8?B?STlwbFU4T1pPdFNCQlovT1JRSzNjd29uNjE5NzZBaGFCcU4wRHlUdklkWnZE?= =?utf-8?Q?+gQIauEHNsifiQpAphsYW7bDJ?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR18MB4785.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3372591-8e21-4ab7-f9d7-08dd02142b6f X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2024 05:46:20.7622 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +FoGLP/nmo0vzR6GJNBCDNuYoPdHldZnlE3xJBU7ZXDAZ2T/S/fiOzkX8Bwws0AQCncVfU+CZ3OHecA6T3xW2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4053 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: LHhh6X5R8txKxeCpa83LJT2OqUeN8atF X-Proofpoint-GUID: LHhh6X5R8txKxeCpa83LJT2OqUeN8atF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Huichao Cai > Sent: Monday, November 11, 2024 9:33 AM > To: Jerin Jacob ; Kiran Kumar Kokkilagadda > ; Nithin Kumar Dabilpuram > ; yanzhirun_163@163.com > Cc: dev@dpdk.org; Huichao cai > Subject: [EXTERNAL] [PATCH v2] graph: mcore: optimize graph search >=20 > From: Huichao cai In the function > __rte_graph_mcore_dispatch_sched_node_enqueue, use a slower loop to > search for the graph, modify the search logic to record the result of the= first > search, and use this record for subsequent=20 > From: Huichao cai >=20 > In the function __rte_graph_mcore_dispatch_sched_node_enqueue, > use a slower loop to search for the graph, modify the search logic to rec= ord the > result of the first search, and use this record for subsequent searches to > improve search speed. >=20 > Signed-off-by: Huichao cai > --- > lib/graph/rte_graph_model_mcore_dispatch.c | 11 +++++++---- > lib/graph/rte_graph_worker_common.h | 1 + > 2 files changed, 8 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/graph/rte_graph_model_mcore_dispatch.c > b/lib/graph/rte_graph_model_mcore_dispatch.c > index a590fc9..a81d338 100644 > --- a/lib/graph/rte_graph_model_mcore_dispatch.c > +++ b/lib/graph/rte_graph_model_mcore_dispatch.c > @@ -118,11 +118,14 @@ > struct rte_graph_rq_head *rq) { > const unsigned int lcore_id =3D node->dispatch.lcore_id; > - struct rte_graph *graph; > + struct rte_graph *graph =3D node->dispatch.graph; >=20 > - SLIST_FOREACH(graph, rq, next) > - if (graph->dispatch.lcore_id =3D=3D lcore_id) > - break; > + if (unlikely((!graph) || (graph->dispatch.lcore_id !=3D lcore_id))) { > + SLIST_FOREACH(graph, rq, next) > + if (graph->dispatch.lcore_id =3D=3D lcore_id) > + break; > + node->dispatch.graph =3D graph; > + } >=20 > return graph !=3D NULL ? __graph_sched_node_enqueue(node, graph) : > false; } diff --git a/lib/graph/rte_graph_worker_common.h > b/lib/graph/rte_graph_worker_common.h > index a518af2..4c2432b 100644 > --- a/lib/graph/rte_graph_worker_common.h > +++ b/lib/graph/rte_graph_worker_common.h > @@ -110,6 +110,7 @@ struct __rte_cache_aligned rte_node { > unsigned int lcore_id; /**< Node running lcore. */ > uint64_t total_sched_objs; /**< Number of objects > scheduled. */ > uint64_t total_sched_fail; /**< Number of scheduled > failure. */ > + struct rte_graph *graph; /**< Graph corresponding to > lcore_id. */ Need to conclude the ABI related discussion here before making change https://patches.dpdk.org/project/dpdk/patch/1730966682-2632-1-git-send-ema= il-chcchc88@163.com/ > } dispatch; > }; > rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ > -- > 1.8.3.1