lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxRa3mwL-17hUuUGpjCeGJXseGteuZdj8eiP5MMkGWO7A@mail.gmail.com>
Date:	Mon, 27 Apr 2015 15:00:09 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Lukasz Skalski <l.skalski@...sung.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arnd Bergmann <arnd@...db.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Tom Gundersen <teg@...m.no>, Jiri Kosina <jkosina@...e.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Daniel Mack <daniel@...que.org>,
	David Herrmann <dh.herrmann@...il.com>,
	Djalal Harouni <tixxdz@...ndz.org>
Subject: Re: [GIT PULL] kdbus for 4.1-rc1

On Mon, Apr 27, 2015 at 2:40 PM, Andy Lutomirski <luto@...capital.net> wrote:
>
> Change "USER" to "SESSION".

That works.

>  Build with:

Hell no. I used

  gcc client.c -o client $(pkg-config --cflags --libs gtk+-2.0)

instead. That worked.

>> That said, either you're running your test on a potato, or dbus is
>> seriously screwed up. No way should it take 4+ seconds to send a 1000b
>> message to back and forth 20k times. But as mentioned, I can't even
>> see what it's doing right now.
>
> Whee!  I'm typing this email on a potato!

No, I think you're right, there's the other non-potato choice: "dbus
is seriously screwed up".

That thing has almost no kernel footprint. It's spending all it's time
in user space overhead.

Quite frankly, the whole "kdbus is important for performance" seems to
be *totally* invalidated by even a minimal look at profiles for that
thing. Here's the top-15 offender list:

   2.62%  gdbus    libc-2.20.so                [.] _int_malloc
   2.43%  gdbus    libc-2.20.so                [.] free
   2.31%  server   libc-2.20.so                [.] free
   2.12%  gdbus    libc-2.20.so                [.] malloc
   1.77%  gdbus    libglib-2.0.so.0.4200.2     [.] g_utf8_validate
   1.43%  gdbus    libglib-2.0.so.0.4200.2     [.] g_slice_alloc
   1.41%  gdbus    libglib-2.0.so.0.4200.2     [.] g_hash_table_lookup
   1.28%  server   libc-2.20.so                [.] _int_malloc
   1.27%  gdbus    libglib-2.0.so.0.4200.2     [.] g_mutex_lock
   1.22%  gdbus    libglib-2.0.so.0.4200.2     [.] g_variant_unref
   1.16%  server   libc-2.20.so                [.] malloc
   1.14%  gdbus    libglib-2.0.so.0.4200.2     [.] g_bit_lock
   1.07%  gdbus    libglib-2.0.so.0.4200.2     [.] g_slice_free1
   1.05%  gdbus    libglib-2.0.so.0.4200.2     [.] g_bit_unlock
   1.01%  gdbus    libglib-2.0.so.0.4200.2     [.] g_mutex_unlock

there's not a kernel function in sight in the top-15, and it's all
just overhead. The above is from the server side, but the client looks
similar.

If somebody wants to speed up dbus, they should likely look at the
user-space code, not the kernel side.

My guess is that pretty much the entirely of the quoted kdbus
"speedup" isn't because it speeds up any kernel side thing, it's
because it avoids the user-space crap in the dbus server.

IOW, all the people who say that it's about avoiding context switches
are probably just full of shit. It's not about context switches, it's
about bad user-level code.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