Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce fletcher4 and raidz benchmark times #11282

Merged
merged 1 commit into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion module/zcommon/zfs_fletcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ fletcher_4_kstat_addr(kstat_t *ksp, loff_t n)
fletcher_4_fastest_impl.compute_ ## type = src->compute_ ## type; \
}

#define FLETCHER_4_BENCH_NS (MSEC2NSEC(50)) /* 50ms */
#define FLETCHER_4_BENCH_NS (MSEC2NSEC(1)) /* 1ms */

typedef void fletcher_checksum_func_t(const void *, uint64_t, const void *,
zio_cksum_t *);
Expand Down
4 changes: 2 additions & 2 deletions module/zfs/vdev_raidz_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ raidz_math_kstat_addr(kstat_t *ksp, loff_t n)
#define BENCH_D_COLS (8ULL)
#define BENCH_COLS (BENCH_D_COLS + PARITY_PQR)
#define BENCH_ZIO_SIZE (1ULL << SPA_OLD_MAXBLOCKSHIFT) /* 128 kiB */
#define BENCH_NS MSEC2NSEC(25) /* 25ms */
#define BENCH_NS MSEC2NSEC(1) /* 1ms */

typedef void (*benchmark_fn)(raidz_map_t *rm, const int fn);

Expand Down Expand Up @@ -410,7 +410,7 @@ benchmark_raidz_impl(raidz_map_t *bench_rm, const int fn, benchmark_fn bench_fn)
t_start = gethrtime();

do {
for (i = 0; i < 25; i++, run_cnt++)
for (i = 0; i < 5; i++, run_cnt++)
bench_fn(bench_rm, fn);

t_diff = gethrtime() - t_start;
Expand Down