Received: from eggs.gnu.org ([2001:4830:134:3::10]:47392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWkll-00069E-L4 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 08:34:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWkli-0005Pq-3J for qemu-devel@nongnu.org; Tue, 01 Sep 2015 08:34:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWklh-0005PG-V2 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 08:34:30 -0400 Date: Tue, 1 Sep 2015 14:34:26 +0200 From: Kevin Wolf Message-ID: <20150901123425.GE4304@noname.redhat.com> References: <8737z7o85i.fsf@blackfin.pond.sub.org> <441C227A-2CF0-43AE-AC7F-B066708CEABD@gmail.com> <87fv36j9j6.fsf@blackfin.pond.sub.org> <20150826172550.GJ11016@localhost.localdomain> <20150826180815.GK11016@localhost.localdomain> <20150826220151.GA2669@localhost.localdomain> <2CB0CE30-A638-4933-A1D6-F65CA4910E61@gmail.com> <20150827123234.GB2669@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150827123234.GB2669@localhost.localdomain> Subject: Re: [Qemu-devel] Should we auto-generate IDs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: Markus Armbruster , qemu-devel qemu-devel , Programmingkid , Paolo Bonzini , jsnow@redhat.com, Andreas =?iso-8859-1?Q?F=E4rber?= Am 27.08.2015 um 14:32 hat Jeff Cody geschrieben: > I'm not married to the ID generation scheme I proposed. > > What I am trying to do, however, is have a technical discussion on > generating an ID in a well-formed manner. And hopefully, in a way > that is useful to all interested subsystems, if possible. > > Do you disagree with the requirements I listed above? If so, it would > be useful to begin the discussion around that. For ease of > discussion, I'll list them again: > > * Reserved namespaces > * Uniqueness > * Non-predictable (to avoid inadvertently creating a de facto ABI) > > > . . . > > On the generation scheme proposed above: > > I understand that something you desire is an ID that is easier to > type. > > If we wanted to make it shorter, perhaps we could have the number > counter be variable length: > > qemu#ss#D#XY > | | | | > qemu reserved - | | | > | | | > subsystem name ---| | | > | | > counter --------| | > | > 2-digit random ---| Even with keeping all of the information in there we can shorten the ID a bit more: # at the start is enough to mark it as autogenerated, the subsystem seems nice to have in there anyway, and the # separators can be removed without making the ID less unique (assuming that subsystems never end in a digit). This results in an ID that looks like a three (or more) digit number for the subsystem, where the last two digits are random, like this: #block150 #block219 #block344 ... That seems easy to type and still fulfills all of the criteria. Kevin