From nobody Tue Apr 7 00:31:09 2026 Return-Path: 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 EE7C3C433FE for ; Fri, 7 Oct 2022 16:57:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230120AbiJGQ5B (ORCPT ); Fri, 7 Oct 2022 12:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbiJGQ4q (ORCPT ); Fri, 7 Oct 2022 12:56:46 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACAB60496 for ; Fri, 7 Oct 2022 09:56:46 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id 4so4072377iou.9 for ; Fri, 07 Oct 2022 09:56:45 -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=268Ewj1SkBC8anSnii6XOQa/SAiq+mm/PdGL6GPMikM=; b=um2f4lAP90/5sPo8x7U02EbQNucStn9G1tMe/aYsv1/wSysgTPyhwAHdy3uyIZbO3I R12S393agNl2gl6/84qpfQwxUX3x333wI6RscwNaHiEOZHuZfjA8/+52qLIVb219+sdy q6VKkIsHKVSXARmljPQZoxd4ftfCeBmrHOQYKFhKVTFbuHOAlX2kyDD/GgtCDRJT9v6q QlbLUIWcFfRHG8DxYC84sN0izcQBncZ06z3HsRa/OZMQkGR/UwolfKYT6TjLHlP1aj9U d8X7hX7JoO1ZY/CUnu7TEeMcO95rb4rJVOsH9iWdvOfTZK3aJjYuxqDaeodo6W5cBhPh SO8w== 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=268Ewj1SkBC8anSnii6XOQa/SAiq+mm/PdGL6GPMikM=; b=AzcwAzWQhkUPKJ9rYbQaQyq0cbVEJTQXN+dwBhzdl0X0N6drbZ5neJEjp9YCVyKcKz 7qcJPE3G+pEpbgy0CSSvvzpyJTNdEm35RBpSCPCNLDDAGDTtQdbEOh10iKLNZc6qbOVV +Jl9l/89DmnDmYwVUm0Beo84eMI7yFRoRh5ZLorZDSG6ASyEZhO+PIILpZBb93rh+zlQ roUaZ6Clz3GeiGYWrgodvxXtNy8Sk32HZLtPqY1/C042S2XvAcGXd/fr1zuLTzpWWYB3 09TkxTfwdibKTVGDo4hot+M59duCw0+C45xXWOgimqzwu9C0AwPOSpUF2CfNCyp1pvVB UFjw== X-Gm-Message-State: ACrzQf2pjWFdBqHeJr4Iyz8NSGd71wtP/WjmK1eu7bDGfADSPXq5wKI2 b2lOAdHLKcYqQnPax0P3RCz8LLNIwg8RNQ== X-Google-Smtp-Source: AMsMyM5cab4DrLGmE2R6/vLkQVAh+Bjf5n/flcaTschxphy9xhCDDpVwHtoi+2sscPY8PSz1btOb/g== X-Received: by 2002:a05:6602:2cd3:b0:6a2:167d:1d1c with SMTP id j19-20020a0566022cd300b006a2167d1d1cmr2679773iow.18.1665161805095; Fri, 07 Oct 2022 09:56:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 09:56:44 -0700 (PDT) From: Jens Axboe To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 3/4] eventpoll: move expires to epoll_wq Date: Fri, 7 Oct 2022 10:56:36 -0600 Message-Id: <20221007165637.22374-4-axboe@kernel.dk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221007165637.22374-1-axboe@kernel.dk> References: <20221007165637.22374-1-axboe@kernel.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This makes the expiration available to the wakeup handler. No functional changes expected in this patch, purely in preparation for being able to use the timeout on the wakeup side. Signed-off-by: Jens Axboe --- fs/eventpoll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 01b9dab2b68c..79aa61a951df 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1765,6 +1765,7 @@ static int ep_autoremove_wake_function(struct wait_qu= eue_entry *wq_entry, struct epoll_wq { wait_queue_entry_t wait; struct hrtimer timer; + ktime_t timeout_ts; bool timed_out; }; =20 @@ -1825,7 +1826,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll= _event __user *events, { int res, eavail; u64 slack =3D 0; - ktime_t expires, *to =3D NULL; + ktime_t *to =3D NULL; struct epoll_wq ewq; =20 lockdep_assert_irqs_enabled(); @@ -1834,7 +1835,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll= _event __user *events, =20 if (timeout && (timeout->tv_sec | timeout->tv_nsec)) { slack =3D select_estimate_accuracy(timeout); - to =3D &expires; + to =3D &ewq.timeout_ts; *to =3D timespec64_to_ktime(*timeout); } else if (timeout) { /* --=20 2.35.1