Port-xen archive

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

Re: wm(4) faster than vioif(4) in some cases

tnn%NetBSD.org@localhost (Tobias Nygren) writes:

>I suspect this may be because there is no TX completion notification
>which NFS needs for good performance.

Not sure what you mean with 'completition notification' here.

> There is a comment in if_vioif.c:

> * tx interrupt is actually disabled; this should be called upon
> * tx vq full and watchdog
> */

>Does anyone know what needs to be done to enable tx interrupt?

In vioif_attach() you find:

        virtio_start_vq_intr(vsc, &sc->sc_vq[0]);
        virtio_stop_vq_intr(vsc, &sc->sc_vq[1]); /* not urgent; do it later */
                        virtio_start_vq_intr(vsc, &sc->sc_vq[2]);

sc_vq[0] = receive queue
sc_vq[1] = transmit queue
sc_vq[2] = control queue

The interrupt handler should already be in place. You just need to
start instead of stop.

The only effect of this should be a higher CPU load unless something
runs out of resources. But this can happen if packets are queued at the
speed they are actually sent to the "wire". The queue (length = 16)
then rarely fills and the watchdog only frees buffers every second.

                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index