chore(linkerd2-proxy): always enable multicore features (#3738)

The proxy predates the multi-threaded tokio runtime. When switching to it, we
added a 'multicore' feature to adopt it incrementally. This has been the only
supported configuration for many years now.

This change removes the needless feature flag to simplify the runtime
configuration.
This commit is contained in:
Oliver Gould 2025-03-11 10:08:26 -07:00 committed by GitHub
parent a683ff5c67
commit 1c15dd087d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 15 deletions

View File

@ -8,8 +8,7 @@ publish = false
description = "The main proxy executable"
[features]
default = ["multicore", "meshtls-rustls"]
multicore = ["tokio/rt-multi-thread", "num_cpus"]
default = ["meshtls-rustls"]
meshtls-boring = ["linkerd-meshtls/boring"]
meshtls-boring-fips = ["linkerd-meshtls/boring-fips"]
meshtls-rustls = ["linkerd-meshtls/rustls"]
@ -25,8 +24,8 @@ linkerd-metrics = { path = "../linkerd/metrics" }
# control its feature flags.
linkerd-meshtls = { path = "../linkerd/meshtls" }
linkerd-signal = { path = "../linkerd/signal" }
num_cpus = { version = "1", optional = true }
tokio = { version = "1", features = ["rt", "time", "net"] }
num_cpus = "1"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "net"] }
tracing = "0.1"
[target.x86_64-unknown-linux-gnu.dependencies]

View File

@ -1,7 +1,6 @@
use tokio::runtime::{Builder, Runtime};
use tracing::{info, warn};
#[cfg(feature = "multicore")]
pub(crate) fn build() -> Runtime {
// The proxy creates an additional admin thread, but it would be wasteful to
// allocate a whole core to it; so we let the main runtime consume all
@ -55,16 +54,6 @@ pub(crate) fn build() -> Runtime {
}
}
#[cfg(not(feature = "multicore"))]
pub(crate) fn build() -> Runtime {
Builder::new()
.enable_all()
.thread_name("proxy")
.basic_scheduler()
.build()
.expect("failed to build basic runtime!")
}
/// Spawns a task to scrape metrics for the given runtime at a regular interval.
///
/// Note that this module requires unstable tokio functionality that must be