Skip to content

Commit aa15fa3

Browse files
committed
eventpoll: Trigger napi_busy_loop, if prefer_busy_poll is set
JIRA: https://issues.redhat.com/browse/RHEL-77189 Upstream Status: linux.git commit ab5b28b Author: Martin Karsten <mkarsten@uwaterloo.ca> Date: Sat Nov 9 05:02:33 2024 +0000 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 <mkarsten@uwaterloo.ca> Co-developed-by: Joe Damato <jdamato@fastly.com> Signed-off-by: Joe Damato <jdamato@fastly.com> Tested-by: Joe Damato <jdamato@fastly.com> Tested-by: Martin Karsten <mkarsten@uwaterloo.ca> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Link: https://patch.msgid.link/20241109050245.191288-4-jdamato@fastly.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Antoine Tenart <atenart@redhat.com>
1 parent 6656592 commit aa15fa3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/eventpoll.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,9 @@ static bool busy_loop_ep_timeout(unsigned long start_time,
420420

421421
static bool ep_busy_loop_on(struct eventpoll *ep)
422422
{
423-
return !!READ_ONCE(ep->busy_poll_usecs) || net_busy_loop_on();
423+
return !!READ_ONCE(ep->busy_poll_usecs) ||
424+
READ_ONCE(ep->prefer_busy_poll) ||
425+
net_busy_loop_on();
424426
}
425427

426428
static bool ep_busy_loop_end(void *p, unsigned long start_time)

0 commit comments

Comments
 (0)