[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0811112012190.12838@gandalf.stny.rr.com>
Date: Tue, 11 Nov 2008 20:13:45 -0500 (EST)
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc: David Howells <dhowells@...hat.com>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Nicolas Pitre <nico@....org>,
Andrew Morton <akpm@...ux-foundation.org>,
torvalds@...ux-foundation.org, rmk+lkml@....linux.org.uk,
mingo@...e.hu, linux-kernel@...r.kernel.org, ralf@...ux-mips.org,
benh@...nel.crashing.org, paulus@...ba.org, davem@...emloft.net,
mingo@...hat.com, tglx@...utronix.de, linux-arch@...r.kernel.org
Subject: Re: [PATCH] convert cnt32_to_63 to inline
On Tue, 11 Nov 2008, Peter Zijlstra wrote:
> On Tue, 2008-11-11 at 22:31 +0000, David Howells wrote:
> > Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> 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.
It would also be nice if this requirement (calling sched_clock with
preemption disabled) was documented somewhere more obvious.
Doing as Peter suggested, adding a WARN_ON and documenting that this must
be called with preemption disabled, would be nice.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists