All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: Mark <mark+lists@internecto.net>
Cc: xen-devel@lists.xen.org
Subject: Re: Xen scripts rewrite
Date: Thu, 01 Mar 2012 14:35:07 +0100	[thread overview]
Message-ID: <4F4F7B0B.5000808@invisiblethingslab.com> (raw)
In-Reply-To: <20120301124243.9B202298942@mx1.internecto.net>


[-- Attachment #1.1: Type: text/plain, Size: 1192 bytes --]

On 01.03.2012 13:38, Mark wrote:
> Greetings,
> 
> I am trying to wrap my head around the xen scripts in /etc/xen/scripts.
> I am currently looking at locking.sh but I don't really understand what
> it is doing.
> 
> I see that claim_lock has a while loop, it seems to wait until it can
> write its own PID to $lockdir/owner. If the file $lockdir/owner exists,
> check if the pid is still running. If it's still running when the
> loop is done, steal the lock by writing $$ to $lockdir/owner anyway.
> 
> Anyway. Can someone please further explain this file in plain English
> and detail. Am I right with my above assumptions, and when are locks
> even used?
> 
> As said, I request as much detail as possible - the rewrite is to
> improve efficiency, readability and user customisation. As it is now
> you have too much functions that confuse me silly.
> 
> If I am succesful I will share the outcome, so there's an incentive if
> you need one.

Current locking mechanism have some problems. I've written about it here:
http://lists.xen.org/archives/html/xen-devel/2011-07/msg00182.html

-- 
Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 554 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  parent reply	other threads:[~2012-03-01 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 12:38 Xen scripts rewrite Mark
2012-03-01 13:29 ` Mark van Dijk
2012-03-02 19:47   ` Ian Campbell
2012-03-01 13:35 ` Marek Marczykowski [this message]
2012-03-01 17:32   ` Mark
2012-03-01 17:50     ` Marek Marczykowski
2012-03-02 13:30 ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F4F7B0B.5000808@invisiblethingslab.com \
    --to=marmarek@invisiblethingslab.com \
    --cc=mark+lists@internecto.net \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.