Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2015 15:33:02 -0800
From:      "K. Macy" <kmacy@freebsd.org>
To:        John-Mark Gurney <jmg@funkthat.com>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Harrison Grundy <harrison.grundy@astrodoggroup.com>, Alfred Perlstein <alfred@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: locks and kernel randomness...
Message-ID:  <CAHM0Q_NhUpr_HJZZcAEoZ_hNvZKcVzUBH-7LALsbkgqjLimA7A@mail.gmail.com>
In-Reply-To: <20150224231921.GQ46794@funkthat.com>
References:  <20150224012026.GY46794@funkthat.com> <20150224015721.GT74514@kib.kiev.ua> <54EBDC1C.3060007@astrodoggroup.com> <20150224024250.GV74514@kib.kiev.ua> <DD06E2EA-68D6-43D7-AA17-FB230750E55A@bsdimp.com> <20150224174053.GG46794@funkthat.com> <54ECBD4B.6000007@freebsd.org> <20150224182507.GI46794@funkthat.com> <54ECEA43.2080008@freebsd.org> <20150224231921.GQ46794@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> If someone does find a performance issue w/ my patch, I WILL work with
> them on a solution, but I will not work w/ people who make unfounded
> claims about the impact of this work...
>

<shrug> ... The concerns may be exaggerated, but they aren't
unfounded. Not quite the same thing, but no one wants to spend the
cycles doing a SHA256 because it's "The Right Thing"(tm) when their
use case only requires a fletcher2.

If it doesn't already exist, it might also be worth looking in to a
more scalable CSPRNG implementation not requiring locking in the
common case. For example, each core is seeded separately periodically
so that has a private pool that is protected by a critical section.
The private pool would be regularly refreshed by cpu-local callout.
Thus, a lock would only be acquired if the local entropy were
depleted.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_NhUpr_HJZZcAEoZ_hNvZKcVzUBH-7LALsbkgqjLimA7A>