Commit c1e4ed23 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ia32 sched_clock() deadlock fix

From: Ingo Molnar <mingo@elte.hu>,

Voyager is getting odd deadlocks due to the taking of xtime_lock() in
sched_clock()->get_jiffies_64().

I had this patch queued up to fix a different deadlock, which occurs when we
relax the requirement that TSC's be synchronised across CPUs.  But it will
fix James' deadlock too.
parent c358e219
......@@ -140,7 +140,8 @@ unsigned long long sched_clock(void)
#ifndef CONFIG_NUMA
if (!use_tsc)
#endif
return (unsigned long long)get_jiffies_64() * (1000000000 / HZ);
/* no locking but a rare wrong value is not a big deal */
return jiffies_64 * (1000000000 / HZ);
/* Read the Time Stamp Counter */
rdtscll(this_offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment