aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-03-18 20:44:24 -0400
committerIngo Molnar <mingo@elte.hu>2008-03-18 23:27:53 -0400
commit6f3d09291b4982991680b61763b2541e53e2a95f (patch)
tree683ca6bd7c93635ba315fa2f939de74124a39196 /net/core
parentf48273860edfca2306236d0f0de609aab3f773d4 (diff)
sched, net: socket wakeups are sync
'sync' wakeups are a hint towards the scheduler that (certain) networking related wakeups likely create coupling between tasks. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 09cb3a74de7..2654c147c00 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1621,7 +1621,7 @@ static void sock_def_readable(struct sock *sk, int len)
1621{ 1621{
1622 read_lock(&sk->sk_callback_lock); 1622 read_lock(&sk->sk_callback_lock);
1623 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) 1623 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
1624 wake_up_interruptible(sk->sk_sleep); 1624 wake_up_interruptible_sync(sk->sk_sleep);
1625 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); 1625 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
1626 read_unlock(&sk->sk_callback_lock); 1626 read_unlock(&sk->sk_callback_lock);
1627} 1627}
@@ -1635,7 +1635,7 @@ static void sock_def_write_space(struct sock *sk)
1635 */ 1635 */
1636 if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) { 1636 if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) {
1637 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) 1637 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
1638 wake_up_interruptible(sk->sk_sleep); 1638 wake_up_interruptible_sync(sk->sk_sleep);
1639 1639
1640 /* Should agree with poll, otherwise some programs break */ 1640 /* Should agree with poll, otherwise some programs break */
1641 if (sock_writeable(sk)) 1641 if (sock_writeable(sk))