[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Balloon driver bug in increase_reservation



On Wed, Sep 04, 2013 at 12:35:27PM -0400, Konrad Rzeszutek Wilk wrote:
> 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.
> 

There is already a mutex, I think that's good enough.

I will spin a patch with this check.

Wei.

> > 
> > Wei.
> > 
> > > > 
> > > > Wei.
> > > > 
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@xxxxxxxxxxxxx
> > > > http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.