From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Balloon device in qemu? Date: Sun, 03 Aug 2008 20:05:44 -0500 Message-ID: <489655E8.4070401@us.ibm.com> References: <4891B7C2.70800@qumranet.com> <20080801190654.GA24342@dmt.cnet> <4893685B.1080409@us.ibm.com> <20080802130123.GK27246@duo.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Avi Kivity , KVM list To: Andrea Arcangeli Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:53574 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751904AbYHDBGV (ORCPT ); Sun, 3 Aug 2008 21:06:21 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m7416InC028929 for ; Sun, 3 Aug 2008 21:06:18 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m7416I6L194826 for ; Sun, 3 Aug 2008 21:06:18 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m7416IC3009958 for ; Sun, 3 Aug 2008 21:06:18 -0400 In-Reply-To: <20080802130123.GK27246@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: Andrea Arcangeli wrote: > On Fri, Aug 01, 2008 at 02:47:39PM -0500, Anthony Liguori wrote: > >> Is there a way to detect MMU notifiers from userspace? I don't think it's >> currently safe to madvise unconditionally. >> > > There is no way to detect mmu notifiers from userspace (well strictly > speaking you could check /proc/kallsyms) but the point is that without > mmu notifiers madvise won't be enough (the memory may not be freed > without the other ioctl proposed by Marcelo that also flushes sptes). > Right. Ideally, I'd like to just disable the balloon device if mmu notifiers *and* kvm support for it are not present. If you're saying there is no way to probe for this now from userspace, then that's something we need to add. Regards, Anthony Liguori