On Mon, 20 Aug 2012, Mike Belopuhov wrote:
Because the interrupt load increases by approx. 7000 per second. I think
the
problem is that the backend sends packets faster than openbsd can enqueue
them. This means that the tx queue will be empty often, and each time an
tx
interrupt will be triggered.
this doesn't sound right as it's the driver that decides how much
to transmit.
How so? It simply transmits all packets that are in ifp->if_snd.
only if OACTIVE is not set.
Which does not help at all if I want to send more packets in one go, not
fewer.
btw is there a interrupt moderation mechanism available?
Unfortunately not one that is time based. It is only possible to defer
the interrupt for a certain amount of packets (with the RingEventIdx
feature) or until the last descriptor is removed from the ring (with the
NotifyOnEmpty feature). But the latter does not help much and the former is
not usable unless you have some timer that cleans up resources if no more
packets are sent.
For the rx interrupts it is even worse. I don't see any sensible way to
reduce interrupts without switching to polling when there are lots of
inbound packets.
that sucks, but that doesn't mean you have to abuse watchdog.
What do yo suggest then? Use a separate timeout? Accept the lower
performance?
Resetting the device in the watchdog has another unexpected problem: In
order to restore the MAC filters and promisc state, vioif_iff needs to do
asynchronous requests on the control queue. But in the watchdog, I cannot
sleep. FWIW, if_vic does not have a watchdog at all. Not having a watchdog
looks rather attractive for the virtio driver, too.
Cheers,
Stefan