Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Radim Krčmář
2014-08-20 18:03+0200, Paolo Bonzini: > Il 20/08/2014 18:01, Radim Krčmář ha scritto: > > 2014-08-20 17:34+0200, Paolo Bonzini: > >> Il 20/08/2014 17:31, Radim Krčmář ha scritto: > >>> Btw. without extra code, we are still going to overflow on races when > >>> changing PW_grow, should they be cover

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Paolo Bonzini
Il 20/08/2014 18:01, Radim Krčmář ha scritto: > 2014-08-20 17:34+0200, Paolo Bonzini: >> Il 20/08/2014 17:31, Radim Krčmář ha scritto: >>> Btw. without extra code, we are still going to overflow on races when >>> changing PW_grow, should they be covered as well? >> >> You mean because there is no s

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Radim Krčmář
2014-08-20 17:34+0200, Paolo Bonzini: > Il 20/08/2014 17:31, Radim Krčmář ha scritto: > > Btw. without extra code, we are still going to overflow on races when > > changing PW_grow, should they be covered as well? > > You mean because there is no spinlock or similar protecting the changes? > I gu

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Paolo Bonzini
Il 20/08/2014 17:31, Radim Krčmář ha scritto: > Btw. without extra code, we are still going to overflow on races when > changing PW_grow, should they be covered as well? You mean because there is no spinlock or similar protecting the changes? I guess you could use a seqlock. Paolo -- To unsubscr

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Radim Krčmář
2014-08-20 15:15+0200, Paolo Bonzini: > Il 20/08/2014 14:41, Radim Krčmář ha scritto: > >> > if (ple_window_grow < 1 || ple_window_actual_max < ple_window) > >> > new = ple_window; > >> > else if (ple_window_grow < ple_window) > >> > new = max(ple_window_actual_max, old) * ple_w

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Paolo Bonzini
Il 20/08/2014 14:41, Radim Krčmář ha scritto: >> >if (ple_window_grow < 1 || ple_window_actual_max < ple_window) >> >new = ple_window; >> >else if (ple_window_grow < ple_window) >> >new = max(ple_window_actual_max, old) * ple_window_grow; >> >else >> >

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Radim Krčmář
2014-08-20 09:16+0200, Paolo Bonzini: > Il 19/08/2014 22:35, Radim Krčmář ha scritto: > > Every increase of ple_window_grow creates potential overflows. > > They are not serious, because we clamp ple_window and userspace is > > expected to fix ple_window_max within a second. > > --- > I think avoid

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Paolo Bonzini
Il 20/08/2014 09:16, Paolo Bonzini ha scritto: > Il 19/08/2014 22:35, Radim Krčmář ha scritto: >> Every increase of ple_window_grow creates potential overflows. >> They are not serious, because we clamp ple_window and userspace is >> expected to fix ple_window_max within a second. >> --- >> arch/x

Re: [PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-20 Thread Paolo Bonzini
Il 19/08/2014 22:35, Radim Krčmář ha scritto: > Every increase of ple_window_grow creates potential overflows. > They are not serious, because we clamp ple_window and userspace is > expected to fix ple_window_max within a second. > --- > arch/x86/kvm/vmx.c | 34 +- >

[PATCH 9/9] KVM: VMX: automatic PLE window maximum

2014-08-19 Thread Radim Krčmář
Every increase of ple_window_grow creates potential overflows. They are not serious, because we clamp ple_window and userspace is expected to fix ple_window_max within a second. --- arch/x86/kvm/vmx.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --