Re: [PATCH] net: tcp: Fix a PTO timing granularity issue
From: Ido Yariv
Date: Thu May 28 2015 - 00:37:43 EST
Hi Eric,
On Wed, May 27, 2015 at 03:15:26PM -0400, Ido Yariv wrote:
> Hi Eric,
>
> On Wed, May 27, 2015 at 10:24:16AM -0700, Eric Dumazet wrote:
> > On Wed, 2015-05-27 at 12:54 -0400, Ido Yariv wrote:
> > > Hi Eric,
> >
> > > That's a nice optimization ;)
> > >
> > > However, I think that with Nicholas Mc Guire's recent changes to
> > > msecs_to_jiffies (http://marc.info/?l=linux-kernel&m=143195210010666),
> > > we should get this for free, no?
> >
> > Well, on net and net-next tree we currently have :
> >
> > $ grep msecs_to_jiffies include/linux/jiffies.h
> > extern unsigned long msecs_to_jiffies(const unsigned int m);
> >
> > Given your patch is for stable, I would not mind having this done
> > anyway.
>
> I believe these changes are in tip, but not in net/net-next just yet.
>
> I actually didn't think this patch is for stable, but we can certainly
> do that.
>
> Would you be fine with the patch below? Please note that I modified your
> optimization a bit.
We'd probably like to avoid any potential integer overflows as well, so
I modified the if statement accordingly.
Not sure this optimization is really beneficial (and only on stable
kernels), but here's the updated patch.
Cheers,
Ido.