fabiank22:
You seem to believe that X and applications use a different communication mechanism, one that magically avoids system calls, memory copies and context switches. You're wrong.
When X talks to the app it uses the same mechanism that amarok uses to talk to dbus_daemon, or that MineSweeper.exe uses to talk to wineserver. The overhead you're talking about is equally present in any kind of IPC, be it pipes or real network connections. That overhead has to be there to ensure security and a sane userspace API.
(right, it's not present in SHM-hacks, but let's ignore those for obvious reasons.)
Of course we can avoid this overhead by moving one end of the communication channel to kernel space. Moving Firefox would yield a large absolute speedup (a context switch and a few cycles for every message sent), but a marginal relative speedup (because message sending is just a very very small part of firefox).
Moving D-Bus would yield a small absolute speedup, because typically only few messages are sent. Of course it's a large relative speedup if all you're looking at is a synthetic benchmark of D-Bus.
I'd say that improving desktop speed by putting DBus somewhere it doesn't belong is about as smart as improving the fuel efficiency of a SUV by installing better blinker lights.
Announcement
Collapse
No announcement yet.
Bringing D-Bus Into The Linux Kernel
Collapse
X
-
Hmm, isn't D-Bus supposed to be cross-platform? Moving some of it to the Linux kernel doesn't sound very helpful in that regard.
Leave a comment:
-
Originally posted by rohcQaH View PostThere are more messages between Firefox and X than D-Bus messages on my whole desktop. If it's just about eliminating the system calls and memory copies, moving either Firefox or X into the kernel would save way more CPU cycles than moving D-Bus.
Every application talks to the Display Server, calling repaints and everything, but those are not kernel messages/kernel mode switches, that is user mode communication. Inital Modesetting is one of the few things that the X-Server did in Kernel Mode(Thus requiring root rights), but we are moving away from that.
D-Bus however is Daemon for Applications to talk to each other over this protocol instead of the crazy way of shared memory. So if, let's say Amarok changes the song played it calls out a D-Bus Message, and the Now Listening-Plugin of your instant messenger will pick it up. The daemon for D-Bus resides in User-Space, but messages between processes happen in Kernel-Space, so you have a context switch every time a message is send.
Firefox communicating with X does not happen in Kernel-Mode. Sure your drivers may actually do some Hardware calls in Kernel-Mode, but once again, pushing Firefox into the kernel will not make it faster(or may make it faster due to other factors, threading and stuff like that, but can you spell security nightmare?)
So yeah, D-Bus' only purpose makes him actively use Kernel-Space, and it's a cornerstone of the modern fs-ecosystem so why not merge it there?
Leave a comment:
-
Originally posted by rohcQaH View PostThere are more messages between Firefox and X than D-Bus messages on my whole desktop. If it's just about eliminating the system calls and memory copies, moving either Firefox or X into the kernel would save way more CPU cycles than moving D-Bus.
Any other arguments why moving D-Bus into kernelspace is supposedly a good idea, while moving firefox isn't?
Leave a comment:
-
Originally posted by fabiank22 View PostThe only reason for the massive speedup in D-Bus is because D-Bus is a userspace daemon that has to do A LOT of switching to Kernel Mode whenever it's used. Firefox needs to do nothing in kernel mode.
Any other arguments why moving D-Bus into kernelspace is supposedly a good idea, while moving firefox isn't?
Leave a comment:
-
Originally posted by tball View PostSpeed is always an issue my friend. I you can do anything to improve it, do it.
Leave a comment:
-
Originally posted by DeepDayze View PostDCOP is a KDE thing not a general userspace message bus and definitely old and has reached its limits, thus dbus was born. Also Gnome just started using dbus as well so it isn't just a KDE thing now any longer and it has gotten the same benefits as KDE did.
Leave a comment:
Leave a comment: