Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760116AbXKCIyu (ORCPT ); Sat, 3 Nov 2007 04:54:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756455AbXKCIyo (ORCPT ); Sat, 3 Nov 2007 04:54:44 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:54292 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755568AbXKCIyn (ORCPT ); Sat, 3 Nov 2007 04:54:43 -0400 Date: Sat, 3 Nov 2007 09:54:20 +0100 From: Ingo Molnar To: Paul Mackerras Cc: Peter Zijlstra , Thomas Gleixner , Christian Borntraeger , Martin Schwidefsky , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org Subject: Re: [PATCH] Restore deterministic CPU accounting on powerpc Message-ID: <20071103085420.GA14551@elte.hu> References: <18218.44089.274628.680088@cargo.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18218.44089.274628.680088@cargo.ozlabs.ibm.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.1.7-deb -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 31 * Paul Mackerras wrote: > Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the > deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been > broken on powerpc, because we end up counting user time twice: once in > timer_interrupt() and once in update_process_times(). > > This fixes the problem by pulling the code in update_process_times > that updates utime and stime into a separate function called > account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined, > there is a version of account_process_tick in kernel/timer.c that > simply accounts a whole tick to either utime or stime as before. If > CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to > implement account_process_tick. > > This also lets us simplify the s390 code a bit; it means that the s390 > timer interrupt can now call update_process_times even when > CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a > suitable account_process_tick(). > > Signed-off-by: Paul Mackerras lets push this towards Linus via the scheduler tree, ok? Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/