Message ID | 20221107175240.2725952-1-shr@devkernel.io (mailing list archive) |
---|---|
Headers | show
Return-Path: <io-uring-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01BCFC433FE for <io-uring@archiver.kernel.org>; Mon, 7 Nov 2022 17:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232381AbiKGRy2 (ORCPT <rfc822;io-uring@archiver.kernel.org>); Mon, 7 Nov 2022 12:54:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbiKGRyD (ORCPT <rfc822;io-uring@vger.kernel.org>); Mon, 7 Nov 2022 12:54:03 -0500 Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88E4C26569 for <io-uring@vger.kernel.org>; Mon, 7 Nov 2022 09:53:01 -0800 (PST) Received: by dev0134.prn3.facebook.com (Postfix, from userid 425415) id 1F759F6B5E3; Mon, 7 Nov 2022 09:52:50 -0800 (PST) From: Stefan Roesch <shr@devkernel.io> To: kernel-team@fb.com Cc: shr@devkernel.io, axboe@kernel.dk, olivier@trillion01.com, netdev@vger.kernel.org, io-uring@vger.kernel.org, kuba@kernel.org Subject: [RFC PATCH v2 0/2] io_uring: add napi busy polling support Date: Mon, 7 Nov 2022 09:52:38 -0800 Message-Id: <20221107175240.2725952-1-shr@devkernel.io> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: <io-uring.vger.kernel.org> X-Mailing-List: io-uring@vger.kernel.org |
Series |
io_uring: add napi busy polling support
|
expand
|
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: - 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 <shr@devkernel.io> Stefan Roesch (2): io_uring: add napi busy polling support io_uring: add api to set napi busy poll timeout. include/linux/io_uring_types.h | 6 + include/uapi/linux/io_uring.h | 4 + io_uring/io_uring.c | 262 +++++++++++++++++++++++++++++++++ io_uring/napi.h | 22 +++ io_uring/poll.c | 3 + io_uring/sqpoll.c | 9 ++ 6 files changed, 306 insertions(+) create mode 100644 io_uring/napi.h base-commit: f0c4d9fc9cc9462659728d168387191387e903cc