From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afot5-0005i2-9I for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afot2-0000Tq-4K for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:19:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afot1-0000TZ-VU for qemu-devel@nongnu.org; Tue, 15 Mar 2016 09:19:48 -0400 Date: Tue, 15 Mar 2016 15:19:43 +0200 From: "Michael S. Tsirkin" Message-ID: <20160315151719-mutt-send-email-mst@redhat.com> References: <1457974531-8768-1-git-send-email-minyard@acm.org> <20160315085654-mutt-send-email-mst@redhat.com> <1458025488.13231.20.camel@redhat.com> <20160315091411-mutt-send-email-mst@redhat.com> <1458027249.13231.27.camel@redhat.com> <20160315093529-mutt-send-email-mst@redhat.com> <1458031522.13231.39.camel@redhat.com> <20160315113016-mutt-send-email-mst@redhat.com> <1458047027.13231.46.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458047027.13231.46.camel@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] Sort the fw_cfg file list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Paolo Bonzini , qemu-devel@nongnu.org, minyard@acm.org, Corey Minyard On Tue, Mar 15, 2016 at 02:03:47PM +0100, Gerd Hoffmann wrote: > Hi, > > > So here is what I propose instead: > > > > - always initialize it late > > - sort late, a machine done, not when inserting entries > > - figure out what the order of existing entries is currently, > > and fill an array listing them in this order. > > for old machine types, insert the existing entries > > in this specific order by using a sorting function: > > What is the point of using *two* ways to sort entries? > > Sure, we can explicitly write down the current order of fw_cfg entries > and use that to sort them, so order stays as-is even if the > initialization order changes. But when going that route I would do that > *instead* of the alphabetical ordering, for all machine types. > > cheers, > Gerd That's fine too. The only question is for when we add new fw cfg entries: do you want to add these to the list as well? Sorting new entries after old ones will help avoid future maintainance for this list: we set it once and never change it. -- MST