From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication Date: Mon, 10 Aug 2009 19:16:48 -0500 Message-ID: <4A80B870.9080907@codemonkey.ws> References: <20090805175713.GB28738@shareable.org> <20090810065508.GA4499@amit-x200.redhat.com> <4A7FECCA.8080804@redhat.com> <200908110839.28901.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gerd Hoffmann , Amit Shah , kvm@vger.kernel.org, qemu-devel@nongnu.org, "Richard W.M. Jones" , virtualization@lists.linux-foundation.org To: Rusty Russell Return-path: Received: from mail-qy0-f196.google.com ([209.85.221.196]:41930 "EHLO mail-qy0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbZHKAQu (ORCPT ); Mon, 10 Aug 2009 20:16:50 -0400 Received: by qyk34 with SMTP id 34so2970011qyk.33 for ; Mon, 10 Aug 2009 17:16:50 -0700 (PDT) In-Reply-To: <200908110839.28901.rusty@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: Rusty Russell wrote: > On Mon, 10 Aug 2009 07:17:54 pm Gerd Hoffmann wrote: > >> On 08/10/09 08:55, Amit Shah wrote: >> >>>> Bad example. Quite a lot of modern devices drivers are using dynamic >>>> major/minor numbers because they have proven to be such a pain in the >>>> butt. That's why we have more sophisticated mechanisms like udev for >>>> userspace to make use of. >>>> >>> Let me explain how we came to this numbering: we first had support for >>> 'naming' ports and the names were obtained by userspace programs by an >>> ioctl. Rusty suggested to use some numbering scheme where some ports >>> could exist at predefined locations so that we wouldn't need the naming >>> and the ioctls around it. >>> >> I think the naming is very important. >> > > I disagree. If you can hand out names, you can hand out numbers. The problem with handing out names is that there has to be someone to "hand" things out. And even if you have a good hander-outer, development is difficult in a distributed environment because you may have folks using your code before you've gotten an official hand-out. A better discovery mechanism is based on something that piggy backs on another authority. For instance, reverse fully qualified domains work well. uuid's tend to work pretty well too although it's not perfect. In general, even just open strings can work out okay given that people are responsible in how they name things. Regards, Anthony Liguori