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 5526744173; Thu, 6 Jun 2024 12:00:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16698410E3; Thu, 6 Jun 2024 12:00:17 +0200 (CEST) Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) by mails.dpdk.org (Postfix) with ESMTP id 2D5954027D for ; Thu, 6 Jun 2024 12:00:15 +0200 (CEST) Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-4eb1a5c26a5so252244e0c.1 for ; Thu, 06 Jun 2024 03:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717668014; x=1718272814; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MaacL3x/U9lsxDmZGrrXU1fqVLoSBIMFNi+D5VCF7aI=; b=PZ7jKArgyaT5cZNf6h/7H8HgZV99FAXRST9lsZ0HcLXqJb0DNdBXos1HeD+YNs/3m/ BLXfhHqnpwHubzTtioXNVRBhkMdbRXcFlb99B7J35QSdn0/xPfd0JKOXdMxCFOV53/3H C3YTnUPD/DGwI2+6uOgxfxidAaenoi/XF7c5Z8AkWc5rEPOFSDU3i6vvSfcZwy1jqYMC xxKWochB7FwAooIcDthbuIIP8mOF4tkXpEbktomVteg3c/jsnR8QYgSVIjOZx79u7Oh0 GLWWBOMu0r0jHJyuLc75FoU1bixrvwHXQG0LxE1cVt7nYXbhsl6eY/AGcsr6eNZH5M/6 8w7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717668014; x=1718272814; h=content-transfer-encoding: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=MaacL3x/U9lsxDmZGrrXU1fqVLoSBIMFNi+D5VCF7aI=; b=MgSVYW+hoo1P5gYTtGasdnEpOwL9RI/P9gKlBAQdShiO0ZjSkfpBl05aHO4l+GQ7dS CgbL/eAnoYnmETwco7pYZFuN9jaYWTp/ooL7ES/vtXun6YQqTA4s5ddlrEjbYdQa/2m3 UvuRgsPa4lCO4Xpk+I6PHZTAP3xLw1/oiA5p4LZIU+BlASSiOMrCoocQQdndF+i1tn/j WvosAyGA7G6xOHmZHKq2ozUZLpXEkNLTULLSpoIchaS6AHQ6bFgQJOxwlKw1Z3/itE1j K5te1VrwFiQzetOky48xgQXb54sytx0at1p6qq0UaNRt76jmnndTZdv8WEE8heU05JHh 88xg== X-Forwarded-Encrypted: i=1; AJvYcCU0YeIyMt6w9+CfFa0iZjNSxwXouwIHYhWU9gJnFUBF32Q1xmNIBO8O3/JlNY2fgBvODQ1EjLHl9LNk4I8= X-Gm-Message-State: AOJu0Yz6KAdmCNv+zojAOKXp/YhTTDUUGnWgVDRpFX0pdtN6vWhhgoGf yYWEjHOfyWxGd91u7TIp994oSe995Ww/jZvryhvBhu1RpHZYgPVFc4ZM4HUIBVxyOBdhTPWeFf3 EjPiZZIIKI03hBoK5k6mLB4BHiTA= X-Google-Smtp-Source: AGHT+IGALXY0up8fttV//xnI4j+LrneRvOpuXaJtLclBau+kzb8rPaXnQQW4vPvpXbHQJqqLQUS60qCgY+kASHQBu9I= X-Received: by 2002:a05:6122:ca4:b0:4da:9aa1:dd5e with SMTP id 71dfb90a1353d-4eb3a4aa46amr6909351e0c.10.1717668012781; Thu, 06 Jun 2024 03:00:12 -0700 (PDT) MIME-Version: 1.0 References: <20240524192437.183960-1-mattias.ronnblom@ericsson.com> <20240605133820.369677-1-mattias.ronnblom@ericsson.com> In-Reply-To: <20240605133820.369677-1-mattias.ronnblom@ericsson.com> From: Jerin Jacob Date: Thu, 6 Jun 2024 15:29:44 +0530 Message-ID: Subject: Re: [PATCH v2] event/dsw: support explicit release only mode To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: Jerin Jacob , dev@dpdk.org, hofors@lysator.liu.se, bruce.richardson@intel.com, Peter Nilsson J , =?UTF-8?B?U3ZhbnRlIErDpHJ2c3Ryw6V0?= , Heng Wang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Jun 5, 2024 at 7:43=E2=80=AFPM Mattias R=C3=B6nnblom wrote: > > Add the RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE capability to the > DSW event device. > > This feature may be used by an EAL thread to pull more work from the > work scheduler, without giving up the option to forward events > originating from a previous dequeue batch. This in turn allows an EAL > thread to be productive while waiting for a hardware accelerator to > complete some operation. > > Prior to this change, DSW didn't make any distinction between > RTE_EVENT_OP_FORWARD and RTE_EVENT_OP_NEW type events, other than that > new events would be backpressured earlier. > > After this change, DSW tracks the number of released events (i.e., > events of type RTE_EVENT_OP_FORWARD and RTE_EVENT_OP_RELEASE) that has > been enqueued. > > For efficiency reasons, DSW does not track the identity of individual > events. This in turn implies that a certain stage in the flow > migration process, DSW must wait for all pending releases (on the > migration source port, only) to be received from the application, to > assure that no event pertaining to any of the to-be-migrated flows are > being processed. > > With this change, DSW starts making a distinction between forward and > new type events for credit allocation purposes. Only RTE_EVENT_OP_NEW > events needs credits. All events marked as RTE_EVENT_OP_FORWARD must > have a corresponding dequeued event from a previous dequeue batch. > > Flow migration for flows on RTE_SCHED_TYPE_PARALLEL queues remains > unaffected by this change. > > A side-effect of the tweaked DSW migration logic is that the migration > latency is reduced, regardless if implicit release is enabled or not. > > Another side-effect is that migrated flows are now not processed > during any part of the migration procedure. An upside of this change > it reduces the load of the overloaded port. A downside is it > introduces slightly more jitter for the migrated flows. > > This patch is contains various minor refactorings, improved > formatting, fixed spelling, and the removal of unnessary memory > barriers. > > v2: > * Remove redundant memory barriers. > * Discontinue processing of migrated flows throughout the migration > procedure. This is a part of a fix to address a reordering issue > v1 of this patch introduced. > * Added entry in the release notes. > * Fix spelling issues in commit message. > > Signed-off-by: Mattias R=C3=B6nnblom meson --werror -Dc_args=3D'-DRTE_ENABLE_ASSERT' -Denable_docs=3Dtrue build [1602/2784] Generating drivers/rte_net_af_xdp.pmd.c with a custom command [1603/2784] Generating drivers/rte_net_ark.pmd.c with a custom command [1604/2784] Generating drivers/rte_net_axgbe.pmd.c with a custom command [1605/2784] Compiling C object drivers/libtmp_rte_event_dsw.a.p/event_dsw_dsw_event.c.o FAILED: drivers/libtmp_rte_event_dsw.a.p/event_dsw_dsw_event.c.o ccache cc -Idrivers/libtmp_rte_event_dsw.a.p -Idrivers -I../drivers -Idrivers/event/dsw -I../drivers/event/dsw -Ilib/eventdev -I../lib/eventdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/ring -I../lib/ring -Ilib/ethdev -I../lib/ethdev -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/meter -I../lib/meter -Ilib/hash -I../lib/hash -Ilib/rcu -I../lib/rcu -Ilib/timer -I../lib/timer -Ilib/cryptodev -I../lib/cryptodev -Ilib/dmadev -I../lib/dmadev -Idrivers/bus/vdev -I../drivers/bus/vdev -fdiagnostics-color=3Dalways -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Wextra -Werror -std=3Dc11 -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -DRTE_ENABLE_ASSERT -fPIC -march=3Dnative -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-format-nonliteral -DRTE_LOG_DEFAULT_LOGTYPE=3Dpmd.event.dsw -MD -MQ drivers/libtmp_rte_event_dsw.a.p/event_dsw_dsw_event.c.o -MF drivers/libtmp_rte_event_dsw.a.p/event_dsw_dsw_event.c.o.d -o drivers/libtmp_rte_event_dsw.a.p/event_dsw_dsw_event.c.o -c ../drivers/event/dsw/dsw_event.c In file included from ../lib/eal/include/rte_debug.h:18, from ../lib/eal/include/rte_bitops.h:20, from ../lib/eal/include/rte_memory.h:22, from ../lib/eal/include/rte_malloc.h:16, from ../lib/eventdev/eventdev_pmd.h:27, from ../drivers/event/dsw/dsw_evdev.h:8, from ../drivers/event/dsw/dsw_event.c:5: ../drivers/event/dsw/dsw_event.c: In function =E2=80=98dsw_port_abort_migra= tion=E2=80=99: ../drivers/event/dsw/dsw_event.c:946:20: error: =E2=80=98port=E2=80=99 unde= clared (first use in this function) 946 | RTE_ASSERT(port->in_buffer_start =3D=3D 0); | ^~~~ ../lib/eal/include/rte_branch_prediction.h:47:45: note: in definition of macro =E2=80=98unlikely=E2=80=99 47 | #define unlikely(x) __builtin_expect(!!(x), 0) | ^ ../lib/eal/include/rte_debug.h:47:25: note: in expansion of macro =E2=80=98= RTE_VERIFY=E2=80=99 47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp) | ^~~~~~~~~~ ../drivers/event/dsw/dsw_event.c:946:9: note: in expansion of macro =E2=80= =98RTE_ASSERT=E2=80=99 946 | RTE_ASSERT(port->in_buffer_start =3D=3D 0); | ^~~~~~~~~~ ../drivers/event/dsw/dsw_event.c:946:20: note: each undeclared identifier is reported only once for each function it appears in 946 | RTE_ASSERT(port->in_buffer_start =3D=3D 0); | ^~~~ ../lib/eal/include/rte_branch_prediction.h:47:45: note: in definition of macro =E2=80=98unlikely=E2=80=99 47 | #define unlikely(x) __builtin_expect(!!(x), 0) | ^ ../lib/eal/include/rte_debug.h:47:25: note: in expansion of macro =E2=80=98= RTE_VERIFY=E2=80=99 47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp) | ^~~~~~~~~~ ../drivers/event/dsw/dsw_event.c:946:9: note: in expansion of macro =E2=80= =98RTE_ASSERT=E2=80=99 946 | RTE_ASSERT(port->in_buffer_start =3D=3D 0);