aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lg.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-13 00:27:02 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:57:03 -0400
commita32a8813d0173163ba44d8f9556e0d89fdc4fb46 (patch)
treefddb6742338047d0219e8c2536cd39b04e643b16 /drivers/lguest/lg.h
parentabd41f037e1a64543000ed73b42f616d04d92700 (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 'drivers/lguest/lg.h')
-rw-r--r--drivers/lguest/lg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 6743cf147d97..573896533ac9 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -139,8 +139,8 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
139#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT) 139#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
140 140
141/* interrupts_and_traps.c: */ 141/* interrupts_and_traps.c: */
142unsigned int interrupt_pending(struct lg_cpu *cpu); 142unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more);
143void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq); 143void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more);
144bool deliver_trap(struct lg_cpu *cpu, unsigned int num); 144bool deliver_trap(struct lg_cpu *cpu, unsigned int num);
145void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int i, 145void load_guest_idt_entry(struct lg_cpu *cpu, unsigned int i,
146 u32 low, u32 hi); 146 u32 low, u32 hi);