Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2297498rwj; Sun, 30 Oct 2022 15:08:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6y9OA8n9YHukvJlBUSBZHgiA0Qb/wD18timrcvksWJqJFkhSvqErdufJHiyXpLoBAWTi+K X-Received: by 2002:a17:903:22cb:b0:186:a8ae:d0ff with SMTP id y11-20020a17090322cb00b00186a8aed0ffmr11065239plg.71.1667167680105; Sun, 30 Oct 2022 15:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667167680; cv=none; d=google.com; s=arc-20160816; b=h7Fu0FSkOHf4RvksblZ3hZEsw8EmPzglNITsHTYDJ3EnGfl8kpf9HKWlRzWtsTa7M9 f1cVy3soyOPfbSOK9RddqavJ+HZpQJOXrnJuDkiU20tGQxyrwWCrZ1rUE808+aKN/SST 3oR9W5gylwI2eKrZY4jWTaZnR6dF42QdjKqTfGQiZcOoqhd3lZFYJ2QJfpOVpQuzENKi koqFmJG019FjOGSkD3Mn56HrdUMa40G8BzV+iQ+j0CiwIZGBim3xRM42NSaMDI7a7zOB sbfcRYl5WaZxF6YoBZUkLm1kI7sUZkqPSOWwTOt48PN+DFUd/mOKXJ7gzVDxNvjLV4nS 43oA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TCMSGu8wCAuxi+YEaeqt2Nm6ljarPNoUCebXSLfB1Fw=; b=uvcKrFWF7cAzGogJHiHGqevnoLoUIMLApkPmaebhNKvMaIB+gtFxXEjw87Zio1X7Jk ub+1OGFQKSn1CyaV5hfI6mZKNd/3xvYxIUkPY93uDhgfASWgia6xYdgcZ91rvCFPKXog 6553fJH9416A/F4piqxUL9kQqrsHsYnHZ0i8+6RhKWj2X1bt+audi5EJ+d1rty+GAPYi sikuSR07f1+khe1Q5UeRW0MdDhHnBk1GUshffhYc4qiz3FbbHASkXlnbb/czGFgK0SHa kE8K7NEAEpkBFI5w4GGwL84l8CiYOyffqDGU2FYOtgt1XR7p9XrZaEeXeb92PKtsc0HR tNJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=H1OQbWeL; 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 t11-20020a170902bc4b00b00186ada5d4e2si5681135plz.215.2022.10.30.15.07.47; Sun, 30 Oct 2022 15:08:00 -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=H1OQbWeL; 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 S229996AbiJ3WCe (ORCPT + 99 others); Sun, 30 Oct 2022 18:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiJ3WCQ (ORCPT ); Sun, 30 Oct 2022 18:02:16 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30E1FAE60 for ; Sun, 30 Oct 2022 15:02:10 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id f23so9228740plr.6 for ; Sun, 30 Oct 2022 15:02:10 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TCMSGu8wCAuxi+YEaeqt2Nm6ljarPNoUCebXSLfB1Fw=; b=H1OQbWeLIKTClEI0Y18BCREEaUPyB4u9aov6gnRCwP3FMlWoDhoOyrQj9dTUw8f7Rl Lnc+rX7GLGtNIG7+mOPq5mJ218zFKXipmPROig7C1ec18KZ542PUt0JccxGsjh5HO1a0 /z8kUmiSoWowwx6pl7CmnUz6U/WQmRT/NWSJGgn5Kjr93Rcz9iCWvN5ozoSLbcjCLLaW vQSLjW+N399VOHIFg9wUxuq3+NKkDgXzX84jiBotca1ufvXrHs73a7xFaaZLJbSrPgpF kI9+im4ilsx5ns6Kwr6KHXhyinzcJ9zfi1ofygZp48zSk618zFDCdZssNjQg3mnekR5P YICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TCMSGu8wCAuxi+YEaeqt2Nm6ljarPNoUCebXSLfB1Fw=; b=ZA0ePgo1TNywxC70BsmKi1e1pdahfCqQ1oTLebS2BtlaegboAMN0ZA2BxVxBz7yMeD oOYq9N2BXme3XJ+EEAIO+7KTxFAXyP0JVn2/vcaCKQtyRofikhbv4jGBY2sb8jS+KLaa Tn8h8yDN0XHDqlQQ2x7caAjdpEtcJGwk+ufJRLuRe9t3DxG2zAwI70JisY/c/AEB2ZP3 zjPpAsQkiThCNzKQDS1XexiShSjObJWp3cYE1ZsPEqbbNrH0D+X6oCVLzoBgBLxsgMdU 6ahRKVMucvxgaSGEQ+rA+a7VQAYOEXi8ZB4zfwFWXw0b1i149a38inqLRR1ckgAN4XN3 Y46g== X-Gm-Message-State: ACrzQf15v70fv0u+TjepNY7hi3ob/AyX57YZz81o8vJsEqyeaasAQz1q A+fATDw+zf9B9J4idCsuqjxi9eswrb6NfCAs X-Received: by 2002:a17:90a:ca87:b0:212:d2bd:82f5 with SMTP id y7-20020a17090aca8700b00212d2bd82f5mr11677337pjt.203.1667167329708; Sun, 30 Oct 2022 15:02:09 -0700 (PDT) Received: from localhost.localdomain ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id y3-20020aa79e03000000b0056d73ef41fdsm562852pfq.75.2022.10.30.15.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 15:02:09 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 2/6] eventpoll: don't pass in 'timed_out' to ep_busy_loop() Date: Sun, 30 Oct 2022 16:01:59 -0600 Message-Id: <20221030220203.31210-3-axboe@kernel.dk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221030220203.31210-1-axboe@kernel.dk> References: <20221030220203.31210-1-axboe@kernel.dk> 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=unavailable 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 It's known to be 'false' from the one call site we have, as we break out of the loop if it's not. Signed-off-by: Jens Axboe --- fs/eventpoll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 3061bdde6cba..64d7331353dd 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -396,12 +396,12 @@ static bool ep_busy_loop_end(void *p, unsigned long start_time) * * we must do our busy polling with irqs enabled */ -static bool ep_busy_loop(struct eventpoll *ep, int nonblock) +static bool ep_busy_loop(struct eventpoll *ep) { unsigned int napi_id = READ_ONCE(ep->napi_id); if ((napi_id >= MIN_NAPI_ID) && net_busy_loop_on()) { - napi_busy_loop(napi_id, nonblock ? NULL : ep_busy_loop_end, ep, false, + napi_busy_loop(napi_id, ep_busy_loop_end, ep, false, BUSY_POLL_BUDGET); if (ep_events_available(ep)) return true; @@ -453,7 +453,7 @@ static inline void ep_set_busy_poll_napi_id(struct epitem *epi) #else -static inline bool ep_busy_loop(struct eventpoll *ep, int nonblock) +static inline bool ep_busy_loop(struct eventpoll *ep) { return false; } @@ -1826,7 +1826,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, if (timed_out) return 0; - eavail = ep_busy_loop(ep, timed_out); + eavail = ep_busy_loop(ep); if (eavail) continue; -- 2.35.1