Re: git: cb1f5d11366d - main - Reduce minimum idle hardclock rate from 2Hz to 1Hz.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Mon, 10 Jan 2022 02:43:30 UTC
On 09.01.2022 21:33, Konstantin Belousov wrote:
> On Mon, Jan 10, 2022 at 12:26:01AM +0000, Alexander Motin wrote:
>> The branch main has been updated by mav:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=cb1f5d11366dc9b803f2755d83fe02599830882a
>>
>> commit cb1f5d11366dc9b803f2755d83fe02599830882a
>> Author:     Alexander Motin <mav@FreeBSD.org>
>> AuthorDate: 2022-01-10 00:17:43 +0000
>> Commit:     Alexander Motin <mav@FreeBSD.org>
>> CommitDate: 2022-01-10 00:25:56 +0000
>>
>>     Reduce minimum idle hardclock rate from 2Hz to 1Hz.
>>     
>>     On idle 80-thread system it allows to improve package-level idle state
>>     residency and so power consumption by several percent.
> Are you sure that this is safe?
> 
> Our timecounters are tailored to wrap at 1sec, at least the most precise/
> important TSC-low is.  If idle system interrupts with 1Hz frequency,
> it probably comes dangerously close to situations where tc_windup() could
> be missed.

That particular timecounters wrap around should be handled there long
ago with tc_min_ticktock_freq.  When needed it should increase hardclock
on BSP (could be any other CPU, so why not BSP) up to the minimally safe
rate.

-- 
Alexander Motin