Re: kdbus: to merge or not to merge?

From: David Herrmann
Date: Tue Aug 04 2015 - 10:09:58 EST


Hi

On Tue, Aug 4, 2015 at 3:46 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Aug 4, 2015 at 1:58 AM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote:
>>
>> You lack a call to sd_bus_unref() here.
>
> I assume it was intentional. Why would Andy talk about "scaling" otherwise?
>
> And the worry was why the kdbus version killed the machine, but the
> userspace version did not. That's a rather big difference, and not a
> good one.

Neither test 'kills' the machine:

* The userspace version will be killed by the OOM killer after about
20s running (depending how much memory you have).

* The kernel version runs for 1024 iterations (maximum kdbus
connections per user) and then produces errors.

In fact, the kernel version is even more stable than the user-space
version, and bails out much earlier. Run it on a VT and everything
works just fine.

The only issue you get with kdbus is the compat-bus-daemon, which
assert()s as a side-effect of accept4() failing. In other words, the
compat bus-daemon gets ENFILE if you open that many connections, then
assert()s and thus kills all other proxy connections. This has the
side effect, that Xorg loses access to your graphics device and thus
your screen 'freezes'. Also networkmanager bails out and stops network
connections.

This is a bug in the proxy (which is already fixed).

Thanks
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/