Messages in this thread Patch in this message | | | Subject | Re: [PATCH] convert cnt32_to_63 to inline | From | Peter Zijlstra <> | Date | Tue, 11 Nov 2008 23:37:30 +0100 |
| |
On Tue, 2008-11-11 at 22:31 +0000, David Howells wrote: > Mathieu Desnoyers <mathieu.desnoyers@polymtl.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.
| |