Mark McLoughlin
2006-Jun-30 15:29 UTC
[Xen-devel] [PATCH] Improve xenbus timeout error message
Hi, With latest fedora, we''re seeing: XENBUS: Timeout connecting to devices! Attached is a patch to make it a little bit more useful: XENBUS: Timeout connecting to device: device/vif/0 The problem is that the timeout occurs before the xennet module can ever be loaded, which is to be expected. Anything that can be done to avoid the timeout in this case? Cheers, Mark. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Jun-30 15:44 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On Fri, Jun 30, 2006 at 04:29:45PM +0100, Mark McLoughlin wrote:> Hi, > With latest fedora, we''re seeing: > > XENBUS: Timeout connecting to devices! > > Attached is a patch to make it a little bit more useful: > > XENBUS: Timeout connecting to device: device/vif/0 > > The problem is that the timeout occurs before the xennet module can > ever be loaded, which is to be expected. Anything that can be done to > avoid the timeout in this case?The timeout is there to ensure that the boot does not proceed until all the devices needed during boot are available. In this case, since it''s a vif, if you were using an NFS root then your boot would presumably fail. If you need to improve this, you will have to have some way to tell the tools "these devices I need for boot, these I don''t", and then have the tools put a flag in the store so that Xenbus knows that it doesn''t need to wait for them. Cheers, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-30 15:58 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On 30 Jun 2006, at 16:44, Ewan Mellor wrote:>> The problem is that the timeout occurs before the xennet module can >> ever be loaded, which is to be expected. Anything that can be done to >> avoid the timeout in this case? > > The timeout is there to ensure that the boot does not proceed until > all the > devices needed during boot are available. In this case, since it''s a > vif, if > you were using an NFS root then your boot would presumably fail. > > If you need to improve this, you will have to have some way to tell > the tools > "these devices I need for boot, these I don''t", and then have the > tools put a > flag in the store so that Xenbus knows that it doesn''t need to wait > for them.The obvious thing to do here is work out which devices haven''t been picked up by any driver, and not wait on those since they are obviously not going to connect! We should either silently ignore those, or maybe print a list of them for information. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark McLoughlin
2006-Jun-30 16:52 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On Fri, 2006-06-30 at 16:58 +0100, Keir Fraser wrote:> On 30 Jun 2006, at 16:44, Ewan Mellor wrote: > > >> The problem is that the timeout occurs before the xennet module can > >> ever be loaded, which is to be expected. Anything that can be done to > >> avoid the timeout in this case? > > > > The timeout is there to ensure that the boot does not proceed until > > all the > > devices needed during boot are available. In this case, since it''s a > > vif, if > > you were using an NFS root then your boot would presumably fail. > > > > If you need to improve this, you will have to have some way to tell > > the tools > > "these devices I need for boot, these I don''t", and then have the > > tools put a > > flag in the store so that Xenbus knows that it doesn''t need to wait > > for them. > > The obvious thing to do here is work out which devices haven''t been > picked up by any driver, and not wait on those since they are obviously > not going to connect! We should either silently ignore those, or maybe > print a list of them for information.Good point, how about this patch then? Cheers, Mark. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-30 16:57 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On 30 Jun 2006, at 17:52, Mark McLoughlin wrote:>> The obvious thing to do here is work out which devices haven''t been >> picked up by any driver, and not wait on those since they are >> obviously >> not going to connect! We should either silently ignore those, or maybe >> print a list of them for information. > > Good point, how about this patch then?Yes, I just checked in a patch rather similar, except I also print the driverless devices (could be handy for diagnostics, but I''m not sure if it might turn out to be too noisy in some situations) and move some functions closer to where they are used. Your original path is changeset 10570 in xen-unstable; my modification is 10573. Should be in the public tree in a couple of hours. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark McLoughlin
2006-Jun-30 17:02 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On Fri, 2006-06-30 at 17:57 +0100, Keir Fraser wrote:> On 30 Jun 2006, at 17:52, Mark McLoughlin wrote: > > >> The obvious thing to do here is work out which devices haven''t been > >> picked up by any driver, and not wait on those since they are > >> obviously > >> not going to connect! We should either silently ignore those, or maybe > >> print a list of them for information. > > > > Good point, how about this patch then? > > Yes, I just checked in a patch rather similar, except I also print the > driverless devices (could be handy for diagnostics, but I''m not sure if > it might turn out to be too noisy in some situations) and move some > functions closer to where they are used. > > Your original path is changeset 10570 in xen-unstable; my modification > is 10573. Should be in the public tree in a couple of hours.Note, the original patch leaked device references when printing out the warning if there are multiple disconnected devices. Fixed in the second patch. Cheers, Mark. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-30 17:17 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On 30 Jun 2006, at 18:02, Mark McLoughlin wrote:> Note, the original patch leaked device references when printing out > the > warning if there are multiple disconnected devices. Fixed in the second > patch.Ha. And I spotted that and already fixed in a third patch (10574): The very final. :-) -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Jun-30 17:23 UTC
Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
On 30 Jun 2006, at 18:17, Keir Fraser wrote:>> Note, the original patch leaked device references when printing out >> the >> warning if there are multiple disconnected devices. Fixed in the >> second >> patch. > > Ha. And I spotted that and already fixed in a third patch (10574): The > very final. :-)Also your fix is racy, since it calls bus_find_device() on a dev that you have no reference to (since you already called put_device()). So there''s a vanishingly small possibility that the dev could disappear in the meantime. I replaced with a straightforward bus_for_each_device iterator with the printk inside the iterator callback. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel