netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: ilpo.jarvinen@helsinki.fi, krkumar2@in.ibm.com, netdev@vger.kernel.org
Subject: Re: [RFC] Question about tcp_sendmsg()
Date: Thu, 15 Jul 2010 19:15:58 -0700 (PDT)	[thread overview]
Message-ID: <20100715.191558.15224017.davem@davemloft.net> (raw)
In-Reply-To: <1279199688.2496.32.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.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.

      reply	other threads:[~2010-07-16  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 13:14 [RFC] Question about tcp_sendmsg() Eric Dumazet
2010-07-16  2:15 ` David Miller [this message]

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=20100715.191558.15224017.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).