aquatic_common: use hwloc for cpu pinning, for automatic core selection

This might not work very well on virtualized hosts, however..
This commit is contained in:
Joakim Frostegård 2021-11-19 00:17:14 +01:00
parent c1f2d036c0
commit 593a46452f
3 changed files with 97 additions and 66 deletions

View file

@ -11,7 +11,7 @@ repository = "https://github.com/greatest-ape/aquatic"
name = "aquatic_common"
[features]
cpu-pinning = ["affinity", "libc"]
cpu-pinning = ["hwloc", "libc"]
[dependencies]
ahash = "0.7"
@ -25,5 +25,6 @@ privdrop = "0.5"
rand = { version = "0.8", features = ["small_rng"] }
serde = { version = "1", features = ["derive"] }
affinity = { version = "0.1", optional = true }
# cpu-pinning
hwloc = { version = "0.5", optional = true }
libc = { version = "0.2", optional = true }