]> git.baikalelectronics.ru Git - kernel.git/commit
lguest: avoid sending interrupts to Guest when no activity occurs.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 13 Jun 2009 04:27:11 +0000 (22:27 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 12 Jun 2009 12:57:12 +0000 (22:27 +0930)
commit1657694fbe6cdff2d8afd8bd76794e33a7918a53
treeaa34fdb7ca3a6b7575a2ac7639c157995d334bc3
parent582290ff8ec82830cf626bb5cb4da0150f61f24e
lguest: avoid sending interrupts to Guest when no activity occurs.

If we track how many buffers we've used, we can tell whether we really
need to interrupt the Guest.  This happens as a side effect of
spurious notifications.

Spurious notifications happen because it can take a while before the
Host thread wakes up and sets the VRING_USED_F_NO_NOTIFY flag, and
meanwhile the Guest can more notifications.

A real fix would be to use wake counts, rather than a suppression
flag, but the practical difference is generally in the noise: the
interrupt is usually coalesced into a pending one anyway so we just
save a system call which isn't clearly measurable.

Secs Spurious IRQS
1G TCP Guest->Host: 3.93 58
1M normal pings: 100 72
1M 1k pings (-l 120): 57 492904

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Documentation/lguest/lguest.c