Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-23 Thread Viresh Kumar
On 18-04-19, 16:11, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are problems with running time_cpufreq_notifier() on SMP > systems. > > First off, the rdtsc() called from there runs on the CPU executing > that code and not necessarily on the CPU whose sched_clock() rate is > upd

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-23 Thread Viresh Kumar
On 23-04-19, 10:19, Rafael J. Wysocki wrote: > On Mon, Apr 22, 2019 at 10:17 AM Viresh Kumar wrote: > > > > On 18-04-19, 16:11, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > > > There are problems with running time_cpufreq_notifier() on SMP > > > systems. > > > > > > First off, t

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-23 Thread Rafael J. Wysocki
On Mon, Apr 22, 2019 at 10:17 AM Viresh Kumar wrote: > > On 18-04-19, 16:11, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > There are problems with running time_cpufreq_notifier() on SMP > > systems. > > > > First off, the rdtsc() called from there runs on the CPU executing > > that

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-22 Thread Viresh Kumar
On 18-04-19, 16:11, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are problems with running time_cpufreq_notifier() on SMP > systems. > > First off, the rdtsc() called from there runs on the CPU executing > that code and not necessarily on the CPU whose sched_clock() rate is > upd

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-18 Thread Rafael J. Wysocki
On Thu, Apr 18, 2019 at 8:40 PM Borislav Petkov wrote: > > On Thu, Apr 18, 2019 at 04:11:37PM +0200, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > There are problems with running time_cpufreq_notifier() on SMP > > systems. > > Just a stupid question: that must be some old rust you'

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-18 Thread Borislav Petkov
On Thu, Apr 18, 2019 at 04:11:37PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are problems with running time_cpufreq_notifier() on SMP > systems. Just a stupid question: that must be some old rust you're fixing because we set X86_FEATURE_CONSTANT_TSC on almost anything t

[PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-18 Thread Rafael J. Wysocki
From: Rafael J. Wysocki There are problems with running time_cpufreq_notifier() on SMP systems. First off, the rdtsc() called from there runs on the CPU executing that code and not necessarily on the CPU whose sched_clock() rate is updated which is questionable at best. Second, in the cases whe