From owner-p4-projects@FreeBSD.ORG Wed Jan 4 06:27:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1677C16A423; Wed, 4 Jan 2006 06:27:23 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0D4316A420 for ; Wed, 4 Jan 2006 06:27:22 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FA6943D58 for ; Wed, 4 Jan 2006 06:27:22 +0000 (GMT) (envelope-from kmacy@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 k046RMtB067392 for ; Wed, 4 Jan 2006 06:27:22 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k046RMUp067389 for perforce@freebsd.org; Wed, 4 Jan 2006 06:27:22 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 4 Jan 2006 06:27:22 GMT Message-Id: <200601040627.k046RMUp067389@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 89128 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2006 06:27:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=89128 Change 89128 by kmacy@kmacy:freebsd7_xen3 on 2006/01/04 06:26:54 fix clock driver, VM time now correctly tracks wall clock and sleeps sleep for the right amount of time Affected files ... .. //depot/projects/xen3/src/sys/i386-xen/i386-xen/clock.c#2 edit Differences ... ==== //depot/projects/xen3/src/sys/i386-xen/i386-xen/clock.c#2 (text+ko) ==== @@ -319,20 +319,9 @@ ticks += (delta / NS_PER_TICK); delta = (delta % NS_PER_TICK); processed_system_time += ticks*NS_PER_TICK; + per_cpu(processed_system_time, cpu) += ticks*NS_PER_TICK; } hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - /* Local CPU jiffy work. */ - while (delta_cpu >= NS_PER_TICK) { - delta_cpu -= NS_PER_TICK; - per_cpu(processed_system_time, cpu) += NS_PER_TICK; -#if 0 - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); -#endif - } - - if (cpu != 0) - return; /* * Take synchronised time from Xen once a minute if we're not * synchronised ourselves, and we haven't chosen to keep an independent @@ -597,8 +586,7 @@ static uint32_t xen_get_timecount(struct timecounter *tc) { - __get_time_values_from_xen(); - return per_cpu(shadow_time, 0).tsc_timestamp; + return processed_system_time; } /*