tech-kern archive

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

workaround for Xen2 domU xennet lossage [Was: Re: disappointing upgrade to NetBSD 5.0]



Seems my earlier reply to this thread did not make it through.

On Wed, May 27, 2009 at 11:49:03PM -0700, Dan Engholm wrote:
> On Tue, 26 May 2009 05:40:04 -0700, Jean-Yves Migeon 
> <jeanyves.migeon%free.fr@localhost> wrote:
> >Dan Engholm wrote:
> >>Looking around Google, I found one thread in
> >>port-xen with a similar description but it dead ended with no  
> >>resolution. (see  
> >>http://mail-index.netbsd.org/port-xen/2009/01/18/msg004686.html)
> >
> >It is network related, but the error is due to the hypervisor returning  
> >an error for the decrease memory operation. As the domU does not expect  
> >it to fail, it ends in panic().
> >
> >Advice would be the same as in the link above: any error reported by the  
> >hypervisor on its console?
> 
> The console doesn't show anything when the panic occurs.  I don't have a  
> terminal on the serial port but my xconsole shows XEN related messages so  
> I'm assuming that is where I would see something related to this problem,  
> too.  Here is what I see while the user domain is starting up:

I do not get any message on the Xen console either.

As a workaround I made the following change to if_xennet.c.  IIRC, the
messages triggres only once normally.  But the DomUs have otherwise been
stable for months on end for me.

Index: if_xennet.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/xen/if_xennet.c,v
retrieving revision 1.60
diff -u -r1.60 if_xennet.c
--- if_xennet.c 27 Oct 2008 10:58:22 -0000      1.60
+++ if_xennet.c 26 Jul 2009 12:45:38 -0000
@@ -657,8 +657,9 @@
        (void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
 
        /* Check return status of HYPERVISOR_dom_mem_op(). */
-       if ( rx_mcl[nr_pfns].args[5] != nr_pfns )
-               panic("Unable to reduce memory reservation\n");
+       if ( rx_mcl[nr_pfns].args[5] != nr_pfns ) {
+               printf("xennet_rx_push_buffer: unable to reduce memory 
reservation (%lu != %d)\n", rx_mcl[nr_pfns].args[5], nr_pfns);
+       }
 
        /* Above is a suitable barrier to ensure backend will see requests. */
        sc->sc_rx->req_prod = ringidx;
@@ -994,8 +995,9 @@
        (void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
 
        /* Check return status of HYPERVISOR_dom_mem_op(). */
-       if (rx_mcl[nr_pfns].args[5] != nr_pfns)
-               panic("Unable to reduce memory reservation\n");
+       if (rx_mcl[nr_pfns].args[5] != nr_pfns) {
+               printf("xennet_rx_push_buffer: unable to reduce memory 
reservation (%lu != %d)\n", rx_mcl[nr_pfns].args[5], nr_pfns);
+       }
 
        /* Above is a suitable barrier to ensure backend will see requests. */
        sc->sc_rx->req_prod = ringidx;

--chris


Home | Main Index | Thread Index | Old Index