Replace kvm io delay pv-ops with linux magic
Subsystems (4)
PATCH 1/1 Replace kvm io delay pv-ops with linux magic
Currently we use pv-ops to tell linux not to do anything on io_delay.
While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing if you're so inclined.
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
--- arch/x86/Kconfig | 14 -------------- arch/x86/kernel/kvm.c | 16 +++------------- 2 files changed, 3 insertions(+), 27 deletions(-)
arch/x86/Kconfig +0 -14
@@ -527,20 +527,6 @@ config KVM_GUEST This option enables various optimizations for running under the KVM hypervisor. -config KVM_IODELAY - bool "KVM IO-delay support" - depends on KVM_GUEST - select PARAVIRT_CPU - ---help--- - Usually we wait for PIO access to complete. When inside KVM there's - no need to do that, as we know that we're not going through a bus, - but process PIO requests instantly. - - This option disables PIO waits, but drags in CPU-bound pv-ops. Thus - you will probably get more speed loss than speedup using this option. - - If in doubt, say N. - config KVM_MMU bool "KVM PV MMU support" depends on KVM_GUEST
arch/x86/kernel/kvm.c +3 -13
@@ -29,15 +29,6 @@#include <linux/hardirq.h> #include <asm/timer.h> -#ifdef CONFIG_KVM_IODELAY -/* -* No need for any "IO delay" on KVM -*/ -static void kvm_io_delay (void ) -{ -} -#endif /* CONFIG_KVM_IODELAY */ -#ifdef CONFIG_KVM_MMU #define MMU_QUEUE_SIZE 1024
@@ -201,13 +192,12 @@ static void kvm_leave_lazy_mmu(void)static void __init paravirt_ops_setup (void ) { +extern int io_delay_type; pv_info.name ="KVM" ; pv_info.paravirt_enabled =1 ; -#ifdef CONFIG_KVM_IODELAY -if (kvm_para_has_feature (KVM_FEATURE_NOP_IO_DELAY )) - pv_cpu_ops.io_delay = kvm_io_delay; -#endif +/* Disable IO delay */ + io_delay_type =CONFIG_IO_DELAY_TYPE_NONE ;#ifdef CONFIG_KVM_MMU if (kvm_para_has_feature (KVM_FEATURE_MMU_OP )) {
Signature · 1 line
1.6.0.2
Quoted 10 lines · Alexander Graf
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing if you're so inclined.
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the io_delay op altogether? If KVM doesn't need it, then nobody does.
J
Quoted 69 lines
Signed-off-by Alexander Graf <[email protected]>--- arch/x86/Kconfig | 14 -------------- arch/x86/kernel/kvm.c | 16 +++------------- 2 files changed, 3 insertions(+), 27 deletions(-)arch/x86/Kconfig +0
-14@@ -527,20 +527,6 @@ config KVM_GUEST This option enables various optimizations for running under the KVM hypervisor. -config KVM_IODELAY - bool "KVM IO-delay support" - depends on KVM_GUEST - select PARAVIRT_CPU - ---help--- - Usually we wait for PIO access to complete. When inside KVM there's - no need to do that, as we know that we're not going through a bus, - but process PIO requests instantly. - - This option disables PIO waits, but drags in CPU-bound pv-ops. Thus - you will probably get more speed loss than speedup using this option. - - If in doubt, say N. - config KVM_MMU bool "KVM PV MMU support" depends on KVM_GUESTarch/x86/kernel/kvm.c +3
-13@@ -29,15 +29,6 @@#include <linux/hardirq.h> #include <asm/timer.h> -#ifdef CONFIG_KVM_IODELAY -/* -* No need for any "IO delay" on KVM -*/ -static void kvm_io_delay (void ) -{ -} -#endif /* CONFIG_KVM_IODELAY */ -#ifdef CONFIG_KVM_MMU #define MMU_QUEUE_SIZE 1024@@ -201,13 +192,12 @@ static void kvm_leave_lazy_mmu(void)static void __init paravirt_ops_setup (void ) { +extern int io_delay_type; pv_info.name ="KVM" ; pv_info.paravirt_enabled =1 ; -#ifdef CONFIG_KVM_IODELAY -if (kvm_para_has_feature (KVM_FEATURE_NOP_IO_DELAY )) - pv_cpu_ops.io_delay = kvm_io_delay; -#endif +/* Disable IO delay */ + io_delay_type =CONFIG_IO_DELAY_TYPE_NONE ;#ifdef CONFIG_KVM_MMU if (kvm_para_has_feature (KVM_FEATURE_MMU_OP )) {
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 7 lines · Alexander Graf
Quoted 6 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing if you're so inclined.
Quoted 7 lines
Quoted 4 lines
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the
io_delayop altogether? If KVM doesn't need it, then nobody does.
Sure, can do. That'd be a separate patch though.
Alex
Quoted 16 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 13 lines · Alexander Graf
Quoted 11 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing
if you're so inclined.So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Quoted 4 lines
Quoted 2 lines
Can you just get rid of the
io_delayop altogether? If KVM doesn't need it, then nobody does.Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for io_delay; I wonder what it does.
J
Quoted 16 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 13 lines · Alexander Graf
Quoted 11 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing
if you're so inclined.So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Quoted 4 lines
Quoted 2 lines
Can you just get rid of the
io_delayop altogether? If KVM doesn't need it, then nobody does.Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for io_delay; I wonder what it does.
J
Quoted 17 lines · Jeremy Fitzhardinge
Quoted 16 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 13 lines · Alexander Graf
Quoted 11 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing
if you're so inclined.So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Can you just get rid of the
io_delayop altogether? If KVM doesn't need it, then nobody does.Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for
io_delay; I wonder what it does.
Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
Alex
Quoted 25 lines · Alexander Graf
Quoted 22 lines · Jeremy Fitzhardinge
Quoted 21 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 17 lines · Alexander Graf
Quoted 8 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.Quoted 4 lines
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for
io_delay; I wonder what it does.Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
I would post the patch and see if Alok naks it. But I somehow doubt vmware is doing anything profound with that call.
J
Quoted 25 lines · Alexander Graf
Quoted 22 lines · Jeremy Fitzhardinge
Quoted 21 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 17 lines · Alexander Graf
Quoted 8 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.Quoted 4 lines
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for
io_delay; I wonder what it does.Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
I would post the patch and see if Alok naks it. But I somehow doubt vmware is doing anything profound with that call.
J
Quoted 32 lines · Jeremy Fitzhardinge
Quoted 31 lines · Alexander Graf
Quoted 27 lines · Jeremy Fitzhardinge
Quoted 17 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 14 lines · Alexander Graf
Quoted 12 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Quoted 5 lines
Quoted 3 lines
Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for
io_delay; I wonder what it does.
Quoted 6 lines
Quoted 2 lines
Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
I would post the patch and see if Alok naks it. But I somehow doubt vmware is doing anything profound with that call.
Yeah removing it is fine with me. That call is just a no-op anyways, and, if there are other ways for avoiding the IO delay cost we can use that one too.
Alok
Quoted 32 lines · Jeremy Fitzhardinge
Quoted 31 lines · Alexander Graf
Quoted 27 lines · Jeremy Fitzhardinge
Quoted 17 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 14 lines · Alexander Graf
Quoted 12 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Quoted 5 lines
Quoted 3 lines
Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final patch to remove the op. Hm, looks like VMI has a specific ROM call for
io_delay; I wonder what it does.
Quoted 6 lines
Quoted 2 lines
Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
I would post the patch and see if Alok naks it. But I somehow doubt vmware is doing anything profound with that call.
Yeah removing it is fine with me. That call is just a no-op anyways, and, if there are other ways for avoiding the IO delay cost we can use that one too.
Alok
Quoted 24 lines · Jeremy Fitzhardinge
Quoted 23 lines · Alexander Graf
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 19 lines · Alexander Graf
Quoted 9 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.Quoted 5 lines
So here's a patch (stacked on top of the previous pv-ops series) that
removes the io delay pv-ops hook and just sets the native io delay variable instead.Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.
Quoted 7 lines
Quoted 1 line
Sure, can do. That'd be a separate patch though.
Yep. A patch each for VMI and Xen to remove the dependency, and a final
patch to remove the op. Hm, looks like VMI has a specific ROM call forio_delay; I wonder what it does.
Oh so it's actually using it? Feel like doing the removal then? I don't really want to mess with VMI code :-)
Alex
Am 19.11.2009 um 23:55 schrieb Jeremy Fitzhardinge <[email protected]>:
Quoted 9 lines · Alexander Graf
Quoted 8 lines
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv- ops
for that. The io delay function already has a switch that can do nothing
if you're so inclined.
Quoted 8 lines
Quoted 4 lines
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the
io_delayop altogether? If KVM doesn't need
it, then nobody does.
Sure, can do. That'd be a separate patch though.
Alex
Quoted 10 lines · Alexander Graf
Currently we use pv-ops to tell linux not to do anything on
io_delay.While the basic idea is good IMHO, I don't see why we would need pv-ops for that. The io delay function already has a switch that can do nothing if you're so inclined.
So here's a patch (stacked on top of the previous pv-ops series) that removes the io delay pv-ops hook and just sets the native io delay variable instead.
Can you just get rid of the io_delay op altogether? If KVM doesn't need it, then nobody does.
J
Quoted 69 lines
Signed-off-by Alexander Graf <[email protected]>--- arch/x86/Kconfig | 14 -------------- arch/x86/kernel/kvm.c | 16 +++------------- 2 files changed, 3 insertions(+), 27 deletions(-)arch/x86/Kconfig +0
-14@@ -527,20 +527,6 @@ config KVM_GUEST This option enables various optimizations for running under the KVM hypervisor. -config KVM_IODELAY - bool "KVM IO-delay support" - depends on KVM_GUEST - select PARAVIRT_CPU - ---help--- - Usually we wait for PIO access to complete. When inside KVM there's - no need to do that, as we know that we're not going through a bus, - but process PIO requests instantly. - - This option disables PIO waits, but drags in CPU-bound pv-ops. Thus - you will probably get more speed loss than speedup using this option. - - If in doubt, say N. - config KVM_MMU bool "KVM PV MMU support" depends on KVM_GUESTarch/x86/kernel/kvm.c +3
-13@@ -29,15 +29,6 @@#include <linux/hardirq.h> #include <asm/timer.h> -#ifdef CONFIG_KVM_IODELAY -/* -* No need for any "IO delay" on KVM -*/ -static void kvm_io_delay (void ) -{ -} -#endif /* CONFIG_KVM_IODELAY */ -#ifdef CONFIG_KVM_MMU #define MMU_QUEUE_SIZE 1024@@ -201,13 +192,12 @@ static void kvm_leave_lazy_mmu(void)static void __init paravirt_ops_setup (void ) { +extern int io_delay_type; pv_info.name ="KVM" ; pv_info.paravirt_enabled =1 ; -#ifdef CONFIG_KVM_IODELAY -if (kvm_para_has_feature (KVM_FEATURE_NOP_IO_DELAY )) - pv_cpu_ops.io_delay = kvm_io_delay; -#endif +/* Disable IO delay */ + io_delay_type =CONFIG_IO_DELAY_TYPE_NONE ;#ifdef CONFIG_KVM_MMU if (kvm_para_has_feature (KVM_FEATURE_MMU_OP )) {