[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH8yC8nwHPMtsHHbkvUYrqjWBBs6WtuaFKjXpMP5cSnp+AJyKg@mail.gmail.com>
Date: Thu, 4 Aug 2022 12:08:00 -0400
From: Jeffrey Walton <noloader@...il.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
X86 ML <x86@...nel.org>
Subject: Re: [PATCH RFC v1] random: implement getrandom() in vDSO
On Thu, Aug 4, 2022 at 11:40 AM Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> On Wed, Aug 03, 2022 at 12:27:43AM +0200, Thomas Gleixner wrote:
> > Jason!
>
> ...
> > Vs. the storage problem. That yells TLS, but that makes your process
> > wide sharing moot, which might not be the worst of all things IMO.
>
> Yea, TLS is what we want here. The `void *state` argument thing is meant
> for this. You allocate an array of states using that alloc function, and
> then you divvy them up per-thread.
I think it would be wise to give each thread its own state. It will
simplify locking and help avoid contention.
Jeff
Powered by blists - more mailing lists