netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Thiemo Nagel <tnagel@google.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH net] inet: stop leaking jiffies on the wire
Date: Mon, 11 Nov 2019 10:24:56 -0800	[thread overview]
Message-ID: <CANn89i+sjuMtkK_J0gCV4CXYwGNk=Udark1=n5ZSHJd04nO7Mg@mail.gmail.com> (raw)
In-Reply-To: <CAC=O2+QG6vdJxjHT9yVQ4c78qG6LdREJch0Z5gKvcdfO94t9Rg@mail.gmail.com>

On Mon, Nov 11, 2019 at 9:49 AM Thiemo Nagel <tnagel@google.com> wrote:

> Problem a) is hard -- as you mention, it may require hardware support
> to solve it fully. However the problem that I'm suggesting to address
> is b), and that likely can be solved by swapping out prandom_u32() for
> get_random_u32().
>

Make sure a server can still generates 10 millions packets per second
using this thing :)

I believe get_random_u32() is at least 5 times more expensive than
prandom_u32(),
and that is on x86 where arch_has_random() is true and rdrand
instruction can be used.

On other arches this would probably kill performance, and eat entropy
way too much.

Really this is a discussion that should be taken to random subsystem
maintainers.

We can not simply use get_random_u32() here.

      reply	other threads:[~2019-11-11 18:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 17:32 [PATCH net] inet: stop leaking jiffies on the wire Eric Dumazet
2019-11-01 21:59 ` David Miller
2019-11-04 15:24   ` Thiemo Nagel
2019-11-04 15:50     ` Eric Dumazet
2019-11-11  8:52       ` Thiemo Nagel
2019-11-11 15:53         ` Eric Dumazet
2019-11-11 17:48           ` Thiemo Nagel
2019-11-11 18:24             ` Eric Dumazet [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='CANn89i+sjuMtkK_J0gCV4CXYwGNk=Udark1=n5ZSHJd04nO7Mg@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tnagel@google.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).