Bonjour Jean-Francois, On Fri, Sep 20, 2002 at 12:30:18PM +0200, lemerrjf wrote: > I have tried pfmon on a Tiger machine with 4 CPUs. > it works pretty well on a kernel 2.4.18 > > However on a kernel 2.5.35, I obtain, with the command > > pfmon --system-wide > > Thread does not run on correct CPU: 0 instead of 1 > Thread does not run on correct CPU: 0 instead of 2 > Thread does not run on correct CPU: 0 instead of 3 > > I observe the same problem with other kernels adding the > "multiple run queue" functionnalities. > > Have you observed the same problem? Obviously this has not been tested with 2.5.x. Keep in mind that this is a development (unstable) kernel. The problem is not in the kernel but in pfmon. The routine that retrieves the current CPU is bogus. From 2.4.x to 2.5.x the content of /proc/pid/stat has changed and this exposed a bug in pfmon/pfmon_util.c:find_cpu(). The thread is indeed running on the right CPU. You can apply the attached patch to pfmon-1.1 to fix the problem with pfmon. Note that this fix works for both 2.4.x and 2.5.x Thanks for finding this problem. -- -Stephane