cem aac895409a Add prng(9) API
Add prng(9) as a replacement for random(9) in the kernel.

There are two major differences from random(9) and random(3):

- General prng(9) APIs (prng32(9), etc) do not guarantee an
  implementation or particular sequence; they should not be used for
  repeatable simulations.

- However, specific named API families are also exposed (for now: PCG),
  and those are expected to be repeatable (when so-guaranteed by the named
  algorithm).

Some minor differences from random(3) and earlier random(9):

- PRNG state for the general prng(9) APIs is per-CPU; this eliminates
  contention on PRNG state in SMP workloads.  Each PCPU generator in an
  SMP system produces a unique sequence.

- Better statistical properties than the Park-Miller ("minstd") PRNG
  (longer period, uniform distribution in all bits, passes
  BigCrush/PractRand analysis).

- Faster than Park-Miller ("minstd") PRNG -- no division is required to
  step PCG-family PRNGs.

For now, random(9) becomes a thin shim around prng32().  Eventually I
would like to mechanically switch consumers over to the explicit API.

Reviewed by:	kib, markj (previous version both)
Discussed with:	markm
Differential Revision:	https://reviews.freebsd.org/D25916
2020-08-13 20:48:14 +00:00
..
2017-03-23 05:37:04 +00:00
2017-03-23 05:41:56 +00:00
2020-05-11 22:48:00 +00:00
2020-05-11 22:08:08 +00:00
2017-03-23 05:44:18 +00:00
2020-05-01 11:36:39 +00:00
2020-04-29 11:46:01 +00:00
2019-05-20 19:08:55 +00:00
2020-05-01 11:36:39 +00:00
2016-02-29 17:26:41 +00:00
2018-01-01 00:20:35 +00:00
2019-06-21 02:49:36 +00:00
2016-06-08 10:38:00 +00:00
2017-10-29 08:17:03 +00:00
MFH
2016-03-02 23:53:08 +00:00
2020-08-13 20:48:14 +00:00
2020-07-24 00:47:14 +00:00
2020-02-02 04:53:27 +00:00
2017-04-27 16:05:12 +00:00
2018-07-31 19:08:24 +00:00
2019-12-03 15:48:28 +00:00
2019-12-03 15:48:28 +00:00
2016-09-03 20:38:13 +00:00
2020-05-09 15:56:02 +00:00
2018-12-19 20:25:58 +00:00
2020-08-13 20:48:14 +00:00
2019-07-23 16:11:38 +00:00
2019-12-27 11:19:57 +00:00
2020-05-02 23:46:29 +00:00
2017-12-28 08:22:26 +00:00
2017-10-11 21:53:50 +00:00
2018-08-03 12:14:29 +00:00
2018-12-27 16:50:28 +00:00
2020-08-07 23:06:40 +00:00
2018-08-08 18:50:42 +00:00
2016-02-24 20:32:24 +00:00