9front - general discussion about 9front
 help / color / mirror / Atom feed
From: "David Arroyo" <droyo@aqwari.net>
To: 9front@9front.org
Subject: Re: [9front] Speeding up snoopy(8)
Date: Fri, 21 Oct 2022 12:54:19 -0400	[thread overview]
Message-ID: <9a2a70ea-388f-4b2f-bb9a-f401e2dc1934@app.fastmail.com> (raw)
In-Reply-To: <106C8B7544ED8BDF80597DD9B0DA7A72@eigenstate.org>

On Fri, Oct 21, 2022, at 12:04, ori@eigenstate.org wrote:
> Quoth David Arroyo <droyo@aqwari.net>:
>> On Thu, Oct 20, 2022, at 12:03, Sigrid Solveig Haflínudóttir wrote:
>> > It would be nice to have a way to get monotonic timestamps in userspace
>> > without having to go into the kernel. For now, you can try nanosec and
>> > see if anything changes.
>> I tried using nanosec, and that was sufficient for snoopy to keep up
>> with a bit rate of 1.6 Gbps, with no overflows. Thank you for the tip!
> ...should we replace the nsec() function with it?
> we may be able to stash nsec (and monotonic nsec?) at last
> context switch into tos, and interpolate using cycles.

I don't fully understand the tradeoffs in using nanosec() over nsec().
For packet captures, I specifically *don't* want time adjustments during
a capture, so nanosec() being monotonic is a plus.

It doesn't matter for snoopy currently, but is nanosec() thread-safe?
It's keeping xstart in a static variable; would different threads have
different xstarts, or could they step on each other if they call
nanosec() at the same time?


  reply	other threads:[~2022-10-21 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  4:57 droyo
2022-10-20 15:55 ` David Arroyo
2022-10-20 16:03   ` Sigrid Solveig Haflínudóttir
2022-10-21 15:38     ` David Arroyo
2022-10-21 16:04       ` ori
2022-10-21 16:54         ` David Arroyo [this message]
2022-10-21 17:10           ` ori
2022-10-21 17:40       ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2022-10-21 18:52         ` ori
2022-10-21 19:23           ` ori

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a2a70ea-388f-4b2f-bb9a-f401e2dc1934@app.fastmail.com \
    --to=droyo@aqwari.net \
    --cc=9front@9front.org \


* 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;
as well as URLs for NNTP newsgroup(s).