Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1275379rwb; Fri, 7 Oct 2022 10:14:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM47zJkD237C/f7SwmmGAgBQ83WURWGT07qwdBkG09mnYfzH45cBAK2TNuPW1mByb2mppwe/ X-Received: by 2002:a17:902:cf11:b0:178:29d7:4fbd with SMTP id i17-20020a170902cf1100b0017829d74fbdmr5701774plg.174.1665162870156; Fri, 07 Oct 2022 10:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665162870; cv=none; d=google.com; s=arc-20160816; b=E9RLyxEZUNNVidEtmEW2luSxb2XQ06/6OGUg2PaKaBC/DBEi3L0cyPO3CJzf/EZb7Q o/db/Cp3ae3IUej4gSVoGLmKxDbV4hwxRz7KPTDC/QnjeY/ck80MP4LQEzmCo3dTv6oD IfR8D7V0HMOSUcTCNYTTHkqZJ1vlHaix9IwQxjA3UEkHQ/YK1RbGUTjFUQBtGDMNG+Ts lnfbOXFXx6dsNUVJiHZ+vkLVFSlNte8ScAo0epvM5l+pxjah3W36pwl4lN+Vcn+9arid cS+z5yDGhExT2WxcUsnJ+w4gXV7XbvD5yekQ2TRdzQajo3hw4WDtpNBo4DmBk+FwCrD9 o5jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=Oa2/HFjWMNLTULhMDOgWelTSl3U37miUk1sRVI0ZK3k=; b=UoI82JbXQ7S3WOjGVu7fJ3Z7DoQt/Ew9nyJ9W1mfZ6Khna5+g66ynJu52WF9aAcaMR Gy6wIjMNZzT+inBOoVYTSq864SB/4/rahiOdQ18mmspYhKo+jBdwefJaxvPbAv5VUlle otpvg8nUjyvo/ZdunoEiReuJrevSkKPP4ZrYApkG4Bff5LxWBone6/Gc0/WKArDeqirp hZIsNvtQRN7vnplNpkB+FdwnmnVo9U8eEod5ex6LkkeeYIDaDws/VLxidvAJQgfGgSxP RAN20VOumDpARzDFNS5ruYH/W/2XmIFg0HUryK6y6HBEsMA6QEHWN93iY5NXp64+8tWD HzIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="OFQ/5vP1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903244f00b0017811e3927bsi2981259pls.622.2022.10.07.10.14.18; Fri, 07 Oct 2022 10:14:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="OFQ/5vP1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbiJGQ4q (ORCPT + 99 others); Fri, 7 Oct 2022 12:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiJGQ4o (ORCPT ); Fri, 7 Oct 2022 12:56:44 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56B3A46DB9 for ; Fri, 7 Oct 2022 09:56:43 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id 187so4065173iov.10 for ; Fri, 07 Oct 2022 09:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Oa2/HFjWMNLTULhMDOgWelTSl3U37miUk1sRVI0ZK3k=; b=OFQ/5vP1th2kjaaw6ddWTQE7n5DauO+8SJsVh6SdFE0aaXbGUiU/rkh4lVFrOnFUzh QnQdhEzCjlipx1Pj8rF/9MwQzu/WUXL1SEqH9NjMKTBDXC7pN33fWuGz5FDEI7N3kB5b igwDi2KNXatGW1zFZq57/I3A+0kEzHfrgNlSovTcuNgQEeb77EVeHDuY7U81+//sKGjD LbA+uucsz19tANsodRtEAJ6YFsmrcbzEIgBuawinReDZiUpCLv1CRmYAJnG9EvJfKnF9 e4LU0b47RVswmxtLHA/WpeSHfwmY6yq35K0CFjtPkhkwC/QvWk71U078z5unaC2Rfd2b nB+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Oa2/HFjWMNLTULhMDOgWelTSl3U37miUk1sRVI0ZK3k=; b=FwKzisYtyQ+pUNqrT3CvSm0YWWOKu0xSRcSyF9q796W3P+SHd8MSy2U5p+HgKBEMBN PWTbjGu8qXWvx27q69AfSW2CNGhApL1aEiv/0ppD8aq+KLRUwQr3vkm+X6ftczoUgS4D gS/St6FP4nVyh0wMaIXDAhch33sBVJbTKzpIXZRjc/WhvbpNTOWodh9iyzWAezaiRNu8 ZPhgdsfH3YuTXKNYXzryOctua693kyJjBGdqCBD/KR69qTlbGTxX/t73MV5iVA8IBNLY Dm58iCQ3jVMN2lGGUzLRMiMF6p8/Muj9uZAvs9rzUFGbYVz8Tbly0oSF/gJeINMPeFjr b2eA== X-Gm-Message-State: ACrzQf260MhrdTyC+lg4S3qwDnpDDUDXr+TsVx55OWV3WrkAozXG39le tt3vGBPC3a06AkGMlH6uKhycKcBfio0ACQ== X-Received: by 2002:a6b:c850:0:b0:6bb:b0e0:96b8 with SMTP id y77-20020a6bc850000000b006bbb0e096b8mr1308336iof.136.1665161802287; Fri, 07 Oct 2022 09:56:42 -0700 (PDT) Received: from m1max.localdomain ([207.135.234.126]) by smtp.gmail.com with ESMTPSA id a6-20020a056e020e0600b002eb5eb4f8f9sm1055584ilk.77.2022.10.07.09.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 09:56:41 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCHSET RFC 0/4] Add support for epoll min_wait Date: Fri, 7 Oct 2022 10:56:33 -0600 Message-Id: <20221007165637.22374-1-axboe@kernel.dk> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This adds support for EPOLL_CTL_MIN_WAIT, which allows setting a minimum time that epoll_wait() should wait for events on a given epoll context. Some justification and numbers are in patch 4, patches 1-3 are really just prep patches. Sending this as an RFC to hash out the API, basically. This is obviously a per-context type of operation in this patchset, which isn't necessarily ideal for any use case. Questions to be debated: 1) Would we want this to be available through epoll_wait() directly? That would allow this to be done on a per-epoll_wait() basis, rather than be tied to the specific context. 2) If the answer to #1 is yes, would we still want EPOLL_CTL_MIN_WAIT? I think there are pros and cons to both, and perhaps the answer to both is "yes". There are some benefits to doing this at epoll setup time, for example - it nicely isolates it to that part rather than needing to be done dynamically everytime epoll_wait() is called. This also helps the application code, as it can turn off any busy'ness tracking based on if the setup accepted EPOLL_CTL_MIN_WAIT or not. Anyway, tossing this out there as it yielded quite good results in some initial testing, we're running more of it. -- Jens Axboe