Commit 6f3d0929 authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
parent f4827386
...@@ -1621,7 +1621,7 @@ static void sock_def_readable(struct sock *sk, int len) ...@@ -1621,7 +1621,7 @@ static void sock_def_readable(struct sock *sk, int len)
{ {
read_lock(&sk->sk_callback_lock); read_lock(&sk->sk_callback_lock);
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep); wake_up_interruptible_sync(sk->sk_sleep);
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
read_unlock(&sk->sk_callback_lock); read_unlock(&sk->sk_callback_lock);
} }
...@@ -1635,7 +1635,7 @@ static void sock_def_write_space(struct sock *sk) ...@@ -1635,7 +1635,7 @@ static void sock_def_write_space(struct sock *sk)
*/ */
if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) { if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) {
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep); wake_up_interruptible_sync(sk->sk_sleep);
/* Should agree with poll, otherwise some programs break */ /* Should agree with poll, otherwise some programs break */
if (sock_writeable(sk)) if (sock_writeable(sk))
......
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