Commit 4ca0fab5 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] sched: net: fix scheduling latencies in __release_sock

The attached patch fixes long scheduling latencies caused by backlog
triggered by __release_sock().  That code only executes in process context,
and we've made the backlog queue private already at this point so it is
safe to do a cond_resched_softirq().
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6ecee34d
......@@ -942,6 +942,15 @@ static void __release_sock(struct sock *sk)
skb->next = NULL;
sk->sk_backlog_rcv(sk, skb);
/*
* We are in process context here with softirqs
* disabled, use cond_resched_softirq() to preempt.
* This is safe to do because we've taken the backlog
* queue private:
*/
cond_resched_softirq();
skb = next;
} while (skb != NULL);
......
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