Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2008 12:07:45 +0200
From:      "Attilio Rao" <attilio@freebsd.org>
To:        "Jung-uk Kim" <jkim@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r184108 - head/sys/i386/i386
Message-ID:  <3bbf2fe10810210307t664cc8a2s62606f03427286f3@mail.gmail.com>
In-Reply-To: <200810210431.m9L4V7Pb088978@svn.freebsd.org>
References:  <200810210431.m9L4V7Pb088978@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2008/10/21, Jung-uk Kim <jkim@freebsd.org>:
> Author: jkim
>  Date: Tue Oct 21 04:31:07 2008
>  New Revision: 184108
>  URL: http://svn.freebsd.org/changeset/base/184108
>
>  Log:
>   Fix 'kern.timeconter.invariant_tsc' tunable and back out a redundant hack.
>   Somehow incomplete version was committed. :-(
>
>  Modified:
>   head/sys/i386/i386/tsc.c
>
>  Modified: head/sys/i386/i386/tsc.c
>  ==============================================================================
>  --- head/sys/i386/i386/tsc.c    Tue Oct 21 03:18:02 2008        (r184107)
>  +++ head/sys/i386/i386/tsc.c    Tue Oct 21 04:31:07 2008        (r184108)
>  @@ -53,7 +53,8 @@ u_int         tsc_present;
>   static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag;
>
>   SYSCTL_INT(_kern_timecounter, OID_AUTO, invariant_tsc, CTLFLAG_RDTUN,
>  -    &tsc_is_invariant, 0, "Indicates the TSC is P-state invariant");
>  +    &tsc_is_invariant, 0, "Indicates whether the TSC is P-state invariant");
>  +TUNABLE_INT("kern.timecounter.invariant_tsc", &tsc_is_invariant);
>
>   #ifdef SMP
>   static int     smp_tsc;
>  @@ -111,9 +112,8 @@ init_TSC(void)
>         set_cputicker(rdtsc, tsc_freq, 1);
>
>         /* Register to find out about changes in CPU frequency. */
>  -       if (!tsc_is_invariant)
>  -               tsc_pre_tag = EVENTHANDLER_REGISTER(cpufreq_pre_change,
>  -                   tsc_freq_changing, NULL, EVENTHANDLER_PRI_FIRST);
>  +       tsc_pre_tag = EVENTHANDLER_REGISTER(cpufreq_pre_change,
>  +           tsc_freq_changing, NULL, EVENTHANDLER_PRI_FIRST);
>         tsc_post_tag = EVENTHANDLER_REGISTER(cpufreq_post_change,
>             tsc_freq_changed, NULL, EVENTHANDLER_PRI_FIRST);
>         tsc_levels_tag = EVENTHANDLER_REGISTER(cpufreq_levels_changed,
>

Something we could do with this is adding a "quirk" table of TSC arch
dependant known to be working (based on cpu_model and such) and use
that table in order to replace tsc_smp.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10810210307t664cc8a2s62606f03427286f3>