Re: [PATCH v2 1/3] x86, sched: check for counters overflow in frequency invariant accounting

2020-10-22 Thread Peter Zijlstra
On Thu, Oct 22, 2020 at 02:21:58PM +0200, Giovanni Gherdovich wrote: > On Thu, 2020-10-22 at 10:46 +0200, Peter Zijlstra wrote: > > On Sun, May 31, 2020 at 08:24:51PM +0200, Giovanni Gherdovich wrote: > > > > Hi Giovanni! > > > > > +error: > > > + pr_warn("Scheduler frequency invariance went wobb

Re: [PATCH v2 1/3] x86, sched: check for counters overflow in frequency invariant accounting

2020-10-22 Thread Giovanni Gherdovich
On Thu, 2020-10-22 at 10:46 +0200, Peter Zijlstra wrote: > On Sun, May 31, 2020 at 08:24:51PM +0200, Giovanni Gherdovich wrote: > > Hi Giovanni! > > > +error: > > + pr_warn("Scheduler frequency invariance went wobbly, disabling!\n"); > > + schedule_work(&disable_freq_invariance_work); > > +}

Re: [PATCH v2 1/3] x86, sched: check for counters overflow in frequency invariant accounting

2020-10-22 Thread Peter Zijlstra
On Sun, May 31, 2020 at 08:24:51PM +0200, Giovanni Gherdovich wrote: Hi Giovanni! > +error: > + pr_warn("Scheduler frequency invariance went wobbly, disabling!\n"); > + schedule_work(&disable_freq_invariance_work); > +} I'm getting reports that we trigger this on resume. Would it make se

Re: [PATCH v2 1/3] x86, sched: check for counters overflow in frequency invariant accounting

2020-06-03 Thread Rafael J. Wysocki
On Sun, May 31, 2020 at 8:26 PM Giovanni Gherdovich wrote: > > The product mcnt * arch_max_freq_ratio can overflows u64. > > For context, a large value for arch_max_freq_ratio would be 5000, > corresponding to a turbo_freq/base_freq ratio of 5 (normally it's more like > 1500-2000). A large increme

[PATCH v2 1/3] x86, sched: check for counters overflow in frequency invariant accounting

2020-05-31 Thread Giovanni Gherdovich
The product mcnt * arch_max_freq_ratio can overflows u64. For context, a large value for arch_max_freq_ratio would be 5000, corresponding to a turbo_freq/base_freq ratio of 5 (normally it's more like 1500-2000). A large increment frequency for the MPERF counter would be 5GHz (the base clock of all