mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
Rename CoreAffinityConfig to CpuPinningConfig, rename fields
This commit is contained in:
parent
d659117ae5
commit
35b8a1820d
6 changed files with 30 additions and 30 deletions
|
|
@ -14,9 +14,9 @@ pub mod network;
|
|||
pub const SHARED_CHANNEL_SIZE: usize = 4096;
|
||||
|
||||
pub fn run(config: Config) -> anyhow::Result<()> {
|
||||
if config.core_affinity.set_affinities {
|
||||
if config.cpu_pinning.active {
|
||||
core_affinity::set_for_current(core_affinity::CoreId {
|
||||
id: config.core_affinity.offset,
|
||||
id: config.cpu_pinning.offset,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -44,8 +44,8 @@ pub fn run(config: Config) -> anyhow::Result<()> {
|
|||
|
||||
let mut builder = LocalExecutorBuilder::default();
|
||||
|
||||
if config.core_affinity.set_affinities {
|
||||
builder = builder.pin_to_cpu(config.core_affinity.offset + 1 + i);
|
||||
if config.cpu_pinning.active {
|
||||
builder = builder.pin_to_cpu(config.cpu_pinning.offset + 1 + i);
|
||||
}
|
||||
|
||||
let executor = builder.spawn(|| async move {
|
||||
|
|
@ -70,9 +70,9 @@ pub fn run(config: Config) -> anyhow::Result<()> {
|
|||
|
||||
let mut builder = LocalExecutorBuilder::default();
|
||||
|
||||
if config.core_affinity.set_affinities {
|
||||
if config.cpu_pinning.active {
|
||||
builder =
|
||||
builder.pin_to_cpu(config.core_affinity.offset + 1 + config.socket_workers + i);
|
||||
builder.pin_to_cpu(config.cpu_pinning.offset + 1 + config.socket_workers + i);
|
||||
}
|
||||
|
||||
let executor = builder.spawn(|| async move {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue