All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
       [not found] <200907281610.n6SGAcxZ010950@xenbits.xensource.com>
@ 2009-07-29  2:57 ` Cui, Dexuan
  2009-07-29  4:06   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Cui, Dexuan @ 2009-07-29  2:57 UTC (permalink / raw)
  To: Tom Rotenberg, xen-devel@lists.xensource.com; +Cc: Simon Horman

Hi Tom and Simon,
The patch looks like a workaround to me.
Could you please explain under what condition the state may be null?

On my host I don't meet with the issue, but I did hear the same issue on some host and I would look into it when the host is available for me.

Thanks,
-- Dexuan

-----Original Message-----
From: xen-changelog-bounces@lists.xensource.com [mailto:xen-changelog-bounces@lists.xensource.com] On Behalf Of Xen patchbot-unstable
Sent: 2009?7?29? 0:11
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1248795146 -3600
# Node ID 0c7a560822d9d9516dfc83cef6fceec944fd97a8
# Parent  6120f7a92d82ccb1747feffa1a72eb704e642fb0
xend: pass-through: device state in xenstore may be null

Signed-off-by: Tom Rotenberg <tom.rotenberg@gmail.com>
---
 tools/python/xen/xend/server/pciif.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 6120f7a92d82 -r 0c7a560822d9 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:28:21 2009 +0100
+++ b/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:32:26 2009 +0100
@@ -489,7 +489,11 @@ class PciController(DevController):
         num_devs = int(self.readBackend(devid, 'num_devs'))
         new_num_devs = 0
         for i in range(num_devs):
-            state = int(self.readBackend(devid, 'state-%i' % i))
+            try:
+                state = int(self.readBackend(devid, 'state-%i' % i))
+            except:
+                state = xenbusState['Unknown']
+
             if state == xenbusState['Closing']:
                 # Detach I/O resources.
                 pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % i))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
  2009-07-29  2:57 ` [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null Cui, Dexuan
@ 2009-07-29  4:06   ` Simon Horman
  2009-07-29  4:19     ` Cui, Dexuan
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2009-07-29  4:06 UTC (permalink / raw)
  To: Cui, Dexuan; +Cc: Tom Rotenberg, xen-devel@lists.xensource.com

On Wed, Jul 29, 2009 at 10:57:40AM +0800, Cui, Dexuan wrote:
> Hi Tom and Simon,
> The patch looks like a workaround to me.
> Could you please explain under what condition the state may be null?
> 
> On my host I don't meet with the issue, but I did hear the same issue on
> some host and I would look into it when the host is available for me.

Hi Dexuan,

I agree that this looks a lot like a work-around. I was initially very
reluctant to apply it. And I would still be very happy if someone could
find a better solution. My analysis of the problem is as follows:

   What I now think is happening is that for some reason on your system
   when _createDevices() initialises the devices in xenstore using
   _createDevice() then end up with no state entry. Whereas on my system
   then end up with state 3=Initialised.

   It seems to me that actually the behaviour of your system is correct and
   my system is bogus. I really don't know why that is the case - are you
   using the stock xenstore implementation in C, or the Ocaml version?

   In any case, it seems to be that your original work-around was more or
   less correct. I'll just tweak it a bit to handle the case where
   cleanupDevices() is shuffling entries because one or more have been
   deleted and repost it.

   Ref: http://lists.xensource.com/archives/html/xen-devel/2009-07/msg01082.html

> 
> Thanks,
> -- Dexuan
> 
> -----Original Message-----
> From: xen-changelog-bounces@lists.xensource.com [mailto:xen-changelog-bounces@lists.xensource.com] On Behalf Of Xen patchbot-unstable
> Sent: 2009?7?29? 0:11
> To: xen-changelog@lists.xensource.com
> Subject: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
> 
> # HG changeset patch
> # User Keir Fraser <keir.fraser@citrix.com>
> # Date 1248795146 -3600
> # Node ID 0c7a560822d9d9516dfc83cef6fceec944fd97a8
> # Parent  6120f7a92d82ccb1747feffa1a72eb704e642fb0
> xend: pass-through: device state in xenstore may be null
> 
> Signed-off-by: Tom Rotenberg <tom.rotenberg@gmail.com>
> ---
>  tools/python/xen/xend/server/pciif.py |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff -r 6120f7a92d82 -r 0c7a560822d9 tools/python/xen/xend/server/pciif.py
> --- a/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:28:21 2009 +0100
> +++ b/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:32:26 2009 +0100
> @@ -489,7 +489,11 @@ class PciController(DevController):
>          num_devs = int(self.readBackend(devid, 'num_devs'))
>          new_num_devs = 0
>          for i in range(num_devs):
> -            state = int(self.readBackend(devid, 'state-%i' % i))
> +            try:
> +                state = int(self.readBackend(devid, 'state-%i' % i))
> +            except:
> +                state = xenbusState['Unknown']
> +
>              if state == xenbusState['Closing']:
>                  # Detach I/O resources.
>                  pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % i))
> 
> _______________________________________________
> Xen-changelog mailing list
> Xen-changelog@lists.xensource.com
> http://lists.xensource.com/xen-changelog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
  2009-07-29  4:06   ` Simon Horman
@ 2009-07-29  4:19     ` Cui, Dexuan
  0 siblings, 0 replies; 3+ messages in thread
