All of lore.kernel.org
 help / color / mirror / Atom feed
* Using jiffies for tcp_time_stamp?
@ 2012-05-22 15:45 Srećko Jurić-Kavelj
  2012-05-22 16:21 ` David Miller
  2012-05-22 17:21 ` Srećko Jurić-Kavelj
  0 siblings, 2 replies; 9+ messages in thread
From: Srećko Jurić-Kavelj @ 2012-05-22 15:45 UTC (permalink / raw)
  To: linux-kernel

Hi,

Recently I tackled round trip time estimation of a TCP connection.
After implementing a straight-forward approach (time stamping sending
and receiving of data using clock_gettime) I found this article:
http://linuxgazette.net/136/pfeiffer.html (using getsockopt() to get
struct tcp_info). The tcp_info structure conveniently has a rtt field.

Using the first method I get 1-3 ms RTT, and by using the second I get
>10ms RTT.

By looking at the code it's clear that the time stamping is done with
jiffies, and my kernel has CONFIG_HZ=100.

I understand that this is for performance reasons (and the RTT
smoothing filter is implemented with bit shifting operations), but
would using a more precise time stamp have significant impact on
performance? Since RTT is used to compute RTO, wouldn't there be any
benefits of having more accurate estimate of this value?

Best regards,

Srećko Jurić-Kavelj, dipl.ing. (Ms.E.E)
Research and Teaching Assistant at University of Zagreb
(Faculty of Electrical Engineering and Computing, Department of
Control and Computer Engineering)

E-mail: srecko.juric-kavelj@fer.hr
URL: http://www.fer.hr/srecko.juric-kavelj

Sanctus Hieronymus: "Parce mihi, Domine, quia dalmata sum!"

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-25 19:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 15:45 Using jiffies for tcp_time_stamp? Srećko Jurić-Kavelj
2012-05-22 16:21 ` David Miller
2012-05-22 17:21 ` Srećko Jurić-Kavelj
2012-05-25 15:58   ` Chris Friesen
2012-05-25 16:17     ` Dave Taht
2012-05-25 16:23       ` Srećko Jurić-Kavelj
2012-05-25 16:54         ` Eric Dumazet
2012-05-25 18:35           ` Srećko Jurić-Kavelj
2012-05-25 19:00             ` Eric Dumazet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.