From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCTUV-0001e7-9s for qemu-devel@nongnu.org; Mon, 13 Jun 2016 11:09:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCTUS-0007I8-10 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 11:09:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCTUR-0007Gv-Ov for qemu-devel@nongnu.org; Mon, 13 Jun 2016 11:09:23 -0400 Date: Mon, 13 Jun 2016 16:09:17 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20160613150917.GC2281@work-vm> References: <1465813009-21390-1-git-send-email-liang.z.li@intel.com> <1465813009-21390-4-git-send-email-liang.z.li@intel.com> <20160613105008.GJ18794@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [QEMU 3/7] Add the hmp and qmp interface for dropping cache List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Li, Liang Z" Cc: "Daniel P. Berrange" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "quintela@redhat.com" , "mst@redhat.com" , "lcapitulino@redhat.com" , "amit.shah@redhat.com" , "pbonzini@redhat.com" * Li, Liang Z (liang.z.li@intel.com) wrote: > > Because writing to this file is a nondestructive operation and dirty objects are > > not freeable, the user should run sync(1) first. > > [/quote] > > > > IOW, by 'slab' you mean dentries and inodes ? > > > Yes. > > > > +## > > > +{ 'command': 'balloon_drop_cache', 'data': {'value': 'DropCacheType'} > > > +} > > > > Also, as noted in the man page quote above, it is recommended to call > > sync() to minimise dirty pages. Should we have a way to request a sync as > > part of this monitor command. > > > > More generally, it feels like this is taking as down a path towards actively > > managing the guest kernel VM from the host. Is this really a path we want to > > be going down, given that its going to take us into increasing non-portable > > concepts which are potentially different for each guest OS kernel. Is this > > drop caches feature at all applicable to Windows, OS-X, *BSD guest OS impls > > of the balloon driver ? If it is applicable, are the 3 fixed constants you've > > No. > > > defined at all useful to those other OS ? > > > > Maybe they are not. > I agree that there are too Linux specific. And I did more than needed. > Actually, I just want to drop the clean cache, do more than that is too heavy > and no good for performance. > > > I'm warying of us taking a design path which is so Linux specific it isn't useful > > elsewhere. IOW, just because we can do this, doesn't mean we should do > > this... > > > > Agree. I can see an argument for giving the guest a hint about what's going on and letting the guest decide what it's going to do - so telling the guest that a migration is happening and you'd like it to make the hosts life easy seems reasonable and it doesn't make any guest OS assumptions. Dave > > Thanks! > > Liang > > Regards, > > Daniel > > -- > > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > > |: http://libvirt.org -o- http://virt-manager.org :| > > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK