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

Re: [Xen-devel] Relevance of global lock (/var/lock/xl) in xl tool


  • To: Michał Leszczyński <michal.leszczynski@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 10 Jun 2019 10:41:43 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@xxxxxxxxxx; spf=Pass smtp.mailfrom=anthony.perard@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 10 Jun 2019 09:42:11 +0000
  • Ironport-sdr: k2TNegrQ5kVmOw0hyMyAZ8CqfxcoD9PoS5nDQBmf7BXYGKowxI4uGZpbIRSOgP2m0LEGDqcAzj BYcig1sWgKVOrC7J+OpA31nEyiiw3NT+4hHy8/f2yO44UcQ5Bvf9/sUw0UzlUtPy/wTMgsuZd6 Qc3jreEe58CNhb/xvkV2kmcUo5bf136DQCWEaRt0dUqgoFfL71gAqMsduviJJJB4OpRxrlMa1+ MfNGNb4EmtkRnFTqlNozlfmZi87jQMG0j66nq8QBDeHuYfwvrW70g/NaV0bOeOmq+Gm1p4ZccJ RYg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Jun 07, 2019 at 02:06:30PM +0200, Michał Leszczyński wrote:
> Hello,

Hi,

> when either "xl restore" or "xl create" command is invoked, a global lock is 
> acquired here:
> 
> https://github.com/xen-project/xen/blob/master/tools/xl/xl_vmcontrol.c#L876
> 
> I'm trying to figure out what is the exact importance of this lock? Is it 
> really critical for XL operation? I have a pretty powerful machine on which I 
> want to run a few dozen of short-lived VMs. This lock is seriously slowing me 
> down, not letting to restore more than one domain at once. Turns out that 
> everything still works fine (and much faster) when I comment-out the lock in 
> the abovementioned place, but I'm not sure if it's a correct impression.
> 
> Does anyone know if there is a situation in which Xen would screw up without 
> this lock?

Here is the reason for the lock:
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=ea4dce89d478d62341cd2f9d8944e215f7086144

  xl: free memory before building a domain
  Free the needed amount of memory before proceeding with the domain
  build.
  Use a filelock to prevent other xl instances from conflicting during
  this operation.

So there are probably configurations where the lock isn't useful, or
there are better ways to reserve memory for domain creation.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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