[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221201181156.848373-5-axboe@kernel.dk>
Date: Thu, 1 Dec 2022 11:11:53 -0700
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc: soheil@...gle.com, willemdebruijn.kernel@...il.com,
stefanha@...hat.com, Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 4/7] eventpoll: move expires to epoll_wq
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 <axboe@...nel.dk>
---
fs/eventpoll.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 888f565d0c5f..0994f2eb6adc 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1765,6 +1765,7 @@ static int ep_autoremove_wake_function(struct wait_queue_entry *wq_entry,
struct epoll_wq {
wait_queue_entry_t wait;
struct hrtimer timer;
+ ktime_t timeout_ts;
bool timed_out;
};
@@ -1825,7 +1826,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
{
int res, eavail;
u64 slack = 0;
- ktime_t expires, *to = NULL;
+ ktime_t *to = NULL;
struct epoll_wq ewq;
lockdep_assert_irqs_enabled();
@@ -1834,7 +1835,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
if (timeout && (timeout->tv_sec | timeout->tv_nsec)) {
slack = select_estimate_accuracy(timeout);
- to = &expires;
+ to = &ewq.timeout_ts;
*to = timespec64_to_ktime(*timeout);
} else if (timeout) {
/*
--
2.35.1
Powered by blists - more mailing lists