From 9d6420c97c51d0bd02aa5099f4b12a27bf81ba4a Mon Sep 17 00:00:00 2001 From: Jing Li Date: Wed, 4 Sep 2019 14:29:48 +0800 Subject: [PATCH] Don't set affinity if didn't specify -ss User can still use taskset to specify the cores, this works for non-numa CPU cases Signed-off-by: Jing Li --- Source/Lib/Codec/EbEncHandle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Lib/Codec/EbEncHandle.c b/Source/Lib/Codec/EbEncHandle.c index 92f5fa5..92448b7 100644 --- a/Source/Lib/Codec/EbEncHandle.c +++ b/Source/Lib/Codec/EbEncHandle.c @@ -642,8 +642,10 @@ void eb_set_thread_management_parameters( EbSvtVp9EncConfiguration *config_ptr){ if (num_groups == 1) { uint32_t lps = config_ptr->logical_processors == 0 ? num_logical_processors : config_ptr->logical_processors < num_logical_processors ? config_ptr->logical_processors : num_logical_processors; - for (uint32_t i = 0; i < lps; i++) - CPU_SET(lp_group[0].group[i], &group_affinity); + if (config_ptr->target_socket != -1) { + for (uint32_t i = 0; i < lps; i++) + CPU_SET(lp_group[0].group[i], &group_affinity); + } } else if (num_groups > 1) { uint32_t num_lp_per_group = num_logical_processors / num_groups;