svn commit: r262380 - projects/random_number_generator/sys/dev/random
Mark R V Murray
markm at FreeBSD.org
Mon Feb 24 18:36:05 UTC 2014
Hi Gleb
On 24 Feb 2014, at 11:01, Gleb Smirnoff <glebius at FreeBSD.org> wrote:
> Would buf_ring(9) do the job? If not, may be it is worth to bring it to a state
> that would suffice your needs, instead of making another implementation?
buf_ring(9) will do the job from a logical/correctness perspective, but is going to be horrendous in the places it needs to be really really really quick ;-). I’ve been asked to not mess around with pointers nearly as much as I did, and buf_ring(9) is a backwards step.
I’d be happy to improve buf_ring(9), as you suggest, though. My current implementation is lock-free on the exit-point, and locking on entry is lightweight. Everything internal is 1 static buffer/array and 2 indexes, and the speed for use inside (e.g.) the slab allocators is a much better approximation to what is needed. I still need some things to be faster, so there will be further refinements to make the slab-allocator as happy as I can get it.
M
--
Mark R V Murray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 353 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20140224/abca244f/attachment.sig>
More information about the svn-src-projects
mailing list