cpu pinning: set affinity to multiple hyperthreads, fix issues

This commit is contained in:
Joakim Frostegård 2021-11-07 13:31:03 +01:00
parent 03192d2afb
commit e86410291a
11 changed files with 181 additions and 165 deletions

View file

@ -17,12 +17,6 @@ pub mod mio;
pub const APP_NAME: &str = "aquatic_ws: WebTorrent tracker";
pub fn run(config: Config) -> ::anyhow::Result<()> {
pin_current_if_configured_to(
&config.cpu_pinning,
config.socket_workers,
WorkerIndex::Other,
);
cfg_if!(
if #[cfg(feature = "with-glommio")] {
let state = glommio::common::State::default();
@ -48,6 +42,12 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
);
}
pin_current_if_configured_to(
&config.cpu_pinning,
config.socket_workers,
WorkerIndex::Other,
);
for signal in &mut signals {
match signal {
SIGUSR1 => {