From: Cui, Dexuan @ 2009-07-29  4:19 UTC (permalink / raw)
  To: Simon Horman; +Cc: Tom Rotenberg, xen-devel@lists.xensource.com

Hi Simon,
Thanks a lot for the info!
I'll try to look into the issue later.

Thanks,
-- Dexuan



-----Original Message-----
From: Simon Horman [mailto:horms@verge.net.au] 
Sent: 2009?7?29? 12:06
To: Cui, Dexuan
Cc: Tom Rotenberg; xen-devel@lists.xensource.com
Subject: Re: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null

On Wed, Jul 29, 2009 at 10:57:40AM +0800, Cui, Dexuan wrote:
> Hi Tom and Simon,
> The patch looks like a workaround to me.
> Could you please explain under what condition the state may be null?
> 
> On my host I don't meet with the issue, but I did hear the same issue on
> some host and I would look into it when the host is available for me.

Hi Dexuan,

I agree that this looks a lot like a work-around. I was initially very
reluctant to apply it. And I would still be very happy if someone could
find a better solution. My analysis of the problem is as follows:

   What I now think is happening is that for some reason on your system
   when _createDevices() initialises the devices in xenstore using
   _createDevice() then end up with no state entry. Whereas on my system
   then end up with state 3=Initialised.

   It seems to me that actually the behaviour of your system is correct and
   my system is bogus. I really don't know why that is the case - are you
   using the stock xenstore implementation in C, or the Ocaml version?

   In any case, it seems to be that your original work-around was more or
   less correct. I'll just tweak it a bit to handle the case where
   cleanupDevices() is shuffling entries because one or more have been
   deleted and repost it.

   Ref: http://lists.xensource.com/archives/html/xen-devel/2009-07/msg01082.html

> 
> Thanks,
> -- Dexuan
> 
> -----Original Message-----
> From: xen-changelog-bounces@lists.xensource.com [mailto:xen-changelog-bounces@lists.xensource.com] On Behalf Of Xen patchbot-unstable
> Sent: 2009?7?29? 0:11
> To: xen-changelog@lists.xensource.com
> Subject: [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null
> 
> # HG changeset patch
> # User Keir Fraser <keir.fraser@citrix.com>
> # Date 1248795146 -3600
> # Node ID 0c7a560822d9d9516dfc83cef6fceec944fd97a8
> # Parent  6120f7a92d82ccb1747feffa1a72eb704e642fb0
> xend: pass-through: device state in xenstore may be null
> 
> Signed-off-by: Tom Rotenberg <tom.rotenberg@gmail.com>
> ---
>  tools/python/xen/xend/server/pciif.py |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff -r 6120f7a92d82 -r 0c7a560822d9 tools/python/xen/xend/server/pciif.py
> --- a/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:28:21 2009 +0100
> +++ b/tools/python/xen/xend/server/pciif.py	Tue Jul 28 16:32:26 2009 +0100
> @@ -489,7 +489,11 @@ class PciController(DevController):
>          num_devs = int(self.readBackend(devid, 'num_devs'))
>          new_num_devs = 0
>          for i in range(num_devs):
> -            state = int(self.readBackend(devid, 'state-%i' % i))
> +            try:
> +                state = int(self.readBackend(devid, 'state-%i' % i))
> +            except:
> +                state = xenbusState['Unknown']
> +
>              if state == xenbusState['Closing']:
>                  # Detach I/O resources.
>                  pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % i))
> 
> _______________________________________________
> Xen-changelog mailing list
> Xen-changelog@lists.xensource.com
> http://lists.xensource.com/xen-changelog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-29  4:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200907281610.n6SGAcxZ010950@xenbits.xensource.com>
2009-07-29  2:57 ` [Xen-changelog] [xen-unstable] xend: pass-through: device state in xenstore may be null Cui, Dexuan
2009-07-29  4:06   ` Simon Horman
2009-07-29  4:19     ` Cui, Dexuan

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.