Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xbd detachment



On Sat, Jul 25, 2009 at 11:25:55PM +0200, Jean-Yves Migeon wrote:
> David Young wrote:
>> On Sat, Jul 25, 2009 at 10:29:03PM +0200, Jean-Yves Migeon wrote:
>>> David Young wrote:
>>>> I am experimenting with detaching xbd(4) units during shutdown.
>>>> xbd_xenbus_detach() hangs in this the loop, below:
>>>>
>>>>         hypervisor_mask_event(sc->sc_evtchn);
>>>>         event_remove_handler(sc->sc_evtchn, &xbd_handler, sc);
>>>>         while (xengnt_status(sc->sc_ring_gntref)) {
>>>>                 tsleep(xbd_xenbus_detach, PRIBIO, "xbd_ref", hz/2);
>>>>         }               xengnt_revoke_access(sc->sc_ring_gntref);
>>>>         uvm_km_free(kernel_map, (vaddr_t)sc->sc_ring.sring,
>>>>             PAGE_SIZE, UVM_KMF_WIRED);
>>> The dom0 is expected not to use the grant table ring during device   
>>> removal, and clear transfering/writing/reading states. If it does not 
>>>  (hence, infinite loop on status), something is wrong in dom0.
>>
>> Is there an event that I should watch for in the Dom0?
>
> With vmstat -i, you could see if there is an activity on the xbd  
> interface (events). Look for xbd<domain_id>.<device_number>.

Only 8 events are ever counted.  The device is never mounted, BTW, so
the few events that are counted probably have something to do with wedge
and RAIDframe autoconfiguration during boot.

> There should be no activity, at least. I am not even sure that the event  
> will be listed though, it is probably already removed/masked.

The event remains listed while the DomU hangs in xbd_xenbus_detach().

>>> What version/OS are you running as dom0? Is the vbd (dom0 side) a 
>>> file  (used through vnd(4)), or a block device?
>>
>> NetBSD 5.99.15, XEN3_DOM0 kernel.  The backing device is a file.
>
> Does it happen only with files or do you get the same behavior with  
> block device too?

I cannot easily try a block device.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index