From: Wei Liu Subject: Re: Balloon driver bug in increase_reservation Date: Wed, 4 Sep 2013 16:42:16 +0100 Message-ID: <20130904154216.GR14104@zion.uk.xensource.com> References: <20130902144333.GA14104@zion.uk.xensource.com> <1378133323.7651.39.camel@kazak.uk.xensource.com> <20130902150432.GB14104@zion.uk.xensource.com> <1378134566.7651.40.camel@kazak.uk.xensource.com> <20130902151328.GC14104@zion.uk.xensource.com> <1378135882.7651.46.camel@kazak.uk.xensource.com> <20130904132010.GP14104@zion.uk.xensource.com> <20130904151430.GI3188@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130904151430.GI3188@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: david.vrabel@citrix.com, xen-devel@lists.xen.org, Wei Liu , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, Sep 04, 2013 at 11:14:30AM -0400, Konrad Rzeszutek Wilk wrote: [...] > > > > > > Otherwise could simply implement a is_balloon_scratch_page function that > > > checks whether a given pfn corresponds to any of the scratch pages (it > > > doesn't need to be the scratch page of this cpu). > > > > That's quite expensive IMHO, especially when you have lots of CPU's and > > lots of ballooned pages. > > Fortunatly you don't have to take lock. The PFNs for the scratch pages are > set in stone for each vCPU and don't change (unless the CPU goes down, but > then the 'for_each_online_cpu' would omit said CPU). > > And I think the balloon driver does everything from one workqueue so > the check can done there? Well, what are the chances that you have 256 CPUs and then need to balloon 2K pages (only 8MB)... andd what's the frequency you need to do that... Maybe I'm just paranoid to imagine all those extreme use cases. Wei. > > > > Wei. > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel