From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id A0DB13B29E for ; Wed, 16 Nov 2022 15:14:16 -0500 (EST) Received: by mail-wm1-x333.google.com with SMTP id v7so12735565wmn.0 for ; Wed, 16 Nov 2022 12:14:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=tdl3I/kXWqyQAapZntyreML4QvTee6MO1xzHo/dDidA=; b=cH8GyqG58DGyn7tmMQiqPv3avAGFfv7kct1trO5lExlO87nLxQ7Y26VkW2ezIFtHAi fiTRSJQzuF8Q64IyFSx4BAlhLTPdP/Pr4o2We5qP+ql/6kCi2/txg6KSdcqVOpEDRSmQ w2yVL4gwMyEsKOVHuF81Tbc4S65cZ8WAd8PCHzpg1iZSobqU45cyiJN3ZMH68lgaKdO0 EksW+R9y1905fRVHy1FQ0E2PjmxzQ9V6HC3v5wAUCdGq/fo4GnwHp87jNUPFWhfpImxq uhrld5m4l6+1pBF8Lzeihosgp/U+CsWTIKHflBy5Ti89OIV7riyfW4fb4Rg1haS5XorD Anxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=tdl3I/kXWqyQAapZntyreML4QvTee6MO1xzHo/dDidA=; b=vBb21zdA+e/TChhbvwX/hyIpCEfRif/5O2++qS1G1MLZv5SvzJ7GhL0C0ygmEAcoa1 MNlHJAbpXtKHcuPN2i+Bb+YlPs1OOwbsqZk5JmRj3Nd7hmde41CQ1qWGAQki3cjgNQnA pA0tuhEZcL+5+9jShqVOFLHX6JMmBGlymHRSKu1+65HF9WEOyH1fVGe7QeFgAZua0FCr 71fL/J+jqNWPxw5mtYbLltvIod/JEFDYMgzm7G5oKi4NtRnOx59Eg49Gme4YnmM+qiOv XZklGQRFXkIpJoMQ0KyaUqbvtAayq2G3HDn1dw/QMCNGncxPjJde/xsbPCTIrhc2JNhW AAnA== X-Gm-Message-State: ANoB5pmGeEkqXdPq3LF5ZG0E1qf5708k2HSDiTRJeNjB/rpqsjuin0LR eHLSV7D9LXaZIDCtRxDHTOvLddyjq/8KFnr8G8f3cF8s X-Google-Smtp-Source: AA0mqf7GMwUZl68hK5YE9e8GY6evR+/Khlj2icoZa0Yt2bM4QHZhaPqowjo6qoj3lRhMs07IJxZ3ywORQTa4CPaVasE= X-Received: by 2002:a05:600c:3543:b0:3cf:a6e8:b59b with SMTP id i3-20020a05600c354300b003cfa6e8b59bmr3232939wmq.128.1668629654987; Wed, 16 Nov 2022 12:14:14 -0800 (PST) MIME-Version: 1.0 References: <20221115070900.1788837-1-shr@devkernel.io> In-Reply-To: <20221115070900.1788837-1-shr@devkernel.io> From: Dave Taht Date: Wed, 16 Nov 2022 12:14:02 -0800 Message-ID: To: libreqos Content-Type: multipart/alternative; boundary="000000000000d8e88f05ed9c1d2d" Subject: [LibreQoS] Fwd: [RFC PATCH v3 0/3] io_uring: add napi busy polling support X-BeenThere: libreqos@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Many ISPs need the kinds of quality shaping cake can do List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2022 20:14:16 -0000 --000000000000d8e88f05ed9c1d2d Content-Type: text/plain; charset="UTF-8" ---------- Forwarded message --------- From: Stefan Roesch Date: Mon, Nov 14, 2022, 11:13 PM Subject: [RFC PATCH v3 0/3] io_uring: add napi busy polling support To: Cc: , , , < netdev@vger.kernel.org>, , This adds the napi busy polling support in io_uring.c. It adds a new napi_list to the io_ring_ctx structure. This list contains the list of napi_id's that are currently enabled for busy polling. This list is used to determine which napi id's enabled busy polling. To set the new napi busy poll timeout, a new io-uring api has been added. It sets the napi busy poll timeout for the corresponding ring. There is also a corresponding liburing patch series, which enables this feature. The name of the series is "liburing: add add api for napi busy poll timeout". It also contains two programs to test the this. Testing has shown that the round-trip times are reduced to 38us from 55us by enabling napi busy polling with a busy poll timeout of 100us. Changes: - V3: - Refreshed to 6.1-rc5 - Added a new io-uring api for the prefer napi busy poll api and wire it to io_napi_busy_loop(). - Removed the unregister (implemented as register) - Added more performance results to the first commit message. - V2: - Add missing defines if CONFIG_NET_RX_BUSY_POLL is not defined - Changes signature of function io_napi_add_list to static inline if CONFIG_NET_RX_BUSY_POLL is not defined - define some functions as static Signed-off-by: Stefan Roesch Stefan Roesch (3): io_uring: add napi busy polling support io_uring: add api to set napi busy poll timeout. io_uring: add api to set napi prefer busy poll include/linux/io_uring_types.h | 8 + include/uapi/linux/io_uring.h | 4 + io_uring/io_uring.c | 278 +++++++++++++++++++++++++++++++++ io_uring/napi.h | 22 +++ io_uring/poll.c | 3 + io_uring/sqpoll.c | 10 ++ 6 files changed, 325 insertions(+) create mode 100644 io_uring/napi.h base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa -- 2.30.2 --000000000000d8e88f05ed9c1d2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

---------- Forwarded message ---------
From: Stefan Roesch <shr@devkernel.io>
Date: Mon, Nov 14, 2022, 11:13 PM
Subject: [RFC PATCH v3 0/3] io_u= ring: add napi busy polling support
To: <kernel-team@fb.com>
Cc: <shr@devkernel.io>, <axboe@kernel.dk>, <o= livier@trillion01.com>, <netdev@vger.kernel.org>, <io-uring@vger.kernel.org>, <kuba@kernel.org>


This adds the napi busy po= lling support in io_uring.c. It adds a new
napi_list to the io_ring_ctx structure. This list contains the list of
napi_id's that are currently enabled for busy polling. This list is
used to determine which napi id's enabled busy polling.

To set the new napi busy poll timeout, a new io-uring api has been
added. It sets the napi busy poll timeout for the corresponding ring.

There is also a corresponding liburing patch series, which enables this
feature. The name of the series is "liburing: add add api for napi bus= y
poll timeout". It also contains two programs to test the this.

Testing has shown that the round-trip times are reduced to 38us from
55us by enabling napi busy polling with a busy poll timeout of 100us.


Changes:
- V3:
=C2=A0 - Refreshed to 6.1-rc5
=C2=A0 - Added a new io-uring api for the prefer napi busy poll api and wir= e
=C2=A0 =C2=A0 it to io_napi_busy_loop().
=C2=A0 - Removed the unregister (implemented as register)
=C2=A0 - Added more performance results to the first commit message.
- V2:
=C2=A0 - Add missing defines if CONFIG_NET_RX_BUSY_POLL is not defined
=C2=A0 - Changes signature of function io_napi_add_list to static inline =C2=A0 =C2=A0 if CONFIG_NET_RX_BUSY_POLL is not defined
=C2=A0 - define some functions as static


Signed-off-by: Stefan Roesch <shr@devkernel.io>

Stefan Roesch (3):
=C2=A0 io_uring: add napi busy polling support
=C2=A0 io_uring: add api to set napi busy poll timeout.
=C2=A0 io_uring: add api to set napi prefer busy poll

=C2=A0include/linux/io_uring_types.h |=C2=A0 =C2=A08 +
=C2=A0include/uapi/linux/io_uring.h=C2=A0 |=C2=A0 =C2=A04 +
=C2=A0io_uring/io_uring.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 278 ++= +++++++++++++++++++++++++++++++
=C2=A0io_uring/napi.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 |=C2=A0 22 +++
=C2=A0io_uring/poll.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 |=C2=A0 =C2=A03 +
=C2=A0io_uring/sqpoll.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |= =C2=A0 10 ++
=C2=A06 files changed, 325 insertions(+)
=C2=A0create mode 100644 io_uring/napi.h


base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa
--
2.30.2

--000000000000d8e88f05ed9c1d2d--