runners: Adopted compile-time optional kiwibd as emubd alternative

kiwibd has been used extensively in external benchmarks, it makes sense
to make it the default bd for the bench runner:

- test_runner - defaults to emubd - more testing features
- bench_runner - defaults to kiwibd - lighter-weight disks

The benefit of kiwibd is the disk is just one big blob of RAM, so
basically no overhead. This is important when benchmarking on multi-GiB
disks.

emubd is much heavy, but as a tradeoff can do quite a bit more:
bad-block simulation, wear simulation, snapshotting, etc.

---

In theory the bd used by each runner can be controlled at compile-time
by defining -DBENCH_EMUBD, etc, but I have a feeling no one will ever
use this.
This commit is contained in:
Christopher Haster
2026-01-26 01:56:36 -06:00
parent f07ed90a63
commit ab39a8fde9
6 changed files with 312 additions and 70 deletions
+6 -2
View File
@@ -61,10 +61,12 @@
BENCH_DEFINE(PROGGED_TIMING, 1484 )
BENCH_DEFINE(ERASED_TIMING, 0 )
#endif
#ifndef BENCH_KIWIBD
BENCH_DEFINE(ERASE_CYCLES, 0 )
BENCH_DEFINE(BADBLOCK_BEHAVIOR, LFS3_EMUBD_BADBLOCK_PROGERROR )
BENCH_DEFINE(POWERLOSS_BEHAVIOR, LFS3_EMUBD_POWERLOSS_ATOMIC )
BENCH_DEFINE(EMUBD_SEED, 0 )
BENCH_DEFINE(BD_SEED, 0 )
#endif
#endif
@@ -107,9 +109,11 @@
BENCH_BDCFG(readed_timing, READED_TIMING )
BENCH_BDCFG(progged_timing, PROGGED_TIMING )
BENCH_BDCFG(erased_timing, ERASED_TIMING )
#ifndef BENCH_KIWIBD
BENCH_BDCFG(erase_cycles, ERASE_CYCLES )
BENCH_BDCFG(badblock_behavior, BADBLOCK_BEHAVIOR )
BENCH_BDCFG(powerloss_behavior, POWERLOSS_BEHAVIOR )
BENCH_BDCFG(seed, EMUBD_SEED )
BENCH_BDCFG(seed, BD_SEED )
#endif
#endif