From 988cd035131a3c8c295aeac4a2f12f0514503769 Mon Sep 17 00:00:00 2001 From: Rohit Kulshreshtha Date: Thu, 5 Dec 2024 16:36:23 -0800 Subject: [PATCH] Removing affinity code. --- Cargo.lock | 23 ------------------- datastores/gossip_kv/Cargo.toml | 1 - .../gossip_kv/load_test_server/server.rs | 3 --- 3 files changed, 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 563cff2740a7..dcb0f20fd016 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,18 +34,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "affinity" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763e484feceb7dd021b21c5c6f81aee06b1594a743455ec7efbf72e6355e447b" -dependencies = [ - "cfg-if", - "errno", - "libc", - "num_cpus", -] - [[package]] name = "ahash" version = "0.8.11" @@ -1197,7 +1185,6 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "gossip_kv" version = "0.1.0" dependencies = [ - "affinity", "clap", "config", "governor", @@ -2257,16 +2244,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "number_prefix" version = "0.4.0" diff --git a/datastores/gossip_kv/Cargo.toml b/datastores/gossip_kv/Cargo.toml index e404de1b141e..37943072a7d1 100644 --- a/datastores/gossip_kv/Cargo.toml +++ b/datastores/gossip_kv/Cargo.toml @@ -7,7 +7,6 @@ license = "Apache-2.0" publish = false [dependencies] -affinity = "0.1.2" clap = { version = "4.5.4", features = ["derive", "env"] } config = "0.14.0" governor = "0.7.0" diff --git a/datastores/gossip_kv/load_test_server/server.rs b/datastores/gossip_kv/load_test_server/server.rs index 80bbd5a81aee..85f9285ce103 100644 --- a/datastores/gossip_kv/load_test_server/server.rs +++ b/datastores/gossip_kv/load_test_server/server.rs @@ -2,7 +2,6 @@ use std::convert::Infallible; use std::num::{NonZeroU32, ParseFloatError}; use std::thread::sleep; use std::time::Duration; -use affinity::set_thread_affinity; use clap::Parser; use gossip_kv::membership::{MemberDataBuilder, Protocol}; use gossip_kv::{ClientRequest, GossipMessage, Key}; @@ -65,7 +64,6 @@ fn run_server( let (client_input_tx, client_input_rx) = bounded_channel(1000); std::thread::spawn(move || { - set_thread_affinity([0]).unwrap(); let rt = tokio::runtime::Builder::new_current_thread() .enable_all() @@ -122,7 +120,6 @@ fn run_server( }); std::thread::spawn(move || { - set_thread_affinity([2]).unwrap(); let rt = tokio::runtime::Builder::new_current_thread() .enable_all() .build()