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 04F5541CE5; Mon, 20 Feb 2023 10:34:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D417542FD2; Mon, 20 Feb 2023 10:34:22 +0100 (CET) Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) by mails.dpdk.org (Postfix) with ESMTP id 376F440395 for ; Mon, 20 Feb 2023 10:34:21 +0100 (CET) Received: by mail-vs1-f41.google.com with SMTP id dg20so2302599vsb.0 for ; Mon, 20 Feb 2023 01:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676885660; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TVqG0WLY1ZWLWV/bAGQBRcxmGPMRcMwc02vpsfujvBg=; b=aA+wKOQfmGYmdWkDt2f356Ql/95ahUUCYweHaifj2w+NnQPkkeNfzkmvUXZ7NTpkZG RS2I2pQTvQSNGAvOPztwyGC06OxJcTVR1ZOxeGiFMIeSTwsbKiV8AU6sE2XhWfmRqFPx RBoauaHShf0apjTGtikGqchFdMO/Ha8teqO789CCNl0NeKUW56dBONS4sWiLjTVkhVyn xPOmaey4fYo4Nan7VZh4/MrOfbXlnIOhLp/HZE6Ykx6JJ5gCh63+fgnI7WE/KgTREEdP BbSbKnh3SKt0c0ebzl1x/xc5WAHOarCYBeMoU61siNyGgRXfYU73pv6yW6T6pl3KDPSG rOOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676885660; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TVqG0WLY1ZWLWV/bAGQBRcxmGPMRcMwc02vpsfujvBg=; b=UVy2n8LEaicat1VyQv3lr+nyEQOibzyx0aiEg+DTUdWVxSfhOO6yY3WjRTAAMVb7BR DTBxXB/yV0Qc3TPSmCLzEnvK+YDtCJOa5T1uCWw0bl9XakNmKJoCNiMpm9yXwsd1iXUg CewZgXO1P1pw+Xiz0WZMFclbgv63FF2cAt4MVDRwkQezp6/bOasMRl8MRAKOKzv35hLK rj3jOsHTRx+RxtTkThrRNOcPPbd86c1OeL9n3ge7z776c1bo8tp5PiJRG1/u8Fhf+k6r tFMX/qptVn/wUWrKRg1DepNJNNwiKx7ZuqMmn8eL6xi7A/6zFjioCTQCDoPinaqQ32q3 yFXQ== X-Gm-Message-State: AO0yUKXOWf20lvyLsi4gRiYs+Oa+bCV59OGAFJlAFRjcRyWmPUgpqc88 PcmkQSUvh7AUn01wdKi/mJ5sWtDyCF8Zrp/3GTGeT+dC X-Google-Smtp-Source: AK7set+G7cl/KmQTDieucJQv4xbOWZ5a5CGD4rGPjKU2hONtPCnuoAPVwM50Fe9YG6ong4yhKYznyyjKabbRHAn1vkI= X-Received: by 2002:a05:6102:38d4:b0:3f0:89e1:7c80 with SMTP id k20-20020a05610238d400b003f089e17c80mr172697vst.72.1676885660361; Mon, 20 Feb 2023 01:34:20 -0800 (PST) MIME-Version: 1.0 References: <20221117050926.136974-1-zhirun.yan@intel.com> <3517338.eFTFzoEnKi@thomas> In-Reply-To: From: Jerin Jacob Date: Mon, 20 Feb 2023 15:03:54 +0530 Message-ID: Subject: Re: [PATCH v1 00/13] graph enhancement for multi-core dispatch To: "Yan, Zhirun" Cc: Thomas Monjalon , "jerinj@marvell.com" , "kirankumark@marvell.com" , "ndabilpuram@marvell.com" , "dev@dpdk.org" , "Liang, Cunming" , "Wang, Haiyue" Content-Type: text/plain; charset="UTF-8" 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 On Mon, Feb 20, 2023 at 1:58 PM Yan, Zhirun wrote: > > Hi Thomas, > > Jerin and Kiran gave some comments before. > And @jerinj@marvell.com @kirankumark@marvell.com > could you help to review it? Sure. I will do the next level. > Thanks. > > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Monday, February 20, 2023 8:22 AM > > To: jerinj@marvell.com; kirankumark@marvell.com; > > ndabilpuram@marvell.com > > Cc: dev@dpdk.org; Liang, Cunming ; Wang, > > Haiyue ; Yan, Zhirun ; Yan, > > Zhirun > > Subject: Re: [PATCH v1 00/13] graph enhancement for multi-core dispatch > > > > This series doesn't look reviewed. > > What is the status? > > > > 17/11/2022 06:09, Zhirun Yan: > > > Currently, rte_graph supports RTC (Run-To-Completion) model within > > > each of a single core. > > > RTC is one of the typical model of packet processing. Others like > > > Pipeline or Hybrid are lack of support. > > > > > > The patch set introduces a 'generic' model selection which is a > > > self-reacting scheme according to the core affinity. > > > The new model enables a cross-core dispatching mechanism which > > employs > > > a scheduling work-queue to dispatch streams to other worker cores > > > which being associated with the destination node. When core flavor of > > > the destination node is a default 'current', the stream can be > > > continue executed as normal. > > > > > > Example: > > > 3-node graph targets 3-core budget > > > > > > Generic Model > > > RTC: > > > Config Graph-A: node-0->current; node-1->current; node-2->current; > > > Graph-A':node-0/1/2 @0, Graph-A':node-0/1/2 @1, Graph-A':node-0/1/2 > > @2 > > > > > > + - - - - - - - - - - - - - - - - - - - - - + > > > ' Core #0/1/2 ' > > > ' ' > > > ' +--------+ +---------+ +--------+ ' > > > ' | Node-0 | --> | Node-1 | --> | Node-2 | ' > > > ' +--------+ +---------+ +--------+ ' > > > ' ' > > > + - - - - - - - - - - - - - - - - - - - - - + > > > > > > Pipeline: > > > Config Graph-A: node-0->0; node-1->1; node-2->2; > > > Graph-A':node-0 @0, Graph-A':node-1 @1, Graph-A':node-2 @2 > > > > > > + - - - - - -+ +- - - - - - + + - - - - - -+ > > > ' Core #0 ' ' Core #1 ' ' Core #2 ' > > > ' ' ' ' ' ' > > > ' +--------+ ' ' +--------+ ' ' +--------+ ' > > > ' | Node-0 | ' --> ' | Node-1 | ' --> ' | Node-2 | ' > > > ' +--------+ ' ' +--------+ ' ' +--------+ ' > > > ' ' ' ' ' ' > > > + - - - - - -+ +- - - - - - + + - - - - - -+ > > > > > > Hybrid: > > > Config Graph-A: node-0->current; node-1->current; node-2->2; > > > Graph-A':node-0/1 @0, Graph-A':node-0/1 @1, Graph-A':node-2 @2 > > > > > > + - - - - - - - - - - - - - - - + + - - - - - -+ > > > ' Core #0 ' ' Core #2 ' > > > ' ' ' ' > > > ' +--------+ +--------+ ' ' +--------+ ' > > > ' | Node-0 | ------> | Node-1 | ' --> ' | Node-2 | ' > > > ' +--------+ +--------+ ' ' +--------+ ' > > > ' ' ' ' > > > + - - - - - - - - - - - - - - - + + - - - - - -+ > > > ^ > > > | > > > | > > > + - - - - - - - - - - - - - - - + | > > > ' Core #1 ' | > > > ' ' | > > > ' +--------+ +--------+ ' | > > > ' | Node-0 | ------> | Node-1 | ' --------+ > > > ' +--------+ +--------+ ' > > > ' ' > > > + - - - - - - - - - - - - - - - + > > > > > > > > > The patch set has been break down as below: > > > > > > 1. Split graph worker into common and default model part. > > > 2. Inline graph node processing and graph circular buffer walking to make > > > it reusable. > > > 3. Add set/get APIs to choose worker model. > > > 4. Introduce core affinity API to set the node run on specific worker core. > > > (only use in new model) > > > 5. Introduce graph affinity API to bind one graph with specific worker > > > core. > > > 6. Introduce graph clone API. > > > 7. Introduce stream moving with scheduler work-queue in patch 8,9,10. > > > 8. Add stats for new models. > > > 9. Abstract default graph config process and integrate new model into > > > example/l3fwd-graph. Add new parameters for model choosing. > > > > > > We could run with new worker model by this: > > > ./dpdk-l3fwd-graph -l 8,9,10,11 -n 4 -- -p 0x1 --config="(0,0,9)" -P > > > --model="generic" > > > > > > References: > > > https://static.sched.com/hosted_files/dpdkuserspace22/a6/graph%20intro > > > duce%20remote%20dispatch%20for%20mult-core%20scaling.pdf > > > > > > Zhirun Yan (13): > > > graph: split graph worker into common and default model > > > graph: move node process into inline function > > > graph: add macro to walk on graph circular buffer > > > graph: add get/set graph worker model APIs > > > graph: introduce core affinity API > > > graph: introduce graph affinity API > > > graph: introduce graph clone API for other worker core > > > graph: introduce stream moving cross cores > > > graph: enable create and destroy graph scheduling workqueue > > > graph: introduce graph walk by cross-core dispatch > > > graph: enable graph generic scheduler model > > > graph: add stats for corss-core dispatching > > > examples/l3fwd-graph: introduce generic worker model > > > > > > examples/l3fwd-graph/main.c | 218 +++++++++-- > > > lib/graph/graph.c | 179 +++++++++ > > > lib/graph/graph_debug.c | 6 + > > > lib/graph/graph_populate.c | 1 + > > > lib/graph/graph_private.h | 44 +++ > > > lib/graph/graph_stats.c | 74 +++- > > > lib/graph/meson.build | 3 +- > > > lib/graph/node.c | 1 + > > > lib/graph/rte_graph.h | 44 +++ > > > lib/graph/rte_graph_model_generic.c | 179 +++++++++ > > > lib/graph/rte_graph_model_generic.h | 114 ++++++ > > > lib/graph/rte_graph_model_rtc.h | 22 ++ > > > lib/graph/rte_graph_worker.h | 516 ++------------------------ > > > lib/graph/rte_graph_worker_common.h | 545 > > ++++++++++++++++++++++++++++ > > > lib/graph/version.map | 8 + > > > 15 files changed, 1430 insertions(+), 524 deletions(-) create mode > > > 100644 lib/graph/rte_graph_model_generic.c > > > create mode 100644 lib/graph/rte_graph_model_generic.h > > > create mode 100644 lib/graph/rte_graph_model_rtc.h create mode > > > 100644 lib/graph/rte_graph_worker_common.h > > > > > > > > > > > > > > >