TSC as timecounter makes system lag

Jia-Shiun Li jiashiun at gmail.com
Fri Feb 24 14:50:51 UTC 2017


On Fri, Feb 24, 2017 at 9:32 PM, Jia-Shiun Li <jiashiun at gmail.com> wrote:

> On Fri, Feb 24, 2017 at 7:45 PM, Konstantin Belousov <kostikbel at gmail.com>
> wrote:
>
>> On Fri, Feb 24, 2017 at 12:15:26PM +0800, Jia-Shiun Li wrote:
>> > Tested working on E7400 against r313909. And changing timecounter
>> from/to
>> > TSC
>> > correctly enables/disables C2.
>> >
>> > The latter part cpu_disable_c2_sleep++ is not needed. When
>> > init_TSC_tc() got called timecounter is not yet tsc_timecounter.
>> > inittimecounter() later will do the work calling tc_windup().
>> >
>>
>> You mean, just this
>> -       if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL &&
>> +       if (cpu_vendor_id == CPU_VENDOR_INTEL &&
>> is enough to fix the issue ?  If yes, we can remove the cpu_deepest_sleep
>> variable.  This is John' observation, I think he would prefer to prepare
>> the patch.
>>
>
> Correct. That's enough.
>
>
Since that's simple enough... patch attached.
Tested against r313909 too.

-Jia-Shiun.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-tsc-timecounter.patch
Type: application/octet-stream
Size: 2768 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20170224/c75567f8/attachment.obj>


More information about the freebsd-current mailing list