[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140821114739.GC20546@potion.brq.redhat.com>
Date: Thu, 21 Aug 2014 13:47:40 +0200
From: Radim Krčmář <rkrcmar@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Gleb Natapov <gleb@...nel.org>,
Raghavendra KT <raghavendra.kt@...ux.vnet.ibm.com>,
Vinod Chegu <chegu_vinod@...com>,
Hui-Zhi <hui-zhi.zhao@...com>,
Christian Borntraeger <borntraeger@...ibm.com>
Subject: Re: [PATCH v2 4/6] KVM: VMX: dynamise PLE window
2014-08-21 10:24+0200, Paolo Bonzini:
> Il 20/08/2014 22:53, Radim Krčmář ha scritto:
> > +static void update_ple_window_actual_max(void)
> > +{
> > + ple_window_actual_max =
> > + __shrink_ple_window(max(ple_window_max, ple_window),
>
> Why the max() here?
To have ple_window act as a ple_window_min as well.
(When we are already preventing most stupid choices.)
And it's cheap ... I can add comment to this function :)
> > + ple_window_grow, INT_MIN);
>
> This should be 0 (in fact you can probably make everything unsigned now
> that you've sorted out the overflows).
Not in v2:
val = min(vmx->ple_window, ple_window_actual_max);
val += ple_window_grow;
vmx->ple_window = val;
so we need to dip below zero to allow all possible grows.
(I'm not sure if anyone is ever going to use the additive option, so
getting rid of it is also a valid choice -- code would be nicer.)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists