PERFORCE change 89128 for review
Kip Macy
kmacy at FreeBSD.org
Tue Jan 3 22:27:23 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=89128
Change 89128 by kmacy at 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;
}
/*
More information about the p4-projects
mailing list