From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754595AbYFAOSv (ORCPT ); Sun, 1 Jun 2008 10:18:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753270AbYFAORZ (ORCPT ); Sun, 1 Jun 2008 10:17:25 -0400 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:4374 "EHLO spitz.ucw.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752035AbYFAORF (ORCPT ); Sun, 1 Jun 2008 10:17:05 -0400 Date: Sat, 31 May 2008 09:18:18 +0200 From: Pavel Machek To: Steven Rostedt Cc: Thomas Gleixner , LKML , linux-rt-users , akpm@osdl.org, Ingo Molnar , Clark Williams , Peter Zijlstra , "Luis Claudio R. Goncalves" , Gregory Haskins , Andi Kleen , Linus Torvalds Subject: Re: [PATCH] x86: enable preemption in delay Message-ID: <20080531071817.GB5405@ucw.cz> References: <20080525180122.GA4247@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2008-05-28 09:01:06, Steven Rostedt wrote: > > > On Sun, 25 May 2008, Pavel Machek wrote: > > > + 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