From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11747 invoked from network); 19 Oct 1999 16:14:04 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 19 Oct 1999 16:14:04 -0000 Received: from nn-pascal (nn-pascal.aston.ac.uk [134.151.59.49]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA10363 for ; Tue, 19 Oct 1999 12:14:03 -0400 Received: from hjorthl (helo=localhost) by nn-pascal with local-esmtp (Exim 2.12 #1) id 11dbrB-0003H8-00 for axp-list@redhat.com; Tue, 19 Oct 1999 17:11:25 +0100 Date: Tue, 19 Oct 1999 17:11:25 +0100 (BST) From: Lars Hjorth X-Sender: hjorthl@nn-pascal To: axp-list@redhat.com Subject: process time accounting Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII All, I have noticed a problem where the statistics about cpu-usage for the processes are invalid on my Compaq DS20 machine with Linux 2.2.9 SMP. The statistics will only take time used on the first processor but not on the second. Am I the only one to experience this? Quick test: Make sure both CPU's have been working. Do cat /proc/stats. This gives a printout that looks something like: cpu 2718 0 8127 5046643 cpu0 2718 0 8127 2517899 cpu1 0 0 0 2528744 ... The first line corresponds to total cpu usage and the columns to user, nice and system time. As you can see not a single "time-slice" have been accounted for cpu1. The same problem applies to per process statistics. I am not very well qualified in kernel debugging but I managed to find the following clues: * The macro smp_processor_id() (which is defined as current->processor) always returns zero in function smp_percpu_timer_interrupt (in file arch/alpha/kernel/smp.c) which is the function that should update the statistics. * The map between processor numbers and id's are okey. (and the inverse mapping too) * in the function handle_ipi the smp_processor_id() returns okey (both 0 and 1) Any ideas what I should check next? Grateful for any thoughts or ideas on this, Lars