[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090315090851.GA1053@ioremap.net>
Date: Sun, 15 Mar 2009 12:08:51 +0300
From: Evgeniy Polyakov <zbr@...emap.net>
To: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
Cc: David Miller <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 6/7] tcp: cache result of earlier divides when mss-aligning things
On Sun, Mar 15, 2009 at 10:45:16AM +0200, Ilpo Järvinen (ilpo.jarvinen@...sinki.fi) wrote:
> > > @@ -676,7 +676,17 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now,
> > > tp->tcp_header_len);
> > >
> > > xmit_size_goal = tcp_bound_to_half_wnd(tp, xmit_size_goal);
> > > - xmit_size_goal -= (xmit_size_goal % mss_now);
> > > +
> > > + /* We try hard to avoid divides here */
> > > + old_size_goal = tp->xmit_size_goal_segs * mss_now;
> > > +
> > > + if (old_size_goal <= xmit_size_goal &&
> > > + old_size_goal + mss_now > xmit_size_goal) {
> > > + xmit_size_goal = old_size_goal;
> >
> > If this is way more likely condition than changed xmit size, what about
> > wrapping it into likely()?
>
> So gcc won't read my comment? :-)
I heared the next gcc version will be linked with the libastral.so, but
we have to maintain backward compatibility.
> Updated below.
The whole series looks good.
--
Evgeniy Polyakov
--
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