From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Balloon driver bug in increase_reservation Date: Wed, 4 Sep 2013 12:35:27 -0400 Message-ID: <20130904163527.GD6188@phenom.dumpdata.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> <20130904154216.GR14104@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130904154216.GR14104@zion.uk.xensource.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: Wei Liu Cc: david.vrabel@citrix.com, xen-devel@lists.xen.org, Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, Sep 04, 2013 at 04:42:16PM +0100, Wei Liu wrote: > 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. Fortunatly it is a slow process. It does not have to happen immediately so we can also take a lock if need to. Just as long as the lock is not taken in the M2P or P2M code I think we are fine. > > Wei. > > > > > > > Wei. > > > > > > _______________________________________________ > > > Xen-devel mailing list > > > Xen-devel@lists.xen.org > > > http://lists.xen.org/xen-devel