kernel-hacking-2024-linux-s.../arch
[MIPS] James E Wilson e1701fb2e2 [PATCH] Fix BCM1480 doubled process accounting times.
Running a UP kernel on a bcm1480 board, I get nonsensical timing
results, like this:
release@unknown:~/tmp$ time ./a.out
real    0m22.906s
user    0m45.792s
sys     0m0.010s
According to my watch, this program took 23 seconds to run, so the real
time clock is OK.  It is process accounting that is broken.

I tracked this down to a problem with the function
bcm1480_timer_interrupt in the file sibyte/bcm1480/time.c.  This
function calls ll_timer_interrupt for cpu0, and ll_local_timer_interrupt
for all cpus.  However, both of these functions do process accounting.
Thus processes running on cpu0 end up with doubled times.  This is very
obvious in a UP kernel where all processes run on cpu0.

The correct way to do this is to only call ll_local_timer interrupt if
this is not cpu0.  This can be seen in the mips-board/generic/time.c
file, and also in the sibyte/sb1250/time.c file, both of which handle
this correctly.  I fixed the bcm1480/time.c file by copying over the
correct code from the sb1250/time.c file.

With this fix, I now get sensible results.
release@unknown:~/tmp$ time ./a.out
real    0m22.903s
user    0m22.894s
sys     0m0.006s

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-06-19 17:39:16 +01:00
..
alpha [PATCH] alpha: generic hweight build fix 2006-06-12 15:17:53 -07:00
arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-06-12 13:45:41 -07:00
arm26 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
cris [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
frv [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
h8300 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
i386 [PATCH] Fix HPET operation on 32-bit NVIDIA platforms 2006-06-08 15:12:21 -07:00
ia64 [IA64] one-line cleanup on set_irq_affinity_info 2006-05-17 06:20:59 -07:00
m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
m68k [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
m68knommu [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
mips [PATCH] Fix BCM1480 doubled process accounting times. 2006-06-19 17:39:16 +01:00
parisc [PARISC] Add new entries to the syscall table 2006-04-21 22:20:35 +00:00
powerpc [PATCH] powerpc: Fix 64k pages on non-partitioned machines 2006-06-17 10:56:24 -07:00
ppc ppc: Fix typo in TI_LOCAL_FLAGS definition 2006-05-29 08:42:34 +10:00
s390 [PATCH] s390: fix typo in stop_hz_timer. 2006-05-25 12:09:55 -07:00
sh [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sh64 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sparc [SPARC]: Migration cost tune up in sparc smp. 2006-06-10 22:03:43 -07:00
sparc64 [SPARC64]: Do not double-export sys_close() when CONFIG_SOLARIS_EMUL_MODULE 2006-06-11 21:05:25 -07:00
um [PATCH] uml: add -ffreestanding to CFLAGS 2006-06-05 12:29:17 -07:00
v850 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
x86_64 [PATCH] Fix HPET operation on 64-bit NVIDIA platforms 2006-06-08 15:12:21 -07:00
xtensa [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00