Re: [PATCH] x86: enable preemption in delay

From
Pavel Machek <hidden>
Date
2008-06-01 14:18:51
Also in
lkml
Reply to
Steven Rostedt, 2008-05-28
On Wed 2008-05-28 09:01:06, Steven Rostedt wrote:

On Sun, 25 May 2008, Pavel Machek wrote:
quoted
quoted
+		if (unlikely(cpu != smp_processor_id())) {
+			if (loops <= TSC_MIGRATE_COUNT)
+				break;
+			cpu = smp_processor_id();
+			rdtscl(bclock);
+			loops -= TSC_MIGRATE_COUNT;
+		} else {
+			rdtscl(now);
+			if ((now - bclock) >= loops)
+				break;
+			loops -= (now - bclock);
+			bclock = now;
What happens with different cpus running on different frequencies...?
Cpufreq?
It's not even protected with the old code.
Maybe, but it is simple to fix as long as preemption is disabled. When
you enable it, it becomes much harder.

Lets get that fixed.
							Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Thread (19 messages) 19 messages, 5 authors, last reply 2008-06-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help