From owner-cvs-src@FreeBSD.ORG Tue Mar 7 22:12:10 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4504416A420; Tue, 7 Mar 2006 22:12:10 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1C2D43D6B; Tue, 7 Mar 2006 22:12:09 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k27MC9QC037825; Tue, 7 Mar 2006 22:12:09 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k27MC95R037824; Tue, 7 Mar 2006 22:12:09 GMT (envelope-from jhb) Message-Id: <200603072212.k27MC95R037824@repoman.freebsd.org> From: John Baldwin Date: Tue, 7 Mar 2006 22:12:09 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/alpha/alpha clock.c src/sys/alpha/include pcpu.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 22:12:10 -0000 jhb 2006-03-07 22:12:09 UTC FreeBSD src repository Modified files: sys/alpha/alpha clock.c sys/alpha/include pcpu.h Log: Use the Alpha PCC as a cpu ticker for process runtime accounting. This is slightly more tricky than on x86 as although the PCC is 64-bits, it is not a simple 64-bit counter like the TSC. Instead, the upper 32-bits have PAL-defined behavior and the lower 32-bits run as a free-running 32-bit counter. To handle this, we detect overflows by maintaining a small amount of per-cpu state and use this to simulate the upper 32-bits of the counter providing a full 64-bit counter to the consumers of cpu_ticks(). Revision Changes Path 1.44 +26 -0 src/sys/alpha/alpha/clock.c 1.16 +3 -1 src/sys/alpha/include/pcpu.h