[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OFC615F4FC.74D9EC7D-ON65257688.003074DE-65257688.0038A471@in.ibm.com>
Date: Thu, 10 Dec 2009 15:59:45 +0530
From: Krishna Kumar2 <krkumar2@...ibm.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
Cc: David Miller <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 3/3] tcp: Slightly optimize tcp_sendmsg
Hi Ilpo,
"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi> wrote on 12/10/2009 01:47:30
PM:
> Subject: Re: [PATCH 3/3] tcp: Slightly optimize tcp_sendmsg>
>
> > Slightly optimize tcp_sendmsg since NETIF_F_SG is used many
> > times iteratively in the loop. The only other modification is
> > to change:
> > } else if (i == MAX_SKB_FRAGS ||
> > (!i &&
> > !(sk->sk_route_caps & NETIF_F_SG))) {
> > to:
> > } else if (i == MAX_SKB_FRAGS || !sg) {
>
> I can see that you make this change from the patch itself but could you
> give a justification on why dropping the !i is possible? ...I couldn't
> see what would allow that.
>From what *I understood*, this code (other than the MAX_SKB_FRAGS case)
executes only due to the else part of "if (skb_tailroom(skb) > 0) {" -
there was no space in the skb to put the data inline. Hence SG is false
is a sufficient condition and there is no way to add a fragment (i == 0
since skb_fill_page_desc cannot be called when !SG).
thanks,
- KK
--
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