Files
Linux/lib
Uladzislau Rezki (Sony) 5e21f2d577 lib/test_vmalloc: switch to prandom_u32()
A get_random_bytes() function can cause a high contention if it is called
across CPUs simultaneously.  Because it shares one lock per all CPUs:

<snip>
   class name     con-bounces  contentions   waittime-min   waittime-max waittime-total   waittime-avg    acq-bounces   acquisitions   holdtime-min   holdtime-max holdtime-total   holdtime-avg
   &crng->lock:   663145       665886        0.05           8.85         261966.66        0.39            7188152       13731279       0.04           11.89        2181582.30       0.16
   -----------
   &crng->lock    307835       [<00000000acba59cd>] _extract_crng+0x48/0x90
   &crng->lock    358051       [<00000000f0075abc>] _crng_backtrack_protect+0x32/0x90
   -----------
   &crng->lock    234241       [<00000000f0075abc>] _crng_backtrack_protect+0x32/0x90
   &crng->lock    431645       [<00000000acba59cd>] _extract_crng+0x48/0x90
<snip>

Switch from the get_random_bytes() to prandom_u32() that does not have any
internal contention when a random value is needed for the tests.

The reason is to minimize CPU cycles introduced by the test-suite itself
from the vmalloc performance metrics.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Oleksiy Avramchenko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2022-07-03 18:08:42 -07:00
..
…
2022-06-12 14:51:51 +08:00
2022-05-09 17:20:37 -07:00
…
2021-09-08 11:50:26 -07:00
2022-03-03 10:47:52 +12:00
…
2021-11-18 13:16:22 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-03-07 12:48:35 -07:00
…
…
2022-04-22 21:30:57 +02:00
…
…
…
…
…
…
…
…
2022-01-15 08:47:31 -08:00
2022-03-07 12:48:35 -07:00
2022-04-29 14:38:01 -07:00
…
…
…
…
2022-06-12 14:51:51 +08:00
…
…
…
…
…
2022-06-12 14:51:51 +08:00
2022-06-12 14:51:51 +08:00
…
…
…
2021-09-17 13:52:17 +01:00
…
…
…
…
…
…
2022-04-29 14:38:01 -07:00
…
2022-01-20 08:52:54 +02:00
2022-04-04 14:29:20 -06:00
…
…
…
…
…
…
…