On Wed, Apr 17, 2019 at 02:59:43PM +0200, Paolo Bonzini wrote: > On 16/04/19 22:32, Sean Christopherson wrote: > > +static bool __read_mostly lapic_timer_advance_autotune = true; > > +module_param(lapic_timer_advance_autotune, bool, S_IRUGO | S_IWUSR); > > + > > Could we just have lapic_timer_advance_ns = 0 mean "adaptive tuning, > starting from a default of 1000" and anything else mean "no tuning, just > use this value"? Originally I implemented a variation of that, except I disabled autotuning if lapic_timer_advance_ns was set to anything other than the default. Liran requested a separate param since the behavior was admittedly a bit sneaky, and I didn't have a strong opinion either way, so here we are. I think 'lapic_timer_advance_ns = 0' should be used to disable the advancement. What if we make the param a signed int and have '-1' select the "adaptive tuning ..." option? That could also be the default. It saves a param and is hopefully more intuitive than what I originally proposed.