From: Dan Smith <danms@us.ibm.com>
To: Christian.Limpach@cl.cam.ac.uk
Cc: Xen Tools Developers <xen-tools@lists.xensource.com>,
Xen Developers <xen-devel@lists.xensource.com>
Subject: Re: [Xen-tools] [PATCH] Clean up dom_get() usage
Date: Fri, 16 Sep 2005 13:57:09 -0700 [thread overview]
Message-ID: <874q8kivdm.fsf@us.ibm.com> (raw)
In-Reply-To: 3d8eece20509161222782a9051@mail.gmail.com
CL> I don't think the 3rd hunk is needed.
The temporary variable is a added so that we can verify that dom_get()
returned non-None. A failure to get the current domain's info from xc
(which could happen) would result in an "unsubscriptable object"
exception in a less-than-obvious place while xend is starting up.
Am I missing something?
CL> It would make more sense to have a patch which replaces the magic
CL> dom0 domid by a global variable indicating the domid of the domain
CL> where xend is running.
The domid in this case isn't magic though, is it? We just use the
domid that is passed to us, which I think we assume is correctly set
to the privileged domain's ID.
Although the temporary variable is definitely not indicative of this
fact :)
CL> It's possibly a sensible behaviour, but I'd like to move away from
CL> code which does stuff as a side effect. We don't want to end up
CL> with countless places doing random actions just because they
CL> happen to notice a state change first.
I see your point. However, I do feel that we should be informative
and defensive where possible. I think that no matter where it is
detected, the hypervisor reporting a domain is no longer present
should not be ignored. Very recently, there have been very strange
problems occurring due to stale state that gets left around.
Would it be appropriate to take an action based on what state we think
we're in? For example, if we were running, mark ourselves as
"crashed"; if we were shutting down, remove ourselves from the list.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com
next prev parent reply other threads:[~2005-09-16 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-15 17:15 [PATCH] Clean up dom_get() usage Dan Smith
2005-09-16 19:22 ` [Xen-tools] " Christian Limpach
2005-09-16 20:57 ` Dan Smith [this message]
2005-09-16 22:03 ` Christian Limpach
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=874q8kivdm.fsf@us.ibm.com \
--to=danms@us.ibm.com \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
--cc=xen-tools@lists.xensource.com \
/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.