From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756574Ab2CAT2Z (ORCPT ); Thu, 1 Mar 2012 14:28:25 -0500 Received: from bhuna.collabora.co.uk ([93.93.135.160]:53221 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528Ab2CAT2U (ORCPT ); Thu, 1 Mar 2012 14:28:20 -0500 Message-ID: <4F4FCE00.6060302@collabora.co.uk> Date: Thu, 01 Mar 2012 20:29:04 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Javier Martinez Canillas CC: Eric Dumazet , Luiz Augusto von Dentz , Rodrigo Moya , David Laight , David Miller , javier@collabora.co.uk, lennart@poettering.net, kay.sievers@vrfy.org, alban.crequy@collabora.co.uk, bart.cerneels@collabora.co.uk, sjoerd.simons@collabora.co.uk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/10] af_unix: add multicast and filtering features to AF_UNIX References: <1330606237.27405.5.camel@megeve> <1330606775.2465.56.camel@edumazet-laptop> <4F4F7FFB.6010608@collabora.co.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01/2012 08:02 PM, Javier Martinez Canillas wrote: > On Thu, Mar 1, 2012 at 6:59 PM, Eric Dumazet wrote: >> Le 1 mars 2012 08:02, Luiz Augusto von Dentz a écrit : >>> >>> Contrary to someones believes I don't think AF_INET is that fast (e.g. >>> http://scottmoonen.com/2008/04/05/a-performance-comparison-of-af_unix-with-loopback-on-linux/) >>> >> >> Oh you mention a recent zork it seems ;) >> >> Are we speaking of performance problems, apart from scheduler problems >> for D-Bus (each message wakeing all receivers, all receivers read and >> drop message but the target) ? >> > > Hi Eric, > > The only performance problem we are talking about is the scheduling > for D-bus (context switch to the daemon for each message). With today > implementation the receivers only gets messages that were sent to it > but the D-bus daemon has to be wake it up for every message to he can > do the routing. For multicast messages (i.e: D-bus signals) this is > even worse since the daemon has to do a send() for each receiver. > >> I am actually one of the few people working to improve performance on >> both AF_INET and AF_UNIX parts. Just take a look at recent commits. >> >> Right now you can send/receive millions of udp messages per second on >> your linux machine, if you figured out how to avoid process scheduler >> costs. If D-Bus wants more, I highly suggest using shared memory >> instead of passing messages. >> -- > > Yes, I also thought that AF_UNIX would be more efficient than AF_INET > but I was wrong. Yesterday I wrote some tests using our multicast unix > socket, UDP multicast over IP on a single machine and even multicast > using AF_NETLINK sockets and got very similar performance results. > > The only problem is the ordering and control flow requirements for D-bus. > And the fd passing for out-ouf-band communication used for some D-bus application such as oFono and BlueZ. Regards, Javier