mirror of
https://github.com/NixOS/nix.git
synced 2025-12-06 09:01:01 +01:00
Reduce false sharing between pathInfoCache and Store
`perf c2c` shows a lot of cacheline conflicts between purely read-only Store methods (like `parseStorePath()`) and the Sync classes. So allocate pathInfoCache separately to avoid that.
This commit is contained in:
parent
5ae1b5f88b
commit
a73cf447ac
7 changed files with 37 additions and 63 deletions
|
|
@ -764,10 +764,7 @@ void RemoteStore::collectGarbage(const GCOptions & options, GCResults & results)
|
|||
results.bytesFreed = readLongLong(conn->from);
|
||||
readLongLong(conn->from); // obsolete
|
||||
|
||||
{
|
||||
auto state_(Store::state.lock());
|
||||
state_->pathInfoCache.clear();
|
||||
}
|
||||
pathInfoCache->lock()->clear();
|
||||
}
|
||||
|
||||
void RemoteStore::optimiseStore()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue