sysctl machdep.independent_wallclock

Mister Olli mister.olli at googlemail.com
Thu Jan 15 09:19:35 PST 2009


hi...


>         what is the exact function of this sysctl setting?
> 
> I'm guessing it's something to do with Xen, having seen a few
> references in Linux for xen.machdep.independent_wallclock. 
> 
> Have a look here:
> http://docs.xensource.com/XenServer/4.0.1/guest/ch04s06.html

yeah, I know that sysctl from linux, but I wasn't quite sure if it is
the same in FreeBSD, since it's known as 'xen.independent_wallclock' in
linux and 'machdep.independent_wallclock' in FreeBSD.

I started reading the C-code of FreeBSD, and from my understanding the
function 'should' be the same, as it's really linked to the clock
handling with XEN in FreeBSD.

but from my understanding it's not completly implemented in 8-CURRENT
(as of 15 jan 2009; see the last lines):
================================
/*
 * Write system time back to RTC.  
 */
static void
domu_resettodr(void)
{
        unsigned long tm;
        int s;
        dom0_op_t op;
        struct shadow_time_info *shadow;

        shadow = &per_cpu(shadow_time, smp_processor_id());
        if (xen_disable_rtc_set)
                return;
        
        s = splclock();
        tm = time_second;
        splx(s);
        
        tm -= tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0);
        
        if ((xen_start_info->flags & SIF_INITDOMAIN) &&
            !independent_wallclock)
        {
                op.cmd = DOM0_SETTIME;
                op.u.settime.secs        = tm;
                op.u.settime.nsecs       = 0;
                op.u.settime.system_time = shadow->system_timestamp;
                HYPERVISOR_dom0_op(&op);
                update_wallclock();
        } else if (independent_wallclock) {
                /* notyet */
                ;
        }               
}
================================
is that correct???

greetz
olli
>         



More information about the freebsd-questions mailing list