commit | 8a069eb9a4b34e48ea41ac0e270cd2ccbd6fe3e8 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Mon Nov 30 16:17:33 2020 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 30 17:07:32 2020 +0100 |
tree | 40ebf0d8031514f9a9d24e967d7f2b866daf34a3 | |
parent | a5a447984900cff138e9f2c94afbcd10dbdb0d1a [diff] |
MINOR: debug: add a trivial PRNG for scheduler stress-tests Commit a5a447984 ("MINOR: debug: add "debug dev sched" to stress the scheduler.") doesn't scale with threads because ha_random64() takes care of being totally thread-safe for use with UUIDs. We don't need this for the stress-testing functions, let's just implement a xorshift PRNG instead. On 8 threads the performance jumped from 230k ctx/s with 96% spent in ha_random64() to 14M ctx/s.