From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 5/9] KVM: VMX: clamp PLE window Date: Wed, 20 Aug 2014 14:46:08 +0200 Message-ID: <20140820124607.GD28873@potion.brq.redhat.com> References: <1408480536-8240-1-git-send-email-rkrcmar@redhat.com> <1408480536-8240-6-git-send-email-rkrcmar@redhat.com> <53F44BAE.9040405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Gleb Natapov , Raghavendra KT , Vinod Chegu , Hui-Zhi To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <53F44BAE.9040405@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2014-08-20 09:18+0200, Paolo Bonzini: > Il 19/08/2014 22:35, Radim Kr=C4=8Dm=C3=A1=C5=99 ha scritto: > > Modifications could get unwanted values of PLE window. (low or nega= tive) > > Use ple_window and the maximal value that cannot overflow as bounds= =2E > >=20 > > ple_window_max defaults to a very high value, but it would make sen= se to > > set it to some fraction of the scheduler tick. > >=20 > > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > > --- > Please introduce a dynamic overflow-avoiding ple_window_max (like wha= t > you have in patch 9) already in patch 4... >=20 > > static void shrink_ple_window(struct kvm_vcpu *vcpu) > > @@ -5720,7 +5724,7 @@ static void shrink_ple_window(struct kvm_vcpu= *vcpu) > > else > > new =3D old - ple_window_shrink; > > =20 > > - vmx->ple_window =3D new; > > + vmx->ple_window =3D max(new, ple_window); >=20 > ... and also squash this in patch 4. >=20 > This patch can then introduce the ple_window_max module parameter (us= ing > module_param_cb to avoid overflows). Will do. --- It is going to make the patches slightly harder to review; Are we doing it because git doesn't bisect on series boundaries?