Re: [systemd-devel] [PATCH 4/4] gdbus: Add basic kdbus tests

2014-01-17 Thread Lukasz Skalski

On 12/20/2013 04:23 PM, Yin Kangkai wrote:


Will it be more interesting to show some real benchmarking numbers? ;)

  - results with vanilla GIO;
  - results with GIO with kdbus transport, talking to kdbus
dbus-daemon;
  - results with GIO with kdbus transport, talking through systemd-bus-proxyd
to systemd-bus-driverd;

Regards,
Kangkai



Hi Kangkai,

Here you can find some real benchmarking numbers:

http://lists.freedesktop.org/archives/dbus/2014-January/016074.html

--
Lukasz Skalski
Samsung RD Institute Poland
Samsung Electronics
l.skal...@partner.samsung.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] gdbus: Add basic kdbus tests

2014-01-03 Thread Karol Lewandowski
On 12/20/2013 04:23 PM, Yin Kangkai wrote:

Hi!

Sorry for late response, I've been out of office the last week(s).

 On 2013-11-21, 12:33 +0100, Karol Lewandowski wrote:
 +TESTS
 +=
 +
 +* Build test binaries:
 +
 +  cd gio/tests
 +  make
 +
 +* Set variable to use custom library and to use kdbus as session bus:
 +
 +  export LD_LIBRARY_PATH=absolute_path_to_glib_libs_with_kdbus_patch
 +  export DBUS_SESSION_BUS_ADDRESS=kdbus:path=/dev/kdbus/0-kdbus/bus
 +
 +* Run test binary server in terminal 1:
 +
 +  ./gdbus-example-kdbus-server
 +
 +* Run test binary client in terminal 2:
 +
 +  ./gdbus-example-kdbus-client
 +
 +* Sample client app output:
 +
 +  elapsed time : 0.265072 s
 +  elapsed time : 0.264353 s
 +  elapsed time : 0.305062 s
 +  elapsed time : 0.343710 s
 +  elapsed time : 0.451501 s
 +  elapsed time : 1.109851 s
 +  elapsed time : 8.278217 s
 
 Will it be more interesting to show some real benchmarking numbers? ;)
 
  - results with vanilla GIO;
  - results with GIO with kdbus transport, talking to kdbus
dbus-daemon;
  - results with GIO with kdbus transport, talking through systemd-bus-proxyd
to systemd-bus-driverd;

I agree this is very much needed.  Currently, due to major changes in
kdbus, we are redoing some of the gio-kdbus stuff again. Lukasz Skalski
will share result in following days.

Cheers,
Karol
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] gdbus: Add basic kdbus tests

2013-12-20 Thread Yin Kangkai
On 2013-11-21, 12:33 +0100, Karol Lewandowski wrote:
 +TESTS
 +=
 +
 +* Build test binaries:
 +
 +  cd gio/tests
 +  make
 +
 +* Set variable to use custom library and to use kdbus as session bus:
 +
 +  export LD_LIBRARY_PATH=absolute_path_to_glib_libs_with_kdbus_patch
 +  export DBUS_SESSION_BUS_ADDRESS=kdbus:path=/dev/kdbus/0-kdbus/bus
 +
 +* Run test binary server in terminal 1:
 +
 +  ./gdbus-example-kdbus-server
 +
 +* Run test binary client in terminal 2:
 +
 +  ./gdbus-example-kdbus-client
 +
 +* Sample client app output:
 +
 +  elapsed time : 0.265072 s
 +  elapsed time : 0.264353 s
 +  elapsed time : 0.305062 s
 +  elapsed time : 0.343710 s
 +  elapsed time : 0.451501 s
 +  elapsed time : 1.109851 s
 +  elapsed time : 8.278217 s

Will it be more interesting to show some real benchmarking numbers? ;)

 - results with vanilla GIO;
 - results with GIO with kdbus transport, talking to kdbus
   dbus-daemon;
 - results with GIO with kdbus transport, talking through systemd-bus-proxyd
   to systemd-bus-driverd;

Regards,
Kangkai
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 4/4] gdbus: Add basic kdbus tests

2013-11-21 Thread Karol Lewandowski
---
 configure.ac  |   1 +
 gio/tests/Makefile.am |  13 +++
 gio/tests/kdbus-test/README   | 108 
 gio/tests/kdbus-test/gdbus-example-kdbus-client.c |  51 ++
 gio/tests/kdbus-test/gdbus-example-kdbus-server.c | 117 ++
 5 files changed, 290 insertions(+)
 create mode 100644 gio/tests/kdbus-test/README
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-client.c
 create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-server.c

diff --git a/configure.ac b/configure.ac
index 413c9f2..c3349c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,7 @@ AS_IF([test x$enable_gc_friendly = xyes], [
 ], [ AC_MSG_RESULT([no]) ])
 
 AC_MSG_CHECKING([kdbus transport])
+AM_CONDITIONAL(KDBUS_TRANSPORT, [test x$enable_kdbus_transport = xyes])
 AS_IF([test x$enable_kdbus_transport = xyes], [
   AC_DEFINE(KDBUS_TRANSPORT, 1, [Define if kdbus transport is enabled])
   AC_MSG_RESULT([yes])
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bec70d7..8d692bb 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -470,6 +470,19 @@ gdbus_serialization_SOURCES = \
gdbus-tests.c
 endif
 
+if KDBUS_TRANSPORT
+test_programs += gdbus-example-kdbus-server
+test_programs += gdbus-example-kdbus-client
+
+gdbus_example_kdbus_server_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_server_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_server_SOURCES = kdbus-test/gdbus-example-kdbus-server.c
+
+gdbus_example_kdbus_client_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_client_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_client_SOURCES = kdbus-test/gdbus-example-kdbus-client.c
+endif
+
 # -
 #  The resources test is a bit more complicated...
 
diff --git a/gio/tests/kdbus-test/README b/gio/tests/kdbus-test/README
new file mode 100644
index 000..6f44f0b
--- /dev/null
+++ b/gio/tests/kdbus-test/README
@@ -0,0 +1,108 @@
+Description
+===
+
+In order to perform tests of modified libgio library (with kdbus
+transport) we have created two programs: gdbus-example-kdbus-server
+and gdbus-example-kdbus-client.  The first of them acts as a server,
+registers itself on the bus under well-known name and waits for calls
+to its objects and methods. The second one (client) makes calls and
+records periods of time between moment of preparing of a call to the
+moment of receiving and parsing an answer. The measurement is made by
+performing one thousand of calls and computing a sum of duration of
+every call (for different sizes of message payload: 4B, 8B, 4kB, 8kB,
+16kB, 64kB and 512kB).  The client program returns total time of
+performed calls after successful execution.
+
+
+Requirements
+
+
+* kdbus kernel module,
+* modified version of glib (with kdbus transport),
+* modified version of dbus-daemon (with kdbus transport),
+
+
+KDBUS
+=
+
+Simple install procedure:
+
+  % git clone https://github.com/gregkh/kdbus.git# download kdbus source
+  % cd kdbus # change to kdbus 
directory
+  % make # build kdbus module
+  % insmod kdbus.ko  # load kdbus kernel module
+
+
+GLIB (modified version)
+===
+
+Simple install procedure:
+
+
+  % cd glib # change to glib directory
+  % ./configure --enable-kdbus-transport# run the `configure' 
script with kdbus support
+  % make# build GLIB
+
+
+DBUS-DAEMON (modified version)
+==
+
+Modified version of dbus-daemon (from tizen.org) is required to run
+kdbus transport in libgio.
+
+Solution, which we propose, includes modifications both in client
+libraries (libgio, libdbus) and dbus daemon. Daemon is registered on
+kdbus bus as a client under org.freedesktop.DBus name.  Only
+messages addressed to this interface are handled by daemon. Messages
+such as RequestName or AddMatch are translated by daemon to respective
+ioctl() calls, which send them through kdbus on behalf of original
+client process. The rest of messages would are going straight from
+origin to destination through kdbus.
+
+Simple install procedure:
+
+* download modified version of dbus from tizen.org repository
+  (kdbus-dev branch):
+
+  git clone git://review.tizen.org/platform/upstream/dbus.git -b kdbus-dev
+
+* change to dbus directory and build dbus-daemon with kdbus support:
+
+  ./configure --enable-kdbus-transport
+  make  make install
+
+* start of custom dbus-daemon supporting kdbus transport:
+
+  ./dbus-daemon --nofork --address=kdbus: 
--config-file=/etc/dbus-1/session.conf
+
+
+TESTS
+=
+
+* Build test binaries:
+
+  cd gio/tests
+  make
+
+* Set variable to use