public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay•com>
To: "David S. Miller" <davem@davemloft•net>
Cc: Linux Netdev List <netdev@vger•kernel.org>
Subject: [PATCH] tcp: tcp_prequeue() can use keyed wakeups
Date: Thu, 07 May 2009 19:20:39 +0200	[thread overview]
Message-ID: <4A031867.9060806@cosmosbay.com> (raw)
In-Reply-To: <4A031596.4020904@cosmosbay.com>

We can avoid waking up tasks not interested in receive notifications,
using wake_up_interruptible_poll() instead of wake_up_interruptible()

Signed-off-by: Eric Dumazet <dada1@cosmosbay•com>


diff --git a/include/net/tcp.h b/include/net/tcp.h
index ac37228..87d210b 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -908,7 +908,8 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
 
 		tp->ucopy.memory = 0;
 	} else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
-		wake_up_interruptible(sk->sk_sleep);
+		wake_up_interruptible_poll(sk->sk_sleep,
+					   POLLIN | POLLRDNORM | POLLRDBAND);
 		if (!inet_csk_ack_scheduled(sk))
 			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
 						  (3 * TCP_RTO_MIN) / 4,


  reply	other threads:[~2009-05-07 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 17:08 [PATCH] tcp: tcp_prequeue() cleanup Eric Dumazet
2009-05-07 17:20 ` Eric Dumazet [this message]
2009-05-07 21:55   ` [PATCH] tcp: tcp_prequeue() can use keyed wakeups David Miller
2009-05-13  1:34   ` John Dykstra
2009-05-13  3:28     ` Eric Dumazet
2009-05-13 15:05       ` John Dykstra
2009-05-18  3:45         ` David Miller
2009-05-07 21:55 ` [PATCH] tcp: tcp_prequeue() cleanup David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A031867.9060806@cosmosbay.com \
    --to=dada1@cosmosbay$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox