Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Simon Rozman <simon@rozman.si>, Daniel Lenski <dlenski@gmail.com>,
	 WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Allowing space for packet headers in Wintun Tx/Rx
Date: Tue, 13 Apr 2021 16:09:01 -0600	[thread overview]
Message-ID: <CAHmME9pupX_RtsfNEA0N4bSG44rQNzGYyt4cDWXMK495Bu43Dw@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9okm3CTc0Q9sEdQksaGuDS4DV3ceczQX+aSDH-K9R9YOA@mail.gmail.com>

On Mon, Apr 12, 2021 at 11:03 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> Sorry I'm a bit late to this thread. I'm happy to see there's a
> prototype for benchmarking, though I do wonder if this is a bit of
> overeager optimization? That is, why is this necessary and does it
> actually help?
>
> By returning packets back to the Wintun ring later, more of the ring
> winds up being used, which in turn means more cache misses as it spans
> additional cache lines. In other words, it seems like this might be
> comparing the performance of memcpy+cache no-memcpy+cachemiss. Which
> is better, and is it actually measurable? Is it possible that adding
> this functionality actually has zero measurable impact on performance?
> Given the complexity this adds, it'd be nice to see some numbers to
> help make the argument, or perhaps reasoning that's more sophisticated
> than my own napkin thoughts here.

I've moved these improvements to this branch while we wait for
additional argumentation:
https://git.zx2c4.com/wintun/log/?h=sr/api-improvements

      reply	other threads:[~2021-04-13 22:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 11:49 David Woodhouse
2021-04-07 23:15 ` Daniel Lenski
2021-04-08 14:37   ` David Woodhouse
2021-04-08 16:42     ` Daniel Lenski
2021-04-08 17:10       ` David Woodhouse
2021-04-08 17:37         ` Daniel Lenski
2021-04-10 13:38         ` Simon Rozman
2021-04-10 14:35           ` David Woodhouse
2021-04-10 18:32             ` Daniel Lenski
2021-04-12 11:38               ` Simon Rozman
2021-04-12 13:00                 ` David Woodhouse
2021-04-12 17:03                   ` Jason A. Donenfeld
2021-04-13 22:09                     ` Jason A. Donenfeld [this message]

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=CAHmME9pupX_RtsfNEA0N4bSG44rQNzGYyt4cDWXMK495Bu43Dw@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=dlenski@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=simon@rozman.si \
    --cc=wireguard@lists.zx2c4.com \
    /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;
as well as URLs for NNTP newsgroup(s).