Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754632AbdC1IJM convert rfc822-to-8bit (ORCPT ); Tue, 28 Mar 2017 04:09:12 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:50658 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754568AbdC1IJJ (ORCPT ); Tue, 28 Mar 2017 04:09:09 -0400 Message-Id: <58DA361E0200007800148E16@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Tue, 28 Mar 2017 02:08:30 -0600 From: "Jan Beulich" To: "Dan Streetman" , "Boris Ostrovsky" Cc: , "Juergen Gross" , Subject: Re: [Xen-devel] maybe revert commit c275a57f5ec3 "xen/balloon: Set balloon's initial state to number of existing RAM pages" References: <0628e2af-f7e7-056a-82ec-68860f9c4f29@oracle.com> <20170324211016.GG9755@char.us.oracle.com> <9b134234-5b38-c325-b3c2-f37b4c45c2cf@oracle.com> In-Reply-To: <9b134234-5b38-c325-b3c2-f37b4c45c2cf@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 27 >>> On 28.03.17 at 03:57, wrote: > I think there is indeed a disconnect between target memory (provided by > the toolstack) and current memory (i.e actual pages available to the guest). > > For example > > [ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] > reserved > [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] > reserved > > are missed in target calculation. The hvmloader marks them as RESERVED > (in build_e820_table()) but target value is not aware of this action. > > And then the same problem repeats when kernel removes > 0x000a0000-0x000fffff chunk. But this is all in-guest behavior, i.e. nothing an entity outside the guest (tool stack or hypervisor) should need to be aware of. That said, there is still room for improvement in the tools I think: Regions which architecturally aren't RAM (namely the 0xa0000-0xfffff range) would probably better not be accounted for as RAM as far as ballooning is concerned. In the hypervisor, otoh, all memory assigned to the guest (i.e. including such backing ROMs) needs to be accounted. Jan