tech-kern archive

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

Re: vwakeup: neg numoutput



On Sun, Jun 29, 2008 at 02:03:18PM -0600, Greg Oster wrote:
> > Its done it to me 4 or 5 times now.  Trying to scp or rdist about 7GB 
> > of /usr/pkg and /usr/local to the domU, it gets about 1 or 2 GB 
> > transferred then the dom0 panics :-(
> 
> In both xbdback_xenbus.c and xbdback.c we have this code:
> 
>       if ((xbd_io->xio_buf.b_flags & B_READ) == 0)
>               xbd_io->xio_buf.b_vp->v_numoutput++;
> 
> Should this not read:
> 
>       if ((xbd_io->xio_buf.b_flags & B_READ) == 0) {
>               mutex_enter(&xbd_io->xio_buf.b_vp->v_interlock);
>               xbd_io->xio_buf.b_vp->v_numoutput++;
>               mutex_exit(&xbd_io->xio_buf.b_vp->v_interlock);
>         }
> 
> (or somesuch) to properly update v_numoutput ?  Most other changes
> to v_numoutput are holding the vp->v_interlock, but if this one is, 
> I'm completely missing how it's doing it...

I think you're right, the interlock is not taken here.
But we have a problem: at this point we are in interrupt context.
Can we take this mutex from interrupt context ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index