diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-13 00:27:02 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-12 08:57:03 -0400 |
commit | a32a8813d0173163ba44d8f9556e0d89fdc4fb46 (patch) | |
tree | fddb6742338047d0219e8c2536cd39b04e643b16 /include | |
parent | abd41f037e1a64543000ed73b42f616d04d92700 (diff) |
lguest: improve interrupt handling, speed up stream networking
lguest never checked for pending interrupts when enabling interrupts, and
things still worked. However, it makes a significant difference to TCP
performance, so it's time we fixed it by introducing a pending_irq flag
and checking it on irq_restore and irq_enable.
These two routines are now too big to patch into the 8/10 bytes
patch space, so we drop that code.
Note: The high latency on interrupt delivery had a very curious
effect: once everything else was optimized, networking without GSO was
faster than networking with GSO, since more interrupts were sent and
hence a greater chance of one getting through to the Guest!
Note2: (Almost) Closing the same loophole for iret doesn't have any
measurable effect, so I'm leaving that patch for the moment.
Before:
1GB tcpblast Guest->Host: 30.7 seconds
1GB tcpblast Guest->Host (no GSO): 76.0 seconds
After:
1GB tcpblast Guest->Host: 6.8 seconds
1GB tcpblast Guest->Host (no GSO): 27.8 seconds
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lguest.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 175e63f4a8c0..7bc1440fc473 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -30,6 +30,10 @@ struct lguest_data | |||
30 | /* Wallclock time set by the Host. */ | 30 | /* Wallclock time set by the Host. */ |
31 | struct timespec time; | 31 | struct timespec time; |
32 | 32 | ||
33 | /* Interrupt pending set by the Host. The Guest should do a hypercall | ||
34 | * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ | ||
35 | int irq_pending; | ||
36 | |||
33 | /* Async hypercall ring. Instead of directly making hypercalls, we can | 37 | /* Async hypercall ring. Instead of directly making hypercalls, we can |
34 | * place them in here for processing the next time the Host wants. | 38 | * place them in here for processing the next time the Host wants. |
35 | * This batching can be quite efficient. */ | 39 | * This batching can be quite efficient. */ |