Commit 21cb84c4 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: busy-poll: remove need_resched() from sk_can_busy_loop()

Now sk_busy_loop() can schedule by itself, we can remove
need_resched() check from sk_can_busy_loop()

Also add a const to its struct sock parameter.
Signed-off-by: default avatarEric Dumazet <>
Cc: Willem de Bruijn <>
Cc: Adam Belay <>
Cc: Tariq Toukan <>
Cc: Yuval Mintz <>
Cc: Ariel Elior <>
Signed-off-by: default avatarDavid S. Miller <>
parent 217f6974
......@@ -58,10 +58,9 @@ static inline unsigned long busy_loop_end_time(void)
return busy_loop_us_clock() + ACCESS_ONCE(sysctl_net_busy_poll);
static inline bool sk_can_busy_loop(struct sock *sk)
static inline bool sk_can_busy_loop(const struct sock *sk)
return sk->sk_ll_usec && sk->sk_napi_id &&
!need_resched() && !signal_pending(current);
return sk->sk_ll_usec && sk->sk_napi_id && !signal_pending(current);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment