From 053452c40c3694f2b706af7500a7f145dd3973ac Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 24 Nov 2023 07:03:00 -0800 Subject: [PATCH] Config: Removes Threads option This is an option that has been long overdue for removal. It's original intention was primarily to lie to the guest application about the number of cores in the system. This allowed us to say that the system was only single threaded which worked around some threading bugs that we had early on. This is no longer the case and now it is a confusing remnant of the past that people think they need to set. Incorrectly assuming that "0" by default means that FEX is doing some sort of disabling of threading and forcing all emulation down one CPU core. This is not the case and has never been the case, so removing the option makes that idea go away. --- FEXCore/Source/Interface/Config/Config.cpp | 10 ---------- FEXCore/Source/Interface/Config/Config.json.in | 9 --------- 2 files changed, 19 deletions(-) diff --git a/FEXCore/Source/Interface/Config/Config.cpp b/FEXCore/Source/Interface/Config/Config.cpp index 6fd525e01..9f7b512cc 100644 --- a/FEXCore/Source/Interface/Config/Config.cpp +++ b/FEXCore/Source/Interface/Config/Config.cpp @@ -321,16 +321,6 @@ namespace DefaultValues { Meta->Load(); // Do configuration option fix ups after everything is reloaded - { - // Always fix up the number of threads and create the configuration - // Otherwise the application could receive zero as the number of threads - FEX_CONFIG_OPT(Cores, THREADS); - if (Cores == 0) { - // When the number of emulated CPU cores is zero then auto detect - FEXCore::Config::EraseSet(FEXCore::Config::CONFIG_THREADS, fextl::fmt::format("{}", FEXCore::CPUInfo::CalculateNumberOfCPUs())); - } - } - if (FEXCore::Config::Exists(FEXCore::Config::CONFIG_CORE)) { // Sanitize Core option FEX_CONFIG_OPT(Core, CORE); diff --git a/FEXCore/Source/Interface/Config/Config.json.in b/FEXCore/Source/Interface/Config/Config.json.in index f112d99f3..35e29a6b1 100644 --- a/FEXCore/Source/Interface/Config/Config.json.in +++ b/FEXCore/Source/Interface/Config/Config.json.in @@ -31,15 +31,6 @@ "Maximum number of instruction to store in a block" ] }, - "Threads": { - "Type": "uint32", - "Default": "0", - "ShortArg": "T", - "Desc": [ - "Number of physical hardware threads to tell the process we have.", - "0 will auto detect." - ] - }, "CacheObjectCodeCompilation": { "Type": "uint32", "Default": "FEXCore::Config::ConfigObjectCodeHandler::CONFIG_NONE",