Commit d24c918a authored by Greg Kerr's avatar Greg Kerr Committed by Commit Bot

CrOS: Enable Hyper-Threading by default if core scheduler is available.

If the kernel supports core scheduling, Hyper-Threading is enabled by
default. Users, admins and Finch may still override this setting.

BUG=b:152605392

Change-Id: Iffcec33455ec277ec6f79f03908d02015c7d1f6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209676Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarMattias Nissler <mnissler@chromium.org>
Commit-Queue: Greg Kerr <kerrnel@chromium.org>
Auto-Submit: Greg Kerr <kerrnel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774920}
parent 23f64f5b
......@@ -91,8 +91,10 @@ void SchedulerConfigurationManager::OnPrefChange() {
// Next, if Finch isn't set, see if the command line passed in a default.
config_name = cmdline_default;
} else {
// If nothing is found, default to conservative.
config_name = debugd::scheduler_configuration::kConservativeScheduler;
// If nothing is found, default to core isolation scheduling. Note that
// only some kernels support core isolation. debugd checks for support and
// reverts to conservative if core isolation is unavailable.
config_name = debugd::scheduler_configuration::kCoreIsolationScheduler;
}
// NB: Also send an update when the config gets reset to let the system pick
......
......@@ -117,7 +117,7 @@ TEST_F(SchedulerConfigurationManagerTest, ConfigChange) {
manager.AddObserver(this);
task_environment_.RunUntilIdle();
EXPECT_EQ(debugd::scheduler_configuration::kConservativeScheduler,
EXPECT_EQ(debugd::scheduler_configuration::kCoreIsolationScheduler,
debug_daemon_client_.scheduler_configuration_name());
EXPECT_EQ(1u, configuration_set_count_);
......@@ -144,7 +144,7 @@ TEST_F(SchedulerConfigurationManagerTest, ConfigChange) {
// Dropping the policy as well reverts to the default configuration.
local_state_.RemoveManagedPref(prefs::kSchedulerConfiguration);
task_environment_.RunUntilIdle();
EXPECT_EQ(debugd::scheduler_configuration::kConservativeScheduler,
EXPECT_EQ(debugd::scheduler_configuration::kCoreIsolationScheduler,
debug_daemon_client_.scheduler_configuration_name());
EXPECT_EQ(5u, configuration_set_count_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment