From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Jwr-0003UX-FG for qemu-devel@nongnu.org; Fri, 01 Feb 2013 11:58:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1Jwg-0003l6-On for qemu-devel@nongnu.org; Fri, 01 Feb 2013 11:58:45 -0500 Received: from mail-ea0-f178.google.com ([209.85.215.178]:42776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Jwg-0003l0-IM for qemu-devel@nongnu.org; Fri, 01 Feb 2013 11:58:34 -0500 Received: by mail-ea0-f178.google.com with SMTP id a14so1869241eaa.37 for ; Fri, 01 Feb 2013 08:58:33 -0800 (PST) Sender: Paolo Bonzini Message-ID: <510BF434.1010308@redhat.com> Date: Fri, 01 Feb 2013 17:58:28 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <510A15DC.3070706@dlhnet.de> <510A218C.2000903@redhat.com> <20130131094809.GO15004@redhat.com> In-Reply-To: <20130131094809.GO15004@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC migration of zero pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: Orit Wasserman , Peter Lieven , "qemu-devel@nongnu.org" Il 31/01/2013 10:48, Gleb Natapov ha scritto: >> Also I notice that the bottle neck in migrating unmapped pages is the detection of those pages >> because we map the pages in order to check them, for a large guest this is very expensive as mapping a page >> results in a page fault in the host. >> So what will be very helpful is actually locating those pages without mapping them >> which looks very complicated. >> > What is wrong with mincore()? As Avi said, it returns false if the memory is in swap. Note that while we do take a page fault, the recent kernel patch to introduce a huge zero page might have reduced the cost in terms of both clear_page and cache misses. Paolo