[lkml]   [2014]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH 11/15] x86: Rewrite cyc2ns to avoid the need to disable IRQs
On 17 June 2014 17:45, Peter Zijlstra <> wrote:
> Ah, just a freeze?

As per what he reported and his screen dumps, looks like yes a
freeze. IOW, no prints at all on terminal, even the ones issued
before reaching set_cyc2ns_scale()..

>> CPUs: Only two CPUs, sharing clock line
> What's specific to this particular CPU?

You meant why I mentioned this information? Nothing specific
actually, just mentioned it to make all information available that
might be useful .. Probably its not :)

> So what you can try is force a cyc2ns read before the write in
> set_cyc2ns_scale(). I think its possible that if we do not do the read,
> the write will wait for a 'free' slot indefinitely.

Hmm, I see. Thanks for your quick response.

Are you suggesting something like this ? :

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 57e5ce1..290ac03 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -249,6 +249,9 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
if (!cpu_khz)
goto done;

+ data = cyc2ns_read_begin();
+ cyc2ns_read_end(data);
data = cyc2ns_write_begin(cpu);


@Mauro: Please try this once Peter confirms.


 \ /
  Last update: 2014-06-17 15:21    [W:0.178 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site