lkml.org 
[lkml]   [2004]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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().

This patch has been in the -VP patchset for some time.

Ingo

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().

This patch has been in the -VP patchset for some time.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

--- linux/net/core/sock.c.orig
+++ linux/net/core/sock.c
@@ -933,6 +933,15 @@ 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);
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.311 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site