Port-xen archive

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

Re: locked hotplug scripts



On Wed, Mar 30, 2016 at 12:52:41PM +0200, Christoph Badura wrote:
> On Wed, Mar 30, 2016 at 11:23:52AM +0200, Manuel Bouyer wrote:
> > > I think you don't need to lock at all when unconfiguring (case 6).
> > > In the 2) case, I think you only need locking in the file) case.
> > > The xenstore-write probably can be done unlocked.
> > 
> > I've installed the attached script on my test server. This is the dom0
> > doing nightly anita xen runs, so we should have several domains
> > creation/shutdown per day, with 2 file-backed virtual disks.
> 
> I appreciate the effort.  But I would like to see the tests done with
> more concurrency in the vnd allocation.  Could you add more file-backed
> virtual disks to the domUs?  They can be small.  And if you are using
> xl to create the domUs you can re-use a single file.

I did run an anita with 4 extra file-backed devices, without problems.

> 
> Also, for testing the locking implementation it is better to claim the
> locks longer so that we have more contention for the lock.

I could add a sleep 1 in the script. Will do so in the next
anita run (hoping that xl won't timeout then :)

> 
> I've done my tests with 4, 5, and 10 virtual disks.  In part to check
> that the problems in port-xen/50659 have gone away.

Even with 5 disks, I've never been able to reproduce port-xen/50659
on my system. 

> 
> I also did tests with a faster version of our "block" hotplug script, if
> you're up for more tests.  Not adapted to your locking scheme yet.
> 
> Personally I think doing the locking as close as possible to the Linux
> scripts is the better choice.

AFAIK there's no reason to lock for so long. The xenstore can handle
multiple writes just fine.
Also your version has a bug: if error() is called, the lock is released
twice, or you release a lock you didn't claim

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index