4 ms·
So, basically, systemd-bus would solve the problems even without kdbus, if it avoided all the extraneous memory allocations.
by riking 11y ago
So, basically, systemd-bus would solve the problems even without kdbus, if it avoided all the extraneous memory allocations.
- audidude 11y agoI don't think Linus is up to date on libgio-2.0 (and the GDBus implementation). It does in fact use a SLAB, based on early kernel versions with per-thread allocation caching. As for avoiding utf8 validation, that would require being able to trust the sender/receiver. That, I believe, is a major bullet point of both memfd (sealing) and kdbus.
- pdw 11y agoLinus' trace shows that 12% of the runtime is spent in libc's malloc and free. So yeah, there's a problem there.
- hp 11y agokdbus really addresses a different performance issue than tuning mallocs and locks would. By tuning mallocs/locks/validation/parsing, you can reduce the overhead of each dbus send/receive, but with kdbus you remove half of the send/receives. So however fast your sends/receives are, kdbus will still make things faster by not doing as many of them.
- hp 11y agoHere is the long version of that point: http://article.gmane.org/gmane.linux.kernel/1939651 http://article.gmane.org/gmane.linux.kernel/1939651