Commit Graph
192 Commits
Author SHA1 Message Date
Shawn Landden 2a0e069256 remove hasprefix(), use startswith() 2013-08-22 00:52:14 -04:00
Kay Sievers efa3c0af8e bus: update for kdbus changes 2013-07-22 23:00:31 +02:00
Zbigniew Jędrzejewski-Szmek fd59d9f298 Add hasprefix macro to check prefixes of fixed length 2013-06-20 23:03:58 -04:00
Harald Hoyer 4a4c0be0ab libsystemd-bus/bus-kernel.h: set MEMFD_MIN_SIZE to 128k 2013-06-05 12:25:02 +02:00
Harald Hoyer 6cbf6931d2 test-bus-kernel-benchmark: corrected output for memfd bisect 2013-06-05 12:24:17 +02:00
Kay Sievers 83d97ce664 bus: benchmark - adjust printf and MAX_SIZE 2013-06-05 10:26:00 +02:00
Kay Sievers bf30e48fe5 bus: unmap memfd retrieved from the memfd cache 2013-06-04 23:37:57 +02:00
Kay Sievers 311754514c bus-benchmark: add performance data output mode
- for now, comment out munmap() check to enable memfd passing
  - print tab-separated values and header
  - add memcpy() to fill the memfd, to produce real-world results

$ ./test-bus-kernel-benchmark
SIZE    COPY    MEMFD
4194304 370     370
2097152 810     810
1048576 2130    2130
524288  4090    4090
262144  7080    7080
131072  11380   11380
65536   17140   17140
98304   13930   13930
114688  12890   12890
122880  12350   12350
126976  12150   12150
129024  12170   12170
130048  12040   12040
130560  12080   12080
130816  12010   12010
130944  12020   12020
131008  12040   12040
131040  12050   12050
131056  12010   12010
131064  12060   12060
131068  12040   12040
131070  11310   11310
131069  11420   11420
Copying/memfd are equally fast at 131068 bytes

$ ./test-bus-kernel-benchmark chart
SIZE    COPY    MEMFD
1       35570   23690
2       36470   23680
4       36160   23520
8       36600   22220
16      33900   20830
32      33990   21360
64      33480   21280
128     34050   20910
256     32950   21750
512     34730   21900
1024    33810   22890
2048    36280   23110
4096    30790   21610
8192    29380   21100
16384   26880   19820
32768   22510   17980
65536   17270   15180
131072  11400   11420
262144  7140    8270
524288  4090    5050
1048576 2110    2780
2097152 800     1140
4194304 350     580
2013-06-04 21:00:30 +02:00
Lennart Poettering 59967d30e5 bus-benchmark: lower loop time to 100ms by default, to ensure "make check" finishes more quickly
To get useful results you should however specify a much longer time on
the command line.
2013-06-04 12:00:50 +02:00
Lennart Poettering 061b2c4365 test: determine number of transactions per second rather than time per transaction
This way the measurements are not skewed by twoo short total measurement
times, and results become stabler.
2013-06-04 11:53:11 +02:00
Kay Sievers 1a2a4cf250 bus: update for kdbus changes 2013-05-31 04:56:10 +02:00
Kay Sievers 62b3e928de bus: update for kdbus changes 2013-05-30 05:35:42 +02:00
Lennart Poettering 832d16a616 bus: rework benchmark test to actually yield useful results 2013-05-29 17:16:10 +09:00
Lennart Poettering 76b7742c13 bus: when adding memfds to cache and we shorten them, make sure to unmap the remainder 2013-05-29 17:05:01 +09:00
Lennart Poettering 89b4fc4656 bus: properly unmap mapped area 2013-05-29 17:05:01 +09:00
Kay Sievers 9b3848f2e2 bus: update kdbus.h from upstream 2013-05-24 03:08:48 +02:00
Lennart Poettering 8f155917bf bus: add benchmark tool to determine the right threshold for copying vs. memfd 2013-05-22 16:04:39 +02:00
Lennart Poettering f11e11e344 bus: add test for bloom filter prefix match 2013-05-20 10:13:38 +02:00
Lennart Poettering 86312ab8de bus: add a more comprehensive test for the bloom filter logic 2013-05-20 10:13:38 +02:00
Lennart Poettering c78196699d bus: calculate bloom filter for match
Yay! Filtering using kernel bloom filter matches works now! Yippieh!
2013-05-20 10:13:38 +02:00
Kay Sievers 16af1d3922 bus: do not pass a pointer but a uint64_t address in RECV 2013-05-17 23:26:28 +02:00
Lennart Poettering 264ad849a4 bus: add APIs for negotiating what is attached to messages 2013-05-17 04:26:27 +02:00
Lennart Poettering 45fbe937d7 bus: add minimal locking around the memfd cache
We want to allow clients to process an sd_bus_message on a different
thread than it was received on. Since unreffing a bus message might
readd some of its memfds to the memfd cache add some minimal locking
around the cache.
2013-05-17 04:26:27 +02:00
Lennart Poettering d5a2b9a6f4 bus: return ECHILD as soon as people try to reuse a bus connection across a fork() 2013-05-17 04:26:27 +02:00
Lennart Poettering 63edf05ed9 bus: actually unmap kdbus pool after use 2013-05-17 04:26:27 +02:00
Lennart Poettering f54514f354 bus: keep kernel bus fd around during entire life-time of bus
We need this since we might need to invoke the release ioctl for
messages. Since we don't want to add any locking for that we simply keep
a reference to the bus and then rely that the fd stays valid all the
time.
2013-05-17 04:26:27 +02:00
Lennart Poettering e4ee6e5cc3 bus: make bus ref counting atomic
This is preparation to allow sd_bus_message obejcts to be processed in a
different thread from their originating sd_bus object.
2013-05-16 21:58:34 +02:00
Lennart Poettering eb01ba5de1 bus: synthesize timeout message errors instead of returning error codes 2013-05-16 21:14:56 +02:00
Lennart Poettering 5cbe749238 bus: implement sd_bus_message_append_string_memfd() 2013-05-16 16:53:03 +02:00
Lennart Poettering 66b26c5c9b bus: send memfds as payload only on directed messages and for large parts 2013-05-16 16:26:35 +02:00
Lennart Poettering 1307c3ff9a bus: implement receiving side of memfd hookup 2013-05-16 02:37:42 +02:00
Lennart Poettering a392d36195 bus: put together messages with memfd payload correctly 2013-05-16 02:04:13 +02:00
Lennart Poettering 453a0c2946 bus: add support for adding memfds into message payload 2013-05-15 19:45:45 +02:00
Lennart Poettering c91cb83c4d bus: rework message struct to keep header with fields in same malloc() block
This allows us to guarantee that the first payload_vec we pass to the
kernel for each message is guaranteed to include the full header and all
its field.
2013-05-15 02:56:45 +02:00
Lennart Poettering 9b29bb6853 bus: add macro for iterating through body parts of a message 2013-05-15 01:43:15 +02:00
Lennart Poettering 13c299d3a8 bus: minor fixes 2013-05-15 01:36:09 +02:00
Lennart Poettering 47e6ce32bb bus: seal off memfds when sealing messages 2013-05-15 00:46:24 +02:00
Lennart Poettering 9b05bc4866 bus: fix allocation of body parts from memfd 2013-05-14 22:52:58 +02:00
Lennart Poettering bc7fd8cdbe bus: properly handle message bodies that are a chain of memory areas rather than a single one 2013-05-14 22:28:45 +02:00
Kay Sievers a3dc35472f bus: add and use UINT64_TO_PTR() 2013-05-14 16:13:52 +02:00
Kay Sievers 9976dcb2f6 bus: test-bus-memfd - use pread()/pwrite() 2013-05-13 15:12:25 +02:00
Kay Sievers c8150fa751 bus: update test-bus-memfd 2013-05-13 05:56:31 +02:00
Kay Sievers 18cd014f13 bus: remove KDBUS_MAKE_ACCESS_WORLD, remove (n_payload > 2) check
KDBUS_MAKE_ACCESS_WORLD is no longer needed, the kernel creates the
kdbus device node with the uid/gid of the caller now.
2013-05-12 20:17:47 +02:00
Kay Sievers 8573e652d9 bus: update test-bus-memfd 2013-05-11 14:48:24 +02:00
Kay Sievers 13019ef5ea bus: fix test-bus-memfd 2013-05-10 19:58:05 +02:00
Lennart Poettering 0d1b9a9647 bus: fix error check in memfd code 2013-05-10 19:15:55 +02:00
Lennart Poettering a7c54c8c1f bus: extend memfd test 2013-05-10 17:34:14 +02:00
Lennart Poettering ddeb424198 bus: add new API for kdbus memfd functionality 2013-05-10 14:37:05 +02:00
Kay Sievers 72455f9bf0 kdbus: update kdbus.h from upstream 2013-05-10 04:55:43 +02:00
Lennart Poettering fd8d62d940 bus: catch up with latest kdbus 2013-05-10 03:38:11 +02:00