From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6RNW-0002Fp-Oe for qemu-devel@nongnu.org; Fri, 06 Nov 2009 11:09:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6RNS-0002Ak-0f for qemu-devel@nongnu.org; Fri, 06 Nov 2009 11:09:34 -0500 Received: from [199.232.76.173] (port=58491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6RNR-0002Ag-JD for qemu-devel@nongnu.org; Fri, 06 Nov 2009 11:09:29 -0500 Received: from e4.ny.us.ibm.com ([32.97.182.144]:34176) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N6RNR-0007tF-5l for qemu-devel@nongnu.org; Fri, 06 Nov 2009 11:09:29 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e4.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nA6G1K24029337 for ; Fri, 6 Nov 2009 11:01:20 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nA6G9REK116532 for ; Fri, 6 Nov 2009 11:09:27 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nA6G9QYF022996 for ; Fri, 6 Nov 2009 11:09:27 -0500 Message-ID: <4AF44A33.6010602@us.ibm.com> Date: Fri, 06 Nov 2009 10:09:23 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/4] net-bridge: rootless bridge support for qemu References: <1257294485-27015-1-git-send-email-aliguori@us.ibm.com> <20091105163702.GC21630@shareable.org> <4AF30129.7080203@us.ibm.com> <200911051820.48878.arnd@arndb.de> <4AF3154F.8090901@redhat.com> <4AF36DE9.3040803@us.ibm.com> <4AF3CF8C.1030408@redhat.com> In-Reply-To: <4AF3CF8C.1030408@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Mark McLoughlin , Arnd Bergmann , agl@linux.vnet.ibm.com, Arnd Bergmann , Juan Quintela , Dustin Kirkland , qemu-devel@nongnu.org, Michael Tsirkin Avi Kivity wrote: > On 11/06/2009 02:29 AM, Anthony Liguori wrote: >>> Helpers are really bad. On launch, I find the fragile and hard to >>> do proper error handling with (but that's probably just me). But >>> the real problem is at runtime, if you have a 16GB guest then you >>> have to write-protect 4M ptes and then kvm has to tear down or write >>> protect (not sure which mmu notifier is called) 4M shadow ptes. >>> Once that's done, the guest will have to fault its way back; that's >>> at least 4M exits, around 10 seconds worth of cpu time to execute a >>> couple of syscalls. >> >> >> FWIW, with large pages, it's only 8k exits which comes out to about >> 16ms. If nothing else, it's an argument for the important of >> transparent large pages. >> > > No, it's an argument against fork() of large programs. After putting together a work around, I'm starting to have my doubts about how real of a problem this is. You're only write protecting memory, correct? So it's equivalent to enabling dirty tracking during live migration. In my mind, if the cost associated with hot plug is a fraction of the cost of live migration, we're in good shape. It's not likely that a 16GB guest is going to write-fault in it's entirely memory range immediately. In fact, it's likely to be amortized over a very long period of time so I have a hard time believing this is really an issue in practice. Arguably, it's a much bigger problem for live migration. -- Regards, Anthony Liguori