Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbbD2WfB (ORCPT ); Wed, 29 Apr 2015 18:35:01 -0400 Received: from mailrelay.lanline.com ([216.187.10.16]:44679 "EHLO mailrelay.lanline.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbbD2We5 (ORCPT ); Wed, 29 Apr 2015 18:34:57 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21825.23658.384646.940837@quad.stoffel.home> Date: Wed, 29 Apr 2015 18:34:18 -0400 From: "John Stoffel" To: Austin S Hemmelgarn Cc: Andy Lutomirski , Harald Hoyer , Arnd Bergmann , Havoc Pennington , "linux-kernel\@vger.kernel.org" , Jiri Kosina , Andrew Morton , Daniel Mack , One Thousand Gnomes , Linus Torvalds , Lukasz Skalski , "Theodore Ts'o" , Tom Gundersen , Greg Kroah-Hartman , David Herrmann , "Eric W. Biederman" , John Stoffel , Djalal Harouni Subject: Re: [GIT PULL] kdbus for 4.1-rc1 In-Reply-To: <55413158.5060808@gmail.com> References: <20150423163616.GA10874@kroah.com> <20150423171640.GA11227@kroah.com> <553A4A2F.5090406@samsung.com> <20150428171840.GB11351@thunk.org> <21824.5086.446831.189915@quad.stoffel.home> <5540D2F9.2010704@redhat.com> <55413158.5060808@gmail.com> X-Mailer: VM 8.2.0b under 23.4.1 (x86_64-pc-linux-gnu) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1828 Lines: 42 >>>>> "Austin" == Austin S Hemmelgarn writes: Austin> On 2015-04-29 14:54, Andy Lutomirski wrote: >> On Apr 29, 2015 5:48 AM, "Harald Hoyer" wrote: >>> >>> * Being in the kernel closes a lot of races which can't be fixed with >>> the current userspace solutions. For example, with kdbus, there is a >>> way a client can disconnect from a bus, but do so only if no further >>> messages present in its queue, which is crucial for implementing >>> race-free "exit-on-idle" services >> >> This can be implemented in userspace. >> >> Client to dbus daemon: may I exit now? >> Dbus daemon to client: yes (and no more messages) or no >> Austin> Depending on how this is implemented, there would be a Austin> potential issue if a message arrived for the client after the Austin> daemon told it it could exit, but before it finished shutdown, Austin> in which case the message might get lost. What makes anyone think they can guarrantee that a message is even received? I could see the daemon sending the message and the client getting a segfault and dumping core. What then? How would kdbus solve this type of "race" anyway? Can anyone give a concrete example of one of the races that are closed here? That's been one of the missing examples. And remember, there's no perfection. Even in the kernel we just had a discussion about missed/missing IPIs and lost processor interrupts, etc. Expecting perfection is just asking for trouble. That's why there are timeouts, retries and just giving up and throwing an exception. John -- 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/