Ricardo Koller <ricarkol@xxxxxxxxxx> writes:
On Thu, Sep 01, 2022 at 07:52:35PM +0000, Colton Lewis wrote:
+
+/* Park-Miller LCG using standard constants */
+static uint32_t perf_test_random(uint32_t seed)
+{
+ return (uint64_t)seed * 48271 % ((uint32_t)(1 << 31) - 1);
+}
Nit: I would prefer moving this to include/kvm_test_util.h, maybe
something like: get_next_random(seed). There could be other users of
this.
Agree this might be useful elsewhere. Whoever needs it can move it to
the common header then.