Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp47188pxj; Wed, 23 Jun 2021 15:17:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5kXyeSrpZmOQSXKx1ND4L1ysvAy0IfBIBIiJHe4rDB660WeBW3AYeHqtDBtQG1jDtBoAp X-Received: by 2002:a05:6402:95a:: with SMTP id h26mr2722098edz.114.1624486626981; Wed, 23 Jun 2021 15:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624486626; cv=none; d=google.com; s=arc-20160816; b=psfhN+Ce552n9BHAo5LFxZpsup7ZGvtjgeCnkPa9146pTDVRck6lgHze6+YO6smYRE aHgpqsaJntlllqIrLHb9sQmMrqI8f0CnE/Dawqc2OzJUMo9srRouPCSj9V+DNJCEJebk p+6TjPUNqrcTwIv1XU082lnAU1t3MUODhUQ3OnjfPCagiclkKJ0KDGl34ReSmYVy+gps 1Eud8V9M0MoNpxGcoNT5kxVJour2QGc/SdBgxdSHPa/2ouxmabrOr5TxA5P+Y4qOXehm OucL7P54376IvHNie5x2d4VcIFrCkljgq/tOnBbqsq3JI8RgJoqYafgdHFeO+tatHMJd PELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to:dkim-signature; bh=jby64o0v7EYHfux9Oun1hrQ36e6m6gcFy0/ViVpUCHI=; b=HDSF5+4um9spF1z0VgcUqMvQItO205tTzMbN4RZdmyTB6LzMmL/6zJhorxc88+Njgo 5pMAVPAQL5R22HeyAUrz1/3WXl4Ymv0EplFmCDNFno10LuP/jkAGQVsRdOqsRhIfIKcn Qhfqxm03xF/miQs1t1iwW6Jxdc6wZODuyeL/l6ghV77ZRMs58fOl3dfdND5nrmi/D343 VLD9C14M/7H106V/WPfl8qWNIfsbIq8mW40pFpr5hG5EPBWQWihDi4fql0xakKUxmBPZ Ungema70wtrYWVMrWWdUq7T/hMMz9h/uxH18ZCUyig25cv+wLvw0xIDg1QWpw24ixeiP qS+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mi8kKh/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn42si946050ejc.717.2021.06.23.15.16.44; Wed, 23 Jun 2021 15:17:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mi8kKh/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbhFWWSI (ORCPT + 99 others); Wed, 23 Jun 2021 18:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbhFWWSB (ORCPT ); Wed, 23 Jun 2021 18:18:01 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D23D2C061766; Wed, 23 Jun 2021 15:14:45 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id l12so3591994wrt.3; Wed, 23 Jun 2021 15:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:references:from:subject:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=jby64o0v7EYHfux9Oun1hrQ36e6m6gcFy0/ViVpUCHI=; b=mi8kKh/V9M9TalRkKjVOQmcdPCEsO3frZoHqQUZoWjyM/nEtVNQVGyzB5sX76auBPL L/X/Q4fk3rt4ehqgQhdb1Uzh7+82hbYYCnw6Co4zv2qe5SqeHj4KhmAbs+lbmAidm/gd 2MEqD9D4gdpi0re/PlPmMJ4Dke1nINeUTFRqRA4QzMkcgzDKAZ5Khr+OSgDWY8QmHFM9 jFYOBw6NB0npn43RXlkdOb8J+NK1coP2XQzXDgQ5EwqS/NYp8Fxef8g1PVPTb1W0nneM p8qjZ3klf8/l9PnOtyVLihSwIRkFyhZh4XNtcrBgc6qygNyEFifNpAZYz+C9OTuBqMOz MMqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jby64o0v7EYHfux9Oun1hrQ36e6m6gcFy0/ViVpUCHI=; b=UsNKhFo2Kd9R6X2Gz+6D8ZUoTgvEzJsZNZfhgSi8WBaXGG1Xac2CuitVGAWZ/qN4ql uKwRBvf6yN1YXW98RDeXNzWDIWWW6A6TckkefNYdaYjRaqaM8QlfIici70WSRL4Kn1c3 VM5SOfXWsKeOt4ORU8IqrGU1nkvBxyES9NzFjTooH/BZ9bi3BLGC9vOwCVthL7FC0os9 1nZRRJqIXawLVyTOZ0PtWIDAos53og25KiBKODciqlBVYy2zy2q/4TSux0naIa0CLhtz vHA3fBZgQIGjtUSKONhWTYDcKswM/YSV7zZB+2Ir9TbmKyvHOK11GcNdNjeeodlVof79 Xp6w== X-Gm-Message-State: AOAM532RikNDQ+AG4WZndT7eGvJgymkl5YAwbhqxG3Hq9IuZzovi0ykw uzkzHRmxT5PSzwzTZqzT0/DG0jPUs1jiRuQI X-Received: by 2002:a05:6000:1281:: with SMTP id f1mr380435wrx.137.1624486484332; Wed, 23 Jun 2021 15:14:44 -0700 (PDT) Received: from [192.168.8.197] ([148.252.132.93]) by smtp.gmail.com with ESMTPSA id f19sm1031916wmc.16.2021.06.23.15.14.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 15:14:43 -0700 (PDT) To: Olivier Langlois , Jens Axboe , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Pavel Begunkov Subject: Re: [PATCH v2 2/2] io_uring: Create define to modify a SQPOLL parameter Message-ID: Date: Wed, 23 Jun 2021 23:14:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/23/21 7:50 PM, Olivier Langlois wrote: > The magic number used to cap the number of entries extracted from an > io_uring instance SQ before moving to the other instances is an > interesting parameter to experiment with. > > A define has been created to make it easy to change its value from a > single location. It's better to send fixes separately from other improvements, because the process a bit different for them, go into different branches and so on. Jens, any chance you can pick as is (at least 1/2)? Reviewed-by: Pavel Begunkov > Signed-off-by: Olivier Langlois > --- > fs/io_uring.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/io_uring.c b/fs/io_uring.c > index 7c545fa66f31..e7997f9bf879 100644 > --- a/fs/io_uring.c > +++ b/fs/io_uring.c > @@ -89,6 +89,7 @@ > > #define IORING_MAX_ENTRIES 32768 > #define IORING_MAX_CQ_ENTRIES (2 * IORING_MAX_ENTRIES) > +#define IORING_SQPOLL_CAP_ENTRIES_VALUE 8 > > /* > * Shift of 9 is 512 entries, or exactly one page on 64-bit archs > @@ -6797,8 +6798,8 @@ static int __io_sq_thread(struct io_ring_ctx *ctx, bool cap_entries) > > to_submit = io_sqring_entries(ctx); > /* if we're handling multiple rings, cap submit size for fairness */ > - if (cap_entries && to_submit > 8) > - to_submit = 8; > + if (cap_entries && to_submit > IORING_SQPOLL_CAP_ENTRIES_VALUE) > + to_submit = IORING_SQPOLL_CAP_ENTRIES_VALUE; > > if (!list_empty(&ctx->iopoll_list) || to_submit) { > unsigned nr_events = 0; > -- Pavel Begunkov