From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53306 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaXgt-0000td-EP for qemu-devel@nongnu.org; Wed, 05 Jan 2011 13:02:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaXgs-0003jt-3u for qemu-devel@nongnu.org; Wed, 05 Jan 2011 13:02:31 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:47790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaXgs-0003iq-1M for qemu-devel@nongnu.org; Wed, 05 Jan 2011 13:02:30 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p05HrPuu017853 for ; Wed, 5 Jan 2011 12:53:45 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id F1ADF4DE8042 for ; Wed, 5 Jan 2011 12:59:35 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p05I2NXI962602 for ; Wed, 5 Jan 2011 13:02:24 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p05I2N1B009600 for ; Wed, 5 Jan 2011 13:02:23 -0500 Message-ID: <4D24B22C.4010302@linux.vnet.ibm.com> Date: Wed, 05 Jan 2011 12:02:20 -0600 From: Michael Roth MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] add MADV_DONTFORK to guest physical memory References: <20100915170824.GL5981@random.random> <20110105151012.GC15823@random.random> In-Reply-To: <20110105151012.GC15823@random.random> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: Blue Swirl , =?ISO-8859-1?Q?Andreas_F=E4rber?= , Anthony Liguori , "qemu-devel@nongnu.org Developers" On 01/05/2011 09:10 AM, Andrea Arcangeli wrote: > The bug is still there so I rediffed the old patch against current > code. > > On a related topic: could somebody give me advice on how to implement > a command line (command line seems enough, the other option would be > monitor command) to make the MADV_MERGEABLE conditional? I got KSM on > THP working fine but KSM may decrease performance by increasing the > number of copy on write and by splitting hugepages, so we'd like to be > able to turn off KSM on a per-VM basis (not on the whole host, which > of course we already can by setting /sys/kernel/mm/ksm/run to 0) so > that high perf VMs will keep running at maximum speed with KSM off but > others may still benefit from KSM. For that I need to make the below > MADV_MERGEABLE madvise conditional to something and the code itself > will be trivial, we've just to converge on a command line option > (hopefully quickly ;). There was a -mem_prealloc option added a while back to set MAP_POPULATE on memory mapped in via the -mem-path option. So an analogous -mem_nomerge option or something along that line seems reasonable for conditionally unsetting QEMU_MADV_MERGEABLE. And for consistency you should probably make both your proposed changes for -mem-path'd memory as well.