From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Srećko Jurić-Kavelj" <srecko.juric-kavelj@fer.hr>
Cc: Dave Taht <dave.taht@gmail.com>,
Chris Friesen <chris.friesen@genband.com>,
netdev@vger.kernel.org
Subject: Re: Using jiffies for tcp_time_stamp?
Date: Fri, 25 May 2012 18:54:40 +0200 [thread overview]
Message-ID: <1337964880.3347.52.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAACrLC0b5dyjJM=DGf-9nUOwar3O9EVTTR0tvynQj285EDpfwA@mail.gmail.com>
On Fri, 2012-05-25 at 18:23 +0200, Srećko Jurić-Kavelj wrote:
> On Fri, May 25, 2012 at 6:17 PM, Dave Taht <dave.taht@gmail.com> wrote:
> > On Fri, May 25, 2012 at 4:58 PM, Chris Friesen
> > <chris.friesen@genband.com> wrote:
> >> I don't know if it would make any difference to the tcp algorithms, but
> >> certainly on some architectures you can get a fast and accurate hardware
> >> timestamp.
> >
> > I would be interested in someone doing that experiment in light of the
> > codel work.
>
> I've looked this up in other implementations, e.g. FreeBSD uses 1ms
> granularity no matter what HZ says, NetBSD has 500ms ticks, ...
>
> I guess that granularity also depends on the retransmit timers used. I
> didn't make out what's the precision of the timers that Linux uses in
> TCP, but I guess it uses high resolution timers? At least on x86?
>
> I've done a simple experiment by repeatedly calling clock_gettime
> (from userspace, but I guess it ends up as a vsyscall). I get >17
> million calls per second on a Q6600.
linux TCP uses high precision timestamps (ktime_get_real()) where
needed.
# find net|xargs grep -n TCP_CONG_RTT_STAMP
net/ipv4/tcp_veno.c:205: .flags = TCP_CONG_RTT_STAMP,
net/ipv4/tcp_vegas.c:308: .flags = TCP_CONG_RTT_STAMP,
net/ipv4/tcp_cubic.c:478: cubictcp.flags |= TCP_CONG_RTT_STAMP;
net/ipv4/tcp_output.c:815: if (icsk->icsk_ca_ops->flags & TCP_CONG_RTT_STAMP)
net/ipv4/tcp_lp.c:317: .flags = TCP_CONG_RTT_STAMP,
net/ipv4/tcp_yeah.c:229: .flags = TCP_CONG_RTT_STAMP,
net/ipv4/tcp_illinois.c:326: .flags = TCP_CONG_RTT_STAMP,
net/ipv4/tcp_input.c:3496: if (ca_ops->flags & TCP_CONG_RTT_STAMP &&
Other than that HZ=1000 seems fine.
HZ=100 seems a poor choice, we have NO_HZ since a long time.
next prev parent reply other threads:[~2012-05-25 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAACrLC39Xdm3vTKUsjz43ZPyEq_vHxR-_Uf56SjSm+kUqxOqZg@mail.gmail.com>
2012-05-22 17:21 ` Using jiffies for tcp_time_stamp? 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 [this message]
2012-05-25 18:35 ` Srećko Jurić-Kavelj
2012-05-25 19:00 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337964880.3347.52.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=chris.friesen@genband.com \
--cc=dave.taht@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=srecko.juric-kavelj@fer.hr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox