On 04/29/2011 03:30 PM, Ingo Molnar wrote: > > * Asias He <asias.hejun@xxxxxxxxx> wrote: > >> This patch fixes virtio-net randmom stall >> >> host $ scp guest:/root/big.guest . >> big.guest 42% 440MB 67.7KB/s - stalled - > >> @@ -77,9 +77,12 @@ static void virtio_net_rx_callback(struct kvm *self, void *param) >> head = virt_queue__get_iov(vq, iov, &out, &in, self); >> len = readv(net_device.tap_fd, iov, in); >> virt_queue__set_used_elem(vq, head, len); >> - } >> >> - kvm__irq_line(self, VIRTIO_NET_IRQ, 1); >> + /* We should interrupt guest right now, otherwise latency is huge. */ >> + mutex_lock(&net_device.mutex); >> + kvm__irq_line(self, VIRTIO_NET_IRQ, 1); >> + mutex_unlock(&net_device.mutex); > > The movement of the irq-line assertion call (which fixes the hangs) should be > separated from the mutex_lock() additions (which look unnecessary). I've sent out another patch to move this irq assertion. > > Could you please check whether the addition of the mutex really is necessary to > solve the hang/stall? Without the mutex around the kvm__irq_line, I am still seeing the hangs(with the irq assertion movement patch). I can reproduce this by: host$ scp guest:/root/big.guest . guest$ ping host Not sure if the mutex thing is necessary. > > Thanks, > > Ingo > -- Best Regards, Asias He -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html