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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>> > 		new = max(ple_window_actual_max, old) + ple_window_grow;
> Oh, I like that this can get rid of all overflows, ple_window_actual_max
> (PW_effective_max?) is going to be set to
> "ple_window_max [/-] ple_window_grow" in v2.
> 
>> > (I think the || in the first "if" can be eliminated with some creativity
>> > in clamp_ple_window_max).
> To do it, we'll want to intercept changes to ple_window as well.
> (I disliked this patch a lot even before :)

What about setting ple_window_actual_max to 0 if ple_window_grow is 0
(instead of just returning)?

Then the "if (ple_window_actual_max < ple_window)" will always fail and
you'll go through "new = ple_window".  But perhaps it's more gross and
worthless than creative. :)

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux