[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090518.215823.98238538.davem@davemloft.net>
Date: Mon, 18 May 2009 21:58:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: khc@...waw.pl, netdev@...r.kernel.org, satoru.satoh@...il.com
Subject: Re: [PATCH] net: reduce number of reference taken on sk_refcnt
From: Eric Dumazet <dada1@...mosbay.com>
Date: Sun, 10 May 2009 12:45:56 +0200
> Patch follows for RFC only (not Signed-of...), and based on net-next-2.6
Thanks for the analysis.
> @@ -922,10 +922,13 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
> } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
> wake_up_interruptible_poll(sk->sk_sleep,
> POLLIN | POLLRDNORM | POLLRDBAND);
> - if (!inet_csk_ack_scheduled(sk))
> + if (!inet_csk_ack_scheduled(sk)) {
> + unsigned int delay = (3 * tcp_rto_min(sk)) / 4;
> +
> + delay = min(inet_csk(sk)->icsk_ack.ato, delay);
> inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
> - (3 * tcp_rto_min(sk)) / 4,
> - TCP_RTO_MAX);
> + delay, TCP_RTO_MAX);
> + }
> }
> return 1;
I think this code is trying to aggressively stretch the ACK when
prequeueing. In order to make sure there is enough time to get
the process on the CPU and send a response, and thus piggyback
the ACK.
If that turns out not to really matter, or matter less than your
problem, then we can make your change and I'm all for it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists