Hacker News new | ask | show | jobs
by p_l 749 days ago
Binder predated (significantly![1] Depending on how you count, it predated D-Bus itself[2]) both Bus1 and kdbus projects, and unlike either of them included some extra features for more efficient IPC (like mentioned by me elsewhere ability to pass CPU quanta from caller to callee and back).

Making it available from before init formed properly was, quite possibly, considerable part of why it never got merged. Kernel team had spent significant amount of work pushing out things to userland for cases like configuration et al. There's possible issue of applications failing when non-kernel-managed resource goes away, but honestly that's going to be a problem even for handling loss of service on the other end of the bus, too.

Funny thing, IIRC, ultimately both kdbus and bus1 had same userland requirements as binder does, which is userland component to set it up and IIRC provide management information too.

[1] Binder was mainlined (as experimental, but present in mainline) code in 2012, and made it into stable in 2015. kdbus started unnanounced development the same year, and was proposed for inclusion in 2014

[2] OpenBinder which became Android Binder had 1.0 release in 2005, a year before D-Bus' initial release. And that's not counting original Binder, which shipped for the first time to public in 1995

1 comments

By "making it available" it doesn't necessarily mean a fully-working, configured broker, but only having enough working primitives that you can bring up userspace without races, with requests that can immediately be accepted, even if not answered until a bit later. The stuff that we currently just cannot do with D-Bus, and that we have to reinvent protocols for.

> Binder predated both Bus1 and kdbus projects

It's not about when they started, it's about when they got merged/rejected. One got rejected because "ipc in kernel is bad", and some months later the other was merged because "ipc in kernel is good". One rule for thee...

That's my point: Binder got merged before kdbus started development.

Also, I still don't see what kind of races you're getting other than having an init system too stupid to handle ordering for applications too stupid to handle graceful connections. (Looking at last version of kdbus docs, the main coherent argument about races is relevant only to how Unix sockets can't pass around authenticated metadata along the message)

> That's my point: Binder got merged before kdbus started development.

It didn't, it was merged in 2015, a year after or so. No, staging doesn't count, it's a dumping ground for all sort of things that do not see the light of day.

> Also, I still don't see what kind of races

Just because you don't see it, it doesn't mean it's not there. Do some research and you'll see it.

> Just because you don't see it, it doesn't mean it's not there. Do some research and you'll see it.

You're the one claiming there are races when starting services, so it's your responsibility to justify that claim.

You've mentioned before that "If userspace implements the bus, then only the half of userspace that comes up after the daemon can use it", but any service manager that supports service dependencies could be configured to run the bus first, and only run the rest of the userspace after the bus is up.

What a genius idea, how bizarre that nobody ever thought about that before! We just need to get the bus dependencies up first and then... oh. Oh wait. Oh no.
> It didn't, it was merged in 2015, a year after or so. No, staging doesn't count, it's a dumping ground for all sort of things that do not see the light of day.

kdbus didn't even make it into staging. Project mainline put in some serious work to get where it got.

And quite probably part of it going better was not insisting on becoming mandatory solution for everyone. If anything, it might have been less "wheelbarrows of cash" and more conflicts involving kdbus principal developer and Linus.

> Just because you don't see it, it doesn't mean it's not there. Do some research and you'll see it.

The kdbus docs could do better job declaring why it's needed then.

> kdbus didn't even make it into staging. Project mainline put in some serious work to get where it got. > > And quite probably part of it going better was not insisting on becoming mandatory solution for everyone. If anything, it might have been less "wheelbarrows of cash" and more conflicts involving kdbus principal developer and Linus.

You mean, because it would actually be _used_ somewhere in open source distributions (that is, not just deep inside some de-facto proprietary half-closed-source fork owned by a single mega-corp)? Yeah when things are hidden away in some cupboard in the basement it's much easier not to ruffle feathers. But yeah the LKML is bad today, but back then it was a veritable open-air cesspool

> The kdbus docs could do better job declaring why it's needed then.

Well, it's dead, so what's the point...

I mean it would be forced down the throat, which wasn't making proponents any friends when their other actions culminated in Red Hat being temporarily banned from having any code merged into kernel.

As for documentation...

Maybe that's part of why it's dead and buried.