aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-12-22 15:49:51 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-12-22 15:56:25 +0100
commit9747ea84b43c75f719d719673b9d0a7cb50d34e5 (patch)
tree445abc4d9207becbdf73b66b061a92c3af39407e /src/libstore
parentddd78391547be5f34f4042fd48124c0ced1f33b2 (diff)
Remove CPU locking
This was already accidentally disabled in ba87b08. It also no longer appears to be beneficial, and in fact slow things down, e.g. when evaluating a NixOS system configuration: elapsed time: median = 3.8170 mean = 3.8202 stddev = 0.0195 min = 3.7894 max = 3.8600 [rejected, p=0.00000, Δ=0.36929±0.02513]
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/daemon.cc5
-rw-r--r--src/libstore/remote-store.cc8
2 files changed, 4 insertions, 9 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index bafab6fd5..59325da79 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -4,7 +4,6 @@
#include "store-api.hh"
#include "path-with-outputs.hh"
#include "finally.hh"
-#include "affinity.hh"
#include "archive.hh"
#include "derivations.hh"
#include "args.hh"
@@ -960,8 +959,8 @@ void processConnection(
});
if (GET_PROTOCOL_MINOR(clientVersion) >= 14 && readInt(from)) {
- auto affinity = readInt(from);
- setAffinityTo(affinity);
+ // Obsolete CPU affinity.
+ readInt(from);
}
readInt(from); // obsolete reserveSpace
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 7f7e973e9..57cc260b0 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -5,7 +5,6 @@
#include "remote-store.hh"
#include "worker-protocol.hh"
#include "archive.hh"
-#include "affinity.hh"
#include "globals.hh"
#include "derivations.hh"
#include "pool.hh"
@@ -184,11 +183,8 @@ void RemoteStore::initConnection(Connection & conn)
conn.to << PROTOCOL_VERSION;
if (GET_PROTOCOL_MINOR(conn.daemonVersion) >= 14) {
- int cpu = sameMachine() && settings.lockCPU ? lockToCurrentCPU() : -1;
- if (cpu != -1)
- conn.to << 1 << cpu;
- else
- conn.to << 0;
+ // Obsolete CPU affinity.
+ conn.to << 0;
}
if (GET_PROTOCOL_MINOR(conn.daemonVersion) >= 11)