From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHq9m-0002Ye-NJ for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHq9f-0004nJ-LK for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:22:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:1691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHq9f-0004n9-FE for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:22:07 -0400 Date: Tue, 28 Jun 2016 18:10:51 +0800 From: Chao Peng Message-ID: <20160628101051.GK21465@pengc-linux.bj.intel.com> Reply-To: Chao Peng References: <1466151257-96318-1-git-send-email-chao.p.peng@linux.intel.com> <20160619035104.GA13650@redhat.com> <20160620061217.GF21465@pengc-linux.bj.intel.com> <20160623125506.GO17868@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160623125506.GO17868@redhat.com> Subject: Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: "Michael S. Tsirkin" , Haozhong Zhang , Xiao Guangrong , Eduardo Habkost , qemu-devel@nongnu.org, Paolo Bonzini , gor Mammedov , Richard Henderson On Thu, Jun 23, 2016 at 01:55:06PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 20, 2016 at 02:12:17PM +0800, Chao Peng wrote: > > On Sun, Jun 19, 2016 at 06:51:04AM +0300, Michael S. Tsirkin wrote: > > > On Fri, Jun 17, 2016 at 04:14:08AM -0400, Chao Peng wrote: > > > > - it is FAST; > > > > > > Any numbers to demonstrate just how fast it is and fast at what? > > > > On a 2.30GHz Haswell server, guest kernel booting time is 59.9ms by > > following test steps listed at > > > > https://github.com/chao-p/qemu-lite-tools > > > > Ran the same test with "-machine q35", the guest kernel booting > > time is 129.8ms. There is additional 75ms in SeaBIOS for Q35 case. > > I think it'd be useful / interesting to understand why we have saved > this time vs Q35. I'm not a huge fan of the idea of defining an > arbitrarily cut down machine type, because inevitably one applications > view of what is the "bare minimum required functionality" will be > different from another applications' view. > > It seems to me that whether some features emulated by QEMU are slow > or not should only matter if the guest OS actually tries to use those > features. IOW, could we achieve the same speed up in boot time, by > making Linux more configurable at runtime. eg so with a single Linux > kernel binary and standard Q35/PIIX machine type, we can disable > slow functionality by just giving Linux suitable kernel command > line arguments. I totally agree with you. And our goal is reducing boot time so I don't mind using existing code to achieve this goal. When I looked into this. I have thought there might be a minimal platform with which I can add other stuff on demand, or a full functional platform that allow me to disable unnecessary functionalities. But in practice I can't get a system that exactly fit for me, regardless there is lots of configuration methods in both QEMU/BIOS/kernel. Taking kernel time overhead with Q35 here for example. The most time saving comes from PCI initialization. New pc-lite platform supports only 1 bus so guest don't need to scan all the possible buses which save ~60ms. Another time saving place is new pc-lite platform removed SMBUS/SATA/LPC bridges that Q35 creates by default. Initialization for these devices costs ~20ms. The problem is not all these functionalities can be disabled either in kernel or in QEMU, so in the end, turns out to introduce a new one. Thanks, Chao