On Wed, 12 Dec 2007 15:35:49 -0800 "Lachlan Andrew" <[EMAIL PROTECTED]> wrote:
> Greetings Dave, > > On 12/12/2007, David Miller <[EMAIL PROTECTED]> wrote: > > From: "Lachlan Andrew" <[EMAIL PROTECTED]> > > Date: Tue, 11 Dec 2007 16:14:36 -0800 > > > > > This thread started because TCP processing interferes with RTT > > > estimation. This problem would be eliminated if time-stamping were > > > done as soon as the packet comes off the NIC. > > > > We don't do that because such timestamping is too expensive. > > It used to be the case that we did this, but we stopped doing > > that a long time ago. > > > > On x86 for example, timestamping can involve touching a slow > > I/O device to read the timestamp. We do not want to do that > > for every packet. > > OK. Thanks for the background. > > I thought that a TSC read was fairly cheap. Any messing around to > interpret it could be the responsibility of any task which actually > needs a high-resolution timestamp, couldn't it? If TSC is disabled, > then the timestamp field could be set to "invalid". > > > Also, we timestamp differently for TCP, the global high > > resolution timestamp is overkill for this purpose. > > Overkill for Reno and Cubic, but useful for Vegas, LP, veno, Illinois > and YeAH which are all in the kernel. They currently use "high > resolution" timestamps which are effectively quantized to the > scheduler resolution because of the way timestamping is done -- > reading a high-resolution time source when a task is scheduled. > > > Really, this is a silly idea > > Oh... :( > > > and would only be a bandaid > > for the problem at hand, that TCP input processing is > > too expensive in certain circumstances. > > That problem should certainly be fixed as well -- I wasn't suggesting > this as an alternative. Will fixing it fix the problem of those TCP > modules suffering from CPU load from other sources? > > (I'm Cc'ing this to Darryl Veitch who has often wanted driver-level > time-stamping for achieving high-resolution synchronization between > hosts.) > > Cheers, > Lachlan > In current kernel, the congestion control can choose the desired accuracy. The units are always the same (microseconds), but if the flag value "TCP_CONG_RTT_STAMP" is set, then TCP tries to the high resolution real time clock. This is relatively expensive so only vegas, veno, LP, and YeAH use it. It would be worth an experiment to see whether it is worth it. All the delay based congestion control algorithms are impractical in the real world, but everyone keeps trying :-) -- Stephen Hemminger <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html