From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Theodore Ts'o <tytso@mit.edu>,
Sultan Alsawaf <sultan@kerneltoast.com>,
Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH v6] random: clear fast pool, crng, and batches in cpuhp bring up
Date: Fri, 18 Feb 2022 08:38:42 +0100 [thread overview]
Message-ID: <Yg9NAgq57ImXF/2T@linutronix.de> (raw)
In-Reply-To: <20220217180409.13151-1-Jason@zx2c4.com>
On 2022-02-17 19:04:09 [+0100], Jason A. Donenfeld wrote:
> For the irq randomness fast pool, rather than having to use expensive
> atomics, which were visibly the most expensive thing in the entire irq
> handler, simply take care of the extreme edge case of resetting count to
> zero in the cpuhp online handler, just after workqueues have been
> reenabled. This simplifies the code a bit and lets us use vanilla
> variables rather than atomics, and performance should be improved.
>
> As well, very early on when the CPU comes up, while interrupts are still
> disabled, we clear out the per-cpu crng and its batches, so that it
> always starts with fresh randomness.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Sultan Alsawaf <sultan@kerneltoast.com>
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> v6 improves the comments around each of the cpuhp functions, as
> requested.
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Now that I noticed that the previous email had some more comments, sorry
for that. So lets get that in and worry about the other bits later on.
Sebastian
prev parent reply other threads:[~2022-02-18 7:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 12:27 [PATCH v5] random: clear fast pool, crng, and batches in cpuhp bring up Jason A. Donenfeld
2022-02-17 17:44 ` Sebastian Andrzej Siewior
2022-02-17 17:53 ` Jason A. Donenfeld
2022-02-17 18:04 ` [PATCH v6] " Jason A. Donenfeld
2022-02-17 19:18 ` Sebastian Andrzej Siewior
2022-02-17 21:25 ` Jason A. Donenfeld
2022-02-18 7:38 ` Sebastian Andrzej Siewior [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=Yg9NAgq57ImXF/2T@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=Jason@zx2c4.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=peterz@infradead.org \
--cc=sultan@kerneltoast.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
/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