From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8EqM-0006vy-Eb for qemu-devel@nongnu.org; Wed, 11 Nov 2009 10:10:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8EqH-0006sp-Gp for qemu-devel@nongnu.org; Wed, 11 Nov 2009 10:10:45 -0500 Received: from [199.232.76.173] (port=43140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8EqH-0006sk-A4 for qemu-devel@nongnu.org; Wed, 11 Nov 2009 10:10:41 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:38384) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8EqG-0002BQ-Q6 for qemu-devel@nongnu.org; Wed, 11 Nov 2009 10:10:41 -0500 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e8.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nABB6kVu026721 for ; Wed, 11 Nov 2009 06:06:46 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nABFAaUY042040 for ; Wed, 11 Nov 2009 10:10:36 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nABF8h9j006045 for ; Wed, 11 Nov 2009 10:08:45 -0500 From: Adam Litke In-Reply-To: <200911111313.24226.rusty@rustcorp.com.au> References: <1257782838.2835.5.camel@aglitke> <200911111032.14956.rusty@rustcorp.com.au> <4AFA005C.7020607@us.ibm.com> <200911111313.24226.rusty@rustcorp.com.au> Content-Type: text/plain; charset="UTF-8" Date: Wed, 11 Nov 2009 09:08:34 -0600 Message-ID: <1257952114.2876.29.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: Anthony Liguori , agl@linux.vnet.ibm.com, qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Avi Kivity On Wed, 2009-11-11 at 13:13 +1030, Rusty Russell wrote: > > It's not laziness, it's consistency. How is actual different than free > > memory or any other stat? > > Because it's a COLLECTION of stats. For example, swap in should be < swap > out. Now, the current Linux implementation of all_vm_events() is non-atomic > anyway, so maybe we can just document this as best-effort. I'm saying that > if it *is* a problem, I think we need a vq. I can't see why we would care about the atomicity of the collection of statistics. Best-effort is good enough. Any variance within the stats will be overshadowed by the latency of the host-side management daemon. > But it raises the question: what stats are generally useful cross-OS? Should > we be supplying numbers like "unused" (free) "instantly discardable" (ie. > clean), "discardable to disk" (ie. file-backed), "discardable to swap" > (ie. swap-backed) and "unswappable" instead? While I see the virtue in presenting abstracted memory stats that seem more digestible in a virtualization context, I think we should keep the raw stats. This concentrates the complexity in the host-side management daemon, and allows the host daemon to make better decisions (ie. by reacting to trends in individual statistics). Different OSes (or different versions of the same OS), may also have different sets of statistics that will provide the answers that a management daemon needs. -- Thanks, Adam