Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbYKKWi3 (ORCPT ); Tue, 11 Nov 2008 17:38:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751235AbYKKWiS (ORCPT ); Tue, 11 Nov 2008 17:38:18 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:44971 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbYKKWiR (ORCPT ); Tue, 11 Nov 2008 17:38:17 -0500 Subject: Re: [PATCH] convert cnt32_to_63 to inline From: Peter Zijlstra To: David Howells Cc: Mathieu Desnoyers , Nicolas Pitre , Andrew Morton , torvalds@linux-foundation.org, rmk+lkml@arm.linux.org.uk, mingo@elte.hu, linux-kernel@vger.kernel.org, ralf@linux-mips.org, benh@kernel.crashing.org, paulus@samba.org, davem@davemloft.net, mingo@redhat.com, tglx@linutronix.de, rostedt@goodmis.org, linux-arch@vger.kernel.org In-Reply-To: <8896.1226442702@redhat.com> References: <20081111182759.GA8052@Krystal> <20081109064855.GA23782@Krystal> <20081109162250.GB10181@Krystal> <20081109204256.89ab7925.akpm@linux-foundation.org> <20081110135850.0d620f3c.akpm@linux-foundation.org> <20081110152221.64948d23.akpm@linux-foundation.org> <8896.1226442702@redhat.com> Content-Type: text/plain Date: Tue, 11 Nov 2008 23:37:30 +0100 Message-Id: <1226443050.6696.12.camel@lappy.programming.kicks-ass.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 878 Lines: 20 On Tue, 2008-11-11 at 22:31 +0000, David Howells wrote: > Mathieu Desnoyers wrote: > > > @@ -52,18 +57,22 @@ unsigned long long sched_clock(void) > > ... > > + preempt_disable_notrace(); > > Please, no! sched_clock() is called with preemption or interrupts disabled > everywhere except from some debugging code (lock tracing IIRC). If you need > to insert this preemption disablement somewhere, please insert it there. At > least then sched_clock() will be called consistently. Agreed. You could do a WARN_ON(!in_atomic); in sched_clock() depending on DEBUG_PREEMPT or something to ensure this. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/