From: Anthony Liguori <aliguori@us.ibm.com>
To: Kip Macy <kip.macy@gmail.com>
Cc: Daniel Stekloff <dsteklof@us.ibm.com>, xen-devel@lists.xensource.com
Subject: Re: DOM0_GETDOMAININFO intended behavior
Date: Fri, 03 Jun 2005 21:24:34 -0500 [thread overview]
Message-ID: <42A110E2.6030907@us.ibm.com> (raw)
In-Reply-To: <b1fa291705060317431c598e82@mail.gmail.com>
Kip Macy wrote:
>:-)
>I asked the same question a week or two ago and yes it is intended. It
>provides for easy iteration. I think it is kind of a hackish interface
>as it isn't uniform with *all* the other DOM0 calls. However, it works
>and once you know to check the domid return value your code will work
>as expected.
>
>
It's always concerned me that something there isn't an atomic interface
for getting all running domain information. I've not been able to
figure out a situation though where it would create a problem.
It just seems kind of odd that you could do an xc_domain_getinfo of an
array of dominfo's and a portion of the array might not be valid when
other portions of the array are. It's possible that the call could
return two domains that never actually existed together at the same
moment in time.
Again, I don't think it's a race condition but it's just odd.
Regards,
Anthony Liguori
> -Kip
>
>On 6/3/05, Daniel Stekloff <dsteklof@us.ibm.com> wrote:
>
>
>>Hi,
>>
>>Is it intended behavior for DOM0_GETDOMAININFO to return the next
>>domain's info if a requested domain doesn't exist?
>>
>>In xeno-unstable - xen/common/dom0_ops.c - lines 310-325:
>>
>> for_each_domain ( d )
>> {
>> if ( d->domain_id >= op->u.getdomaininfo.domain )
>> break;
>> }
>>
>> if ( (d == NULL) || !get_domain(d) )
>> {
>> read_unlock(&domlist_lock);
>> ret = -ESRCH;
>> break;
>> }
>>
>> read_unlock(&domlist_lock);
>>
>> op->u.getdomaininfo.domain = d->domain_id;
>>
>>
>>
>>If, as an example, I request info for domain 2 that doesn't exist
>>anymore and a higher domain number does exist, xen will return the next
>>domain's information rather than an error telling me domain 2 doesn't
>>exist.
>>
>>Is this correct?
>>
>>I noticed that libxc's xc_domain_getinfo() is built to use this when
>>grabbing multiple domain information. I want to know if we need to fix
>>vm-list to check what's returned or if this is unwanted behavior in the
>>library and hypervisor.
>>
>>Thanks,
>>
>>Dan
>>
>>
>>
>>
>>
>>
>>
>>_______________________________________________
>>Xen-devel mailing list
>>Xen-devel@lists.xensource.com
>>http://lists.xensource.com/xen-devel
>>
>>
>>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
>
>
>
next prev parent reply other threads:[~2005-06-04 2:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-03 23:18 DOM0_GETDOMAININFO intended behavior Daniel Stekloff
2005-06-04 0:43 ` Kip Macy
2005-06-04 2:24 ` Anthony Liguori [this message]
2005-06-04 8:20 Ian Pratt
2005-06-04 14:56 ` Daniel Stekloff
2005-06-04 19:42 ` Christian Limpach
2005-06-04 20:48 ` Daniel Stekloff
2005-06-04 21:51 Ian Pratt
2005-06-05 0:17 ` Kip Macy
2005-06-06 22:28 ` Daniel Stekloff
2005-06-08 10:42 Ian Pratt
2005-06-09 22:35 ` Daniel Stekloff
2005-06-10 0:18 Macy, Kip
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=42A110E2.6030907@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=dsteklof@us.ibm.com \
--cc=kip.macy@gmail.com \
--cc=xen-devel@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.