+5
−10
+37
−0
+3
−3
Loading
Introduced a lightweight 64-bit xorshift pseudo-random number generator (PRNG) to improve randomness distribution and reproducibility in SPDK tools. This PRNG resolves the limitations of rand_r(), which only provides 32-bit entropy and results in LBA repetition on large block devices (e.g., >32 GiB). Using xorshift64 ensures better coverage across the address space for tools like bdevperf and nvme_perf. - Added inline spdk_rand_xorshift64() to include/spdk/util.h - Added spdk_rand_xorshift64_seed() for safe seed initialization - Replaced all rand_r() or two-call RNG usages in bdevperf, perf, and zipf - Improved Doxygen documentation formatting in util.h Fixes issue #3548. Change-Id: Ib6a88906efdeffd8d56b68e991da0e17257fdf90 Signed-off-by:siddhu-swarup <ialluraiah@msystechnologies.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25801 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Community-CI: Mellanox Build Bot Reviewed-by:
Jim Harris <jim.harris@nvidia.com>