chiark / gitweb /
bus: add benchmark tool to determine the right threshold for copying vs. memfd
[elogind.git] / src / libsystemd-bus / bus-kernel.c
index 19d274b..10b7a8a 100644 (file)
@@ -326,6 +326,8 @@ int bus_kernel_take_fd(sd_bus *b) {
         if (b->is_server)
                 return -EINVAL;
 
+        b->use_memfd = 1;
+
         if (!b->kdbus_buffer) {
                 b->kdbus_buffer = mmap(NULL, KDBUS_POOL_SIZE, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
                 if (b->kdbus_buffer == MAP_FAILED) {