Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1199561

Re: kdbus: to merge or not to merge?

From David Herrmann <dh.herrmann@gmail.com>
Newsgroups linux.kernel
Subject Re: kdbus: to merge or not to merge?
Date 2015-08-04 11:00 +0200
Message-ID <pTGeM-5Af-47@gated-at.bofh.it> (permalink)
References <pEpzc-2uw-1@gated-at.bofh.it> <pTx1M-Kt-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi

On Tue, Aug 4, 2015 at 1:02 AM, Andy Lutomirski <luto@kernel.org> wrote:
>                                                I got Fedora
> Rawhide working under kdbus (thanks, everyone!), and I ran this little
> program:
>
> #include <systemd/sd-bus.h>
> #include <err.h>
>
> int main(int argc, char *argv[])
> {
>     while (1) {
>         sd_bus *bus;
>         if (sd_bus_open_system(&bus) < 0) {
>             /* warn("sd_bus_open_system"); */
>             continue;
>         }
>         sd_bus_close(bus);

You lack a call to sd_bus_unref() here. Without it, your loop contains:

        while (1)
                malloc(1024);

This simple malloc-loop already hogs your system. If I add the
required call to _unref(), your tool runs smoothly on my machine.

>     }
> }
>
> under both userspace dbus and under kdbus.  Userspace dbus burns some
> CPU -- no big deal.  I expected kdbus to fail to scale and burn a
> disproportionate amount of CPU (because I don't see how it /can/
> scale).  Instead it fell over completely.  I didn't bother debugging
> it, but offhand I'd guess that the system OOMed and didn't come back.

I cannot see the relation to kdbus.

> On very brief inspection, Rawhide seems to have a lot of kdbus
> connections with 16MiB of mapped tmpfs stuff each.  (53 of them
> mapped, and I don't know how many exist with tmpfs backing but aren't
> mapped.  Presumably the number only goes up as the degree of reliance
> on the userspace proxy goes down.

What does this have to do with the proxy? Why would resource
consumption go *up* as the proxy users decline? Please elaborate.

>                                         I don't know of any deployed
> systems that solve it by broadcasting the lifetime of everything to
> everyone and relying on those broadcasts going through, though.

Luckily, kdbus does not do this.

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@kernel.org> - 2015-08-04 01:10 +0200
  Re: kdbus: to merge or not to merge? David Herrmann <dh.herrmann@gmail.com> - 2015-08-04 11:00 +0200
    Re: kdbus: to merge or not to merge? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-04 15:50 +0200
      Re: kdbus: to merge or not to merge? David Herrmann <dh.herrmann@gmail.com> - 2015-08-04 16:20 +0200
        Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-04 16:50 +0200
          Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-05 02:20 +0200
            Re: kdbus: to merge or not to merge? Daniel Mack <daniel@zonque.org> - 2015-08-06 09:10 +0200
              Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-06 17:30 +0200
                Re: kdbus: to merge or not to merge? Daniel Mack <daniel@zonque.org> - 2015-08-06 19:30 +0200
          Re: kdbus: to merge or not to merge? David Herrmann <dh.herrmann@gmail.com> - 2015-08-05 09:20 +0200
            Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-05 22:20 +0200
              Re: kdbus: to merge or not to merge? David Herrmann <dh.herrmann@gmail.com> - 2015-08-06 10:10 +0200
                Re: kdbus: to merge or not to merge? Martin Steigerwald <martin@lichtvoll.de> - 2015-08-06 10:30 +0200
                Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-06 17:30 +0200
                Re: kdbus: to merge or not to merge? Daniel Mack <daniel@zonque.org> - 2015-08-06 20:20 +0200
                Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-06 20:50 +0200
                Re: kdbus: to merge or not to merge? Daniel Mack <daniel@zonque.org> - 2015-08-07 16:50 +0200
                Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-07 17:10 +0200
                Re: kdbus: to merge or not to merge? Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-08-09 21:10 +0200
                Re: kdbus: to merge or not to merge? Daniel Mack <daniel@zonque.org> - 2015-08-10 00:20 +0200
                Re: kdbus: to merge or not to merge? Andy Lutomirski <luto@amacapital.net> - 2015-08-10 04:20 +0200
                Re: kdbus: to merge or not to merge? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-10 19:10 +0200
                Re: kdbus: to merge or not to merge? David Lang <david@lang.hm> - 2015-08-10 04:50 +0200
                Re: kdbus: to merge or not to merge? cee1 <fykcee1@gmail.com> - 2015-08-07 17:40 +0200

csiph-web