[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9rAnh6nSRNYo56Ty6VSrY17ej35AoNkSjunFO0AQp1D9Q@mail.gmail.com>
Date: Mon, 14 Feb 2022 14:28:36 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
"Theodore Ts'o" <tytso@....edu>,
Jonathan Neuschäfer <j.neuschaefer@....net>,
Sultan Alsawaf <sultan@...neltoast.com>,
Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [PATCH] random: set fast pool count to zero in cpuhp teardown
Hey Sebastian,
Thanks for your pointers.
I actually think that rollback is less of an issue than:
> - should a CPU already contribute entropy and schedule a worker then we
> reset the FAST_POOL_MIX_INFLIGHT bit.
If a CPU is going down, and we zero out count, and then it rolls back,
I'm fine with it having to acquire 64 more interrupts. In contrast, if
a CPU comes back online, I'd rather not potentially throw out the
fresh entropy. So I think I will go with your suggestion of:
> - move it to CPUHP_OFFLINE … CPUHP_BRINGUP_CPU. This is invoked on
> another CPU once the is dead / before it comes up.
> - in that case the function can remain as-is. But we have "rollback".
This seems like the best compromise. Also, executing in that phase
will let us do other things with that handler later (setting the crng
generation counter to ULONG_MAX), where it also would make sense.
I'll give this a shot and send you a v+1.
Jason
Powered by blists - more mailing lists