[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100715.191558.15224017.davem@davemloft.net>
Date: Thu, 15 Jul 2010 19:15:58 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: ilpo.jarvinen@...sinki.fi, krkumar2@...ibm.com,
netdev@...r.kernel.org
Subject: Re: [RFC] Question about tcp_sendmsg()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 15 Jul 2010 15:14:48 +0200
> While investigating for various bug reports in tcp stack, I looked at
> commit def87cf42069a (tcp: Slightly optimize tcp_sendmsg)
>
> One question I have is that the
>
> sg = sk->sk_route_caps & NETIF_F_SG;
>
> is now done at the beginning of tcp_sendmsg(), and kept in sg variable
> for the whole tcp_sendmsg() duration, even if task has to wait for
> space.
>
> Previously sk->sk_route_caps & NETIF_F_SG was done in select_size()
> itself.
>
> I am wondering if this can have a side effect, if SG capability changes
> while a thread has to wait in sk_stream_wait_memory(), and socket route
> changes (sk_route_caps flips NETIF_F_SG bit)
The consequence of this happening would be that we would linearize the
SKB in the device layer transmit path.
Therefore, to me it seems harmless. And since such SG capability
changes are so rare, caching the value in this function as we do now
seems reasonable.
--
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