Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkR5K-0003uV-Fj for qemu-devel@nongnu.org; Wed, 24 Feb 2010 18:56:06 -0500 Received: from [199.232.76.173] (port=60922 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkR5K-0003uJ-5N for qemu-devel@nongnu.org; Wed, 24 Feb 2010 18:56:06 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkR5I-0002wX-NY for qemu-devel@nongnu.org; Wed, 24 Feb 2010 18:56:05 -0500 Received: from toccata.ens-lyon.fr ([140.77.166.68]:45957 helo=toccata.ens-lyon.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NkR5I-0002wL-8Z for qemu-devel@nongnu.org; Wed, 24 Feb 2010 18:56:04 -0500 Date: Thu, 25 Feb 2010 00:56:01 +0100 From: Samuel Thibault Subject: Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset Message-ID: <20100224235601.GC15396@const.homenet.telecomitalia.it> References: <1267038612-21581-1-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1267038612-21581-1-git-send-email-aliguori@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Hello, I just want to note the fact that although Linux got it badly wrong, according to POSIX, MADV_DONTNEED is _not_ supposed to drop the content of the memory, but just to tune the write-back heuristics and such. (see glibc's ./sysdeps/unix/sysv/linux/posix_madvise.c if you're not convinced) qemu should probably try to use MADV_REMOVE (proper linux variant) or MADV_FREE (solaris variant). Samuel