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 50B5C42A68; Fri, 5 May 2023 04:10:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D258C42D31; Fri, 5 May 2023 04:09:59 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 35B62406BA for ; Fri, 5 May 2023 04:09:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683252597; x=1714788597; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=CAG6qF5pgZu1Ux3tCBfGGzeYIfZsvKmNVRk/9ih8UIU=; b=FPphtMjYwv/914T3hj8MRDLnvgEHszfMUnqTZIZe72wREZAFRyYlga6B rr7uFXPb7Zsgo9qrecixxzVNXEcxyphJ1gdF4MVadEuHYE7qOaCTruopb XWOfXL1zTp+SaETK6HN7jhnyzKFOT79MY+rqJBOR6vNDeNGlRccL7pSQX 58ryi/1Cp6LYWRhkXzwZeNfkpAUcJI8NV40MIWnvQtXDsRlg4wyYE50lu 5xp+oaFPgrbfTKjsuazb/+nQX2LJvXm/7/Kmff7FYMTC+Rae8LNT3bWf3 iSFIxF+ohuwi1ZbHpQUJxEBiJzbFxQ+F5vPKf1LrpzY2BLLHnlkZyDRNO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="349145132" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="349145132" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 19:09:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10700"; a="697320530" X-IronPort-AV: E=Sophos;i="5.99,250,1677571200"; d="scan'208";a="697320530" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 04 May 2023 19:09:46 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 4 May 2023 19:09:46 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 4 May 2023 19:09:46 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 4 May 2023 19:09:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AaW0E48j9UvOaicbNLlMSONgIW6F6buKToqTAxv7+lJYnpOd/dlAafqDGxwya5/cdEj5CK5asMYMsOMDIMrcAZPxPIyw0FWC70ulpgeQ3Gn94RuK+QasRozVC6pqNm5sm3o1N4kjMcpnrSeSdq/CmEX9aMi81VTqHv/joi/s+64jVozppHNNQ8y6b4tl+IzQSiJKypOVAObhOX4CtY64KjrwfzggEVissMofbX3GrKAKUSDERknbyXU80XHBPBVOxrUqlnBwlsLdyfedF4jmL+X+YM83DyiQtjNh5FB9+HbVBfjC93to6Gcb2nSIinOX6KrfoJs7omg3mkmhNZCklw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oIhte63PIZ+M8ZtrHF6DjGyfETfywMvU16KP/XLqvag=; b=bguv/AUm2eto/zzTR4XiBtCpQ7xU4GgtNvqUDnFzBwJMPu721WYk1WST53TfI5SCE/JxNxl9/9pV18bMOZk4lsVpv9ubAam56gBzhT9NnZBaDcvnJZT0nwBqf+D0zuNubi+9KhHRmogPkkfJO7Q1c6/ErwMDxaVF5UrGw6kdhv8wUANMG+30u17ym7Yb1cEGKtf2GTUCUxP32NMuuACVV5hqQhcF8+8KMN5YS9dU8x6zEwWmAanEJ7f+L3moiz32zUtrUipDBSbxuzOpemZldG02L6iYc3uyR9lEIRuZQmQwHQ26WwykkA9SUPqbe0zlK99wZkeFqmdS3FkKBESoQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB6775.namprd11.prod.outlook.com (2603:10b6:806:264::21) by PH7PR11MB7497.namprd11.prod.outlook.com (2603:10b6:510:270::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26; Fri, 5 May 2023 02:09:44 +0000 Received: from SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::7972:8de5:546c:65f0]) by SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::7972:8de5:546c:65f0%8]) with mapi id 15.20.6340.031; Fri, 5 May 2023 02:09:44 +0000 From: "Yan, Zhirun" To: Pavan Nikhilesh Bhagavatula , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "Kiran Kumar Kokkilagadda" , Nithin Kumar Dabilpuram , "stephen@networkplumber.org" CC: "Liang, Cunming" , "Wang, Haiyue" Subject: RE: [EXT] [PATCH v5 11/15] graph: introduce graph walk by cross-core dispatch Thread-Topic: [EXT] [PATCH v5 11/15] graph: introduce graph walk by cross-core dispatch Thread-Index: AQHZY4XLHXY+uYLQQUKOPwQAAnkkka8/aoEAgAu5S1A= Date: Fri, 5 May 2023 02:09:44 +0000 Message-ID: References: <20230330061834.3118201-1-zhirun.yan@intel.com> <20230331040306.3143693-1-zhirun.yan@intel.com> <20230331040306.3143693-12-zhirun.yan@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB6775:EE_|PH7PR11MB7497:EE_ x-ms-office365-filtering-correlation-id: 2d6d6656-f8d3-427e-5954-08db4d0dcb5b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wUYsWgQiT/H0KOFNtx7OE0FCMCj00EBQGq0FXI2A9UegsxJARlBliT5YNcpFShthAM76iVKjcSmw0J95ugX/8pljahe3PiDJgj/duhSCf696CESzcZDGdFu/v2QUA/JWN9XVs+zqYholJJyYNwyKNTiCKI9A/RwPfNlZCcE3cpgMNOJ5rY9gLcgRiTesv2nBBu0e3X8OtRCT7wgH1uGbD1YLCR7g2WaHXcWYRhkG7mgww/y7LSD9RTIdiO/e/tBKykalapgjrGux8rge1Abp1VPx9fAwcavgGBm2a86uY4niiwgQ4iQLJ4si5kgAr8qYz8MBgu6PF+0UbDPSfDx+/pCav+fr1mbX4bG1sy1ZDKuZb7Glv5qbxc0jWPZJRVk3RrbLVXJcyTlNBBGTo5nEnHdydmKkEYcVDDAaoH4cxsJoD8xxd9uh8enKCJYd/tepCm/4iaM1yOLwZo4GTiDM7rWxzxEpu6EirBBKPWiwWKDIG3Oc/gVDy43Hb5G2OfzwGZyBEg6avioLslXIXWBFYpyNf0KXAkSn/5SRdJPXr9Bu9Cku4+w69QFmgpfT3pid5UkWo1nt+tga5kO592qcgEDQZHDk22s1vO4g41f3D2hkv4WlRs8GB6CnT8ucc0OM x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB6775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(376002)(136003)(346002)(39860400002)(366004)(396003)(451199021)(7696005)(55016003)(83380400001)(26005)(53546011)(9686003)(6506007)(107886003)(186003)(38100700002)(38070700005)(86362001)(82960400001)(122000001)(33656002)(71200400001)(8676002)(8936002)(2906002)(4326008)(316002)(76116006)(66946007)(66556008)(66446008)(64756008)(66476007)(110136005)(52536014)(41300700001)(478600001)(5660300002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3h4mDmXUNGsT7Rlrz3JBRHIurzg1DctHx0CpFoZ/mckELNf3bEIVAfDebumk?= =?us-ascii?Q?CL8vfg6QGiSqKFH02I4mSw3TaiwdkNoZEG0++Am1bgz1q3DgXYBj4BR3Nyjq?= =?us-ascii?Q?advEPrKSfgJsERDFBMMIdktXzeJNm/XilykN8S3yTfkfCb9BIqNYxd13wBdo?= =?us-ascii?Q?1IYXZ41ZatT6qifH70HgRDMQs/+4Ase+/pK3/cnbsb0xVpEdNrDKj5PCWT2T?= =?us-ascii?Q?50k1czBSPIA8WC3tR1ql8+QkGNiVdhI5x8uvqvhuk6QUtmkw7EYBib9AY5HB?= =?us-ascii?Q?J1VUYfrm368Ffxc2XaCRAlSUC066UsN4y5i4dFDlZwp3VswzLrRLuXC6wwky?= =?us-ascii?Q?myCdgbwoqrGFRyBsa7Wx4cRzEgri8iHdn594y/GJeoPSdsiel0E4myKXkOwK?= =?us-ascii?Q?MvoMvgKK+INgIod/oE6BNpU7ziQmyiHdg7Xtn/0/UBA8V/YSSQR+fakivccr?= =?us-ascii?Q?mP9+5IwgDLYRhtnZGvrASvCz9sDO/DIKXfSp5Sm7iAK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bg8hsLpE6PZakhsxaQcPEbTZaf8x7+Ie8jLh4vg2ktiBa?= =?us-ascii?Q?ombrSSevtrOgf9jTwGMADH12RIIcZ6HRYzwWSNCaohlDzG73ZcTWRENgkUcw?= =?us-ascii?Q?HxLKFw0zkT9AHKxQqMngC28SxpR4POLeLvBJhUPnl/jKv94KazHAjJYachYf?= =?us-ascii?Q?vUMrL7Youb0Ul9M5GYj3uTNB+rLUYxFL+nPV3T0X?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6775.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d6d6656-f8d3-427e-5954-08db4d0dcb5b X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2023 02:09:44.4405 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DP4v7FWwzaz7ziavd8Bq8YV7rcR/PE5RVQgilIPGpotvIEWOJj29EhoKlZZR8JNhjatAkceg8Taf817L+KTRqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7497 X-OriginatorOrg: intel.com 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: Pavan Nikhilesh Bhagavatula > Sent: Thursday, April 27, 2023 10:59 PM > To: Yan, Zhirun ; dev@dpdk.org; Jerin Jacob > Kollanukkaran ; Kiran Kumar Kokkilagadda > ; Nithin Kumar Dabilpuram > ; stephen@networkplumber.org > Cc: Liang, Cunming ; Wang, Haiyue > > Subject: RE: [EXT] [PATCH v5 11/15] graph: introduce graph walk by cross-= core > dispatch >=20 > > This patch introduces the task scheduler mechanism to enable > > dispatching tasks to another worker cores. Currently, there is only a > > local work queue for one graph to walk. We introduce a scheduler > > worker queue in each worker core for dispatching tasks. It will > > perform the walk on scheduler work queue first, then handle the local w= ork > queue. > > > > Signed-off-by: Haiyue Wang > > Signed-off-by: Cunming Liang > > Signed-off-by: Zhirun Yan > > --- > > lib/graph/rte_graph_model_dispatch.h | 42 > > ++++++++++++++++++++++++++++ > > 1 file changed, 42 insertions(+) > > > > diff --git a/lib/graph/rte_graph_model_dispatch.h > > b/lib/graph/rte_graph_model_dispatch.h > > index 18fa7ce0ab..65b2cc6d87 100644 > > --- a/lib/graph/rte_graph_model_dispatch.h > > +++ b/lib/graph/rte_graph_model_dispatch.h > > @@ -73,6 +73,48 @@ __rte_experimental > > int rte_graph_model_dispatch_lcore_affinity_set(const char *name, > > unsigned int lcore_id); > > > > +/** > > + * Perform graph walk on the circular buffer and invoke the process > > function > > + * of the nodes and collect the stats. > > + * > > + * @param graph > > + * Graph pointer returned from rte_graph_lookup function. > > + * > > + * @see rte_graph_lookup() > > + */ > > +__rte_experimental > > +static inline void > > +rte_graph_walk_mcore_dispatch(struct rte_graph *graph) { > > + const rte_graph_off_t *cir_start =3D graph->cir_start; > > + const rte_node_t mask =3D graph->cir_mask; > > + uint32_t head =3D graph->head; > > + struct rte_node *node; >=20 > I think we should add a RTE_ASSERT here to make sure that the graph objec= t is a > cloned graph. >=20 Ok, I will add RTE_ASSERT in next version.=20 > > + > > + if (graph->wq !=3D NULL) > > + __rte_graph_sched_wq_process(graph); > > + > > + while (likely(head !=3D graph->tail)) { > > + node =3D (struct rte_node *)RTE_PTR_ADD(graph, > > cir_start[(int32_t)head++]); > > + > > + /* skip the src nodes which not bind with current worker */ > > + if ((int32_t)head < 0 && node->lcore_id !=3D graph->lcore_id) > > + continue; > > + > > + /* Schedule the node until all task/objs are done */ > > + if (node->lcore_id !=3D RTE_MAX_LCORE && > > + graph->lcore_id !=3D node->lcore_id && graph->rq !=3D NULL > > && > > + __rte_graph_sched_node_enqueue(node, graph->rq)) > > + continue; > > + > > + __rte_node_process(graph, node); > > + > > + head =3D likely((int32_t)head > 0) ? head & mask : head; > > + } > > + > > + graph->tail =3D 0; > > +} > > + > > #ifdef __cplusplus > > } > > #endif > > -- > > 2.37.2