From: Kevin Wolf <kwolf@redhat.com>
To: Programmingkid <programmingkidx@gmail.com>
Cc: "Jeff Cody" <jcody@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"qemu-devel qemu-devel" <qemu-devel@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
jsnow@redhat.com, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] Should we auto-generate IDs?
Date: Tue, 1 Sep 2015 16:43:32 +0200 [thread overview]
Message-ID: <20150901144332.GG4304@noname.redhat.com> (raw)
In-Reply-To: <EA9D7192-BDE4-4CEA-8B1C-B7E46FDC72E7@gmail.com>
Am 01.09.2015 um 16:18 hat Programmingkid geschrieben:
>
> On Sep 1, 2015, at 8:34 AM, Kevin Wolf wrote:
>
> > 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
>
> I do know that some really want an indicator that shows that an ID is auto-generated. But we could still do this and keep the ID short. What if the auto-generated ID just started with a character the user could never use at the beginning of the ID. I suggest we use an underscore to indicate machine-generated ID's. Something like this _1. It is very simple and effective.
That's what I already did. # is a reserved character. I don't think
something like #block150 is unreasonably long, it's a bit more
descriptive than _1, and it fulfills all of Jeff's criteria, which _1
clearly doesn't.
Kevin
next prev parent reply other threads:[~2015-09-01 14:43 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 18:53 [Qemu-devel] [PATCH] qdev-monitor.c: Add device id generation Programmingkid
2015-08-24 22:21 ` Eric Blake
2015-08-25 12:42 ` Markus Armbruster
2015-08-25 15:25 ` Programmingkid
2015-08-25 15:33 ` Peter Maydell
2015-08-25 15:50 ` Programmingkid
2015-08-25 18:30 ` Markus Armbruster
2015-08-25 19:05 ` Programmingkid
2015-08-25 14:33 ` Programmingkid
2015-08-25 12:38 ` [Qemu-devel] Should we auto-generate IDs? (was: [PATCH] qdev-monitor.c: Add device id generation) Markus Armbruster
2015-08-25 15:15 ` Programmingkid
2015-08-26 14:52 ` Programmingkid
2015-08-26 16:31 ` [Qemu-devel] Should we auto-generate IDs? Markus Armbruster
2015-08-26 17:16 ` Programmingkid
2015-08-26 18:45 ` Peter Maydell
2015-08-26 21:48 ` Programmingkid
2015-08-26 22:08 ` John Snow
2015-08-27 3:40 ` Programmingkid
2015-08-27 5:39 ` Markus Armbruster
2015-08-27 15:39 ` Programmingkid
2015-08-26 17:25 ` Jeff Cody
2015-08-26 17:29 ` Programmingkid
2015-08-26 18:08 ` Jeff Cody
2015-08-26 18:17 ` Programmingkid
2015-08-26 22:01 ` Jeff Cody
2015-08-26 22:04 ` John Snow
2015-08-27 3:26 ` Programmingkid
2015-08-27 3:22 ` Programmingkid
2015-08-27 12:32 ` Jeff Cody
2015-08-27 13:00 ` Eric Blake
2015-08-27 13:39 ` Programmingkid
2015-08-27 13:51 ` Daniel P. Berrange
2015-08-27 14:01 ` Eric Blake
2015-08-27 14:18 ` Jeff Cody
2015-08-27 14:19 ` Programmingkid
2015-08-27 14:01 ` Programmingkid
2015-08-27 18:59 ` John Snow
2015-08-27 19:20 ` Eric Blake
2015-08-27 13:33 ` Programmingkid
2015-08-27 13:49 ` Daniel P. Berrange
2015-08-27 13:56 ` Programmingkid
2015-08-27 14:02 ` Eric Blake
2015-08-27 14:34 ` Programmingkid
2015-08-27 14:42 ` Daniel P. Berrange
2015-08-27 15:20 ` Programmingkid
2015-08-27 15:40 ` Jeff Cody
2015-08-27 15:58 ` Programmingkid
2015-08-27 16:02 ` Daniel P. Berrange
2015-08-27 16:08 ` Programmingkid
2015-08-27 16:22 ` Daniel P. Berrange
2015-08-27 16:49 ` Programmingkid
2015-08-27 20:15 ` Programmingkid
2015-08-27 19:08 ` Jeff Cody
2015-08-27 19:27 ` Eric Blake
2015-08-27 20:37 ` Jeff Cody
2015-08-27 14:06 ` Daniel P. Berrange
2015-08-27 14:54 ` Programmingkid
2015-08-27 14:07 ` Jeff Cody
2015-08-27 15:13 ` Programmingkid
2015-08-27 15:19 ` Daniel P. Berrange
2015-08-27 15:22 ` Programmingkid
2015-08-27 15:55 ` Daniel P. Berrange
2015-08-27 16:03 ` Programmingkid
2015-08-27 16:06 ` Daniel P. Berrange
2015-08-27 16:08 ` Eric Blake
2015-09-01 12:34 ` Kevin Wolf
2015-09-01 14:18 ` Programmingkid
2015-09-01 14:43 ` Kevin Wolf [this message]
2015-09-01 15:55 ` Programmingkid
2015-09-03 14:34 ` Programmingkid
2015-09-03 14:43 ` Jeff Cody
2015-09-03 15:55 ` Programmingkid
2015-09-03 16:12 ` [Qemu-devel] [PATCH v3] qdev-monitor.c: Add device id generation Programmingkid
2015-08-26 17:28 ` [Qemu-devel] Should we auto-generate IDs? (was: [PATCH] qdev-monitor.c: Add device id generation) Daniel P. Berrange
2015-08-26 17:46 ` Programmingkid
2015-08-26 17:53 ` Daniel P. Berrange
2015-08-26 18:01 ` Programmingkid
2015-08-27 13:54 ` Daniel P. Berrange
2015-08-27 14:03 ` Programmingkid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150901144332.GG4304@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=pbonzini@redhat.com \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).