From 1370dc47005b6c7de14f1c1c9556baad6874f6d0 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sun, 14 Apr 2019 09:29:27 +0200 Subject: [PATCH] Limit kernel-accel in -m 11600 to 128 --- src/modules/module_11600.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/module_11600.c b/src/modules/module_11600.c index 12bd4bb81..75b09e003 100644 --- a/src/modules/module_11600.c +++ b/src/modules/module_11600.c @@ -271,6 +271,13 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c return tmp_size; } +u32 module_kernel_accel_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 kernel_accel_max = 128; // password length affects total performance, this limits the wait times for threads with short password lengths if there's at least one thread with long password length + + return kernel_accel_max; +} + u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { // this overrides the reductions of PW_MAX in case optimized kernel is selected @@ -695,7 +702,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_hook_size = module_hook_size; module_ctx->module_jit_build_options = module_jit_build_options; module_ctx->module_jit_cache_disable = MODULE_DEFAULT; - module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = module_kernel_accel_max; module_ctx->module_kernel_accel_min = MODULE_DEFAULT; module_ctx->module_kernel_loops_max = MODULE_DEFAULT; module_ctx->module_kernel_loops_min = MODULE_DEFAULT;