[Codel] [RFC PATCH v2] tcp: TCP Small Queues

Eric Dumazet eric.dumazet at gmail.com
Tue Jul 10 14:32:00 EDT 2012


On Tue, 2012-07-10 at 10:37 -0700, Yuchung Cheng wrote:
> On Tue, Jul 10, 2012 at 8:13 AM, Eric Dumazet <eric.dumazet at gmail.com> wrote:

> > +
> > +               if (!sock_owned_by_user(sk)) {
> > +                       if ((1 << sk->sk_state) &
> > +                           (TCPF_CLOSE_WAIT | TCPF_ESTABLISHED))
> > +                               tcp_write_xmit(sk,
> > +                                              tcp_current_mss(sk),
> > +                                              0, 0,
> > +                                              GFP_ATOMIC);
> Is this case possible: app does a large send and immediately closes
> the socket. then
> the queue is throttled and tcp_write_xmit is called back when state is
> in TCP_FIN_WAIT1.
> 
> I think tcp_write_xmit should continue regardless of the current state
> because the
> send maybe throttled/delayed but state change is synchronous.
> 

I need testing some allowed states, I think.

Maybe I missed some states, but I dont think we should call
tcp_write_xmit() if socket is now in TIMEWAIT state ?

(because of tasklet delay, we might handle TX completion _after_ socket
state change)






More information about the Codel mailing list