Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 10 Apr 2001 07:41:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 10 Apr 2001 07:41:05 -0400 Received: from d12lmsgate.de.ibm.com ([195.212.91.199]:56197 "EHLO d12lmsgate.de.ibm.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Tue, 10 Apr 2001 07:40:57 -0400 From: schwidefsky@de.ibm.com X-Lotus-FromDomain: IBMDE To: Alan Cox cc: ak@suse.de (Andi Kleen), mbs@mc.com (Mark Salisbury), jdike@karaya.com (Jeff Dike), linux-kernel@vger.kernel.org Message-ID: Date: Tue, 10 Apr 2001 13:38:43 +0200 Subject: Re: No 100 HZ timer ! Mime-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-transfer-encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >> Just how would you do kernel/user CPU time accounting then ? It's currently done >> on every timer tick, and doing it less often would make it useless. > >On the contrary doing it less often but at the right time massively improves >its accuracy. You do it on reschedule. An rdtsc instruction is cheap and all >of a sudden you have nearly cycle accurate accounting If you do the accounting on reschedule, how do you find out how much time has been spent in user versus kernel mode? Or do the Intel chips have two counters, one for user space execution and one for the kernel? blue skies, Martin Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH Sch?naicherstr. 220, D-71032 B?blingen, Telefon: 49 - (0)7031 - 16-2247 E-Mail: schwidefsky@de.ibm.com - 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/