From 6a419d068c48bab3bdde8bf20ea427f79a88af80 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Mon, 31 Aug 2020 13:35:57 +0200 Subject: [PATCH] CUDA Backend: Use blocking events to avoid 100% CPU core usage (per GPU) --- docs/changes.txt | 1 + src/backend.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f5b333503..960718f2d 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -27,6 +27,7 @@ ## - Apple Keychain: Notify the user about the risk of collisions / false positives +- CUDA Backend: Use blocking events to avoid 100% CPU core usage (per GPU) - Startup time: Improved the startup time by avoiding some time intensive operations for skipped devices ## diff --git a/src/backend.c b/src/backend.c index 19a09f7a7..2d290e0e0 100644 --- a/src/backend.c +++ b/src/backend.c @@ -7831,9 +7831,9 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) if (device_param->is_cuda == true) { - if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event1, CU_EVENT_DEFAULT) == -1) return -1; + if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event1, CU_EVENT_BLOCKING_SYNC) == -1) return -1; - if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event2, CU_EVENT_DEFAULT) == -1) return -1; + if (hc_cuEventCreate (hashcat_ctx, &device_param->cuda_event2, CU_EVENT_BLOCKING_SYNC) == -1) return -1; } /**