From: Martin Karsten Date: Sat, 9 Nov 2024 05:02:33 +0000 (+0000) Subject: eventpoll: Trigger napi_busy_loop, if prefer_busy_poll is set X-Git-Tag: v6.13-rc1~135^2~71^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab5b28b007a7ab3edeb0a5e1d04669945ddb1d37;p=thirdparty%2Flinux.git eventpoll: Trigger napi_busy_loop, if prefer_busy_poll is set Setting prefer_busy_poll now leads to an effectively nonblocking iteration though napi_busy_loop, even when busy_poll_usecs is 0. Signed-off-by: Martin Karsten Co-developed-by: Joe Damato Signed-off-by: Joe Damato Tested-by: Joe Damato Tested-by: Martin Karsten Acked-by: Stanislav Fomichev Reviewed-by: Sridhar Samudrala Link: https://patch.msgid.link/20241109050245.191288-4-jdamato@fastly.com Signed-off-by: Jakub Kicinski --- diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 1ae4542f0bd88..f9e0d9307dad4 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -420,7 +420,9 @@ static bool busy_loop_ep_timeout(unsigned long start_time, static bool ep_busy_loop_on(struct eventpoll *ep) { - return !!READ_ONCE(ep->busy_poll_usecs) || net_busy_loop_on(); + return !!READ_ONCE(ep->busy_poll_usecs) || + READ_ONCE(ep->prefer_busy_poll) || + net_busy_loop_on(); } static bool ep_busy_loop_end(void *p, unsigned long start_time)