From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: nicolas prochazka <prochazka.nicolas@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: multiple wireguard interface and kworker ressources
Date: Tue, 13 Jun 2017 23:47:20 +0200 [thread overview]
Message-ID: <CAHmME9rQk=wv=X+KqF-NXe1n=Pyj6L1JaZ-oBoLeCV+dxoK1kw@mail.gmail.com> (raw)
In-Reply-To: <CADdae-i73rU0ot_OwvBSBdGD+mFwxQgTK0venNT6iy5QzwsDEA@mail.gmail.com>
Hi Nicolas,
It looks to me like some resources are indeed expended in adding those
interfaces. Not that much that would be problematic -- are you seeing
a problematic case? -- but still a non-trivial amount.
I tracked it down to WireGuard's instantiation of xt_hashlimit, which
does some ugly vmalloc, and it's call into the power state
notification system, which uses a naive O(n) algorithm for insertion.
I might have a way of amortizing on module insertion, which would
speed things up. But I wonder -- what is the practical detriment of
spending a few extra cycles on `ip link add`? What's your use case
where this would actually be a problem?
Thanks,
Jason
next prev parent reply other threads:[~2017-06-13 21:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 12:38 nicolas prochazka
2017-06-13 12:48 ` Jason A. Donenfeld
2017-06-13 14:55 ` nicolas prochazka
2017-06-13 21:47 ` Jason A. Donenfeld [this message]
2017-06-14 7:52 ` nicolas prochazka
2017-06-14 13:50 ` nicolas prochazka
2017-06-14 14:15 ` Jason A. Donenfeld
2017-06-14 18:08 ` nicolas prochazka
2017-06-21 13:54 ` Jason A. Donenfeld
2017-06-14 14:05 ` Jason A. Donenfeld
2017-06-14 14:13 ` Jason A. Donenfeld
2017-06-14 14:17 ` nicolas prochazka
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='CAHmME9rQk=wv=X+KqF-NXe1n=Pyj6L1JaZ-oBoLeCV+dxoK1kw@mail.gmail.com' \
--to=jason@zx2c4.com \
--cc=prochazka.nicolas@gmail.com \
--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).