Re: BUG: using smp_processor_id() in preemptible [00000000] code: icedove-bin/5449

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, May 26, 2010 - 4:02 pm

On Tue, 25 May 2010 10:50:22 +0200
Peter Zijlstra <peterz@infradead.org> wrote:


NAK NAK NAK NAK!  QAK!  HAK!  Crap code!  Stop adding undocumented
interfaces.  Just stop it.  Now.  Geeze.

How is anyone supposed to use this?  What are the semantics of this
thing?  What are the units of its return value?  What is the base value
of its return value?  Does it return different times on different CPUs?
I assume so, otherwise why does sched_clock_cpu() exist?  <looks at
the sched_clock_cpu() documentation, collapses in giggles>

Because if it does return different times on different CPUs then any
and all of the sites which use it are going to need to cope with
time-going-backwards and I'm not at all confident that they get this
right.


Also, all these interfaces use a random mixture of `u64' and `unsigned
long long', but that's a far less serious problem.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: BUG: using smp_processor_id() in preemptible [00000000 ..., Andrew Morton, (Wed May 26, 4:02 pm)
Re: [PATCH] sched_clock: Provide local_clock() and improve ..., Johannes Stezenbach, (Fri May 28, 6:42 am)
[tip:sched/core] sched_clock: Add local_clock() API and im ..., tip-bot for Peter Zi ..., (Wed Jun 9, 3:13 am)