Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753568Ab2B0N7d (ORCPT ); Mon, 27 Feb 2012 08:59:33 -0500 Received: from bhuna.collabora.co.uk ([93.93.135.160]:48603 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753460Ab2B0N7b (ORCPT ); Mon, 27 Feb 2012 08:59:31 -0500 Message-ID: <4F4B8C66.5060206@collabora.co.uk> Date: Mon, 27 Feb 2012 15:00:06 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: David Miller CC: javier@collabora.co.uk, eric.dumazet@gmail.com, lennart@poettering.net, kay.sievers@vrfy.org, alban.crequy@collabora.co.uk, bart.cerneels@collabora.co.uk, rodrigo.moya@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: <1329753455-1106-1-git-send-email-javier@collabora.co.uk> <20120224.153616.117399887784547022.davem@davemloft.net> In-Reply-To: <20120224.153616.117399887784547022.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2392 Lines: 63 On 02/24/2012 09:36 PM, David Miller wrote: > > My first impression is that I'm amazed at how much complicated new > code you have to add to support groups of receivers of AF_UNIX > messages. > > I can't see how this is better than doing multicast over ipv4 using > UDP or something like that, code which we have already and has been > tested for decades. > Primary for performance reasons. D-bus is an IPC system for processes in the same machine so traversing the whole TCP/IP stack seems a little overkill to me. We will try it though to have numbers on the actual overhead of using UDP multicast over IP instead of multicast Unix domain sockets. We also thought of using Netlink sockets since it already supports multicast and should be more lightweight than IP multicast. But even Netlink doesn't meet our needs since our multicast on Unix sockets implementation has different semantics needed for D-bus: - total order is guaranteed: If sender A sends a message before B, then receiver C and D should both get message A first and then B. - slow readers: dropping packets vs blocking the sender. Although datagrams are not reliable on IP, datagrams on Unix sockets are never lost. So if one receiver has its buffer full the sender is blocked instead of dropping packets. That way we guarantee a reliable communication channel. - multicast group acess control: controlling who can join the multicast group. - multicast on loopback is not supported: which means we have to use a NIC (i.e: eth0). > I really don't want to apply this stuff, it looks bloated, > complicated, and there is another avenue for doing what you want to > do. > We can work to reduce the implementation complexity and make it less bloated. Or you don't like the idea in general? > Applications have to change to support the new multicast facilities, > so they can equally be changed to use a real transport that already > supports multicasting. Yes, this is not about minimizing user-space application change but to improve the D-bus performance, or any other framework that relies on multicast communication on a single machine. Best regards, Javier -- 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/