Date: Wed, 4 Jan 2006 06:27:22 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 89128 for review Message-ID: <200601040627.k046RMUp067389@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601040627.k046RMUp067389>