[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221201181156.848373-3-axboe@kernel.dk>
Date: Thu, 1 Dec 2022 11:11:51 -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 2/7] eventpoll: don't pass in 'timed_out' to ep_busy_loop()
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 <axboe@...nel.dk>
---
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
Powered by blists - more mailing lists