Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2022 21:43:30 -0500
From:      Alexander Motin <mav@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: cb1f5d11366d - main - Reduce minimum idle hardclock rate from 2Hz to 1Hz.
Message-ID:  <18820cc0-8575-a678-84f6-5bca2c0b0498@FreeBSD.org>
In-Reply-To: <Ydua/rfx6Mvhmbf2@kib.kiev.ua>
References:  <202201100026.20A0Q1fs045878@gitrepo.freebsd.org> <Ydua/rfx6Mvhmbf2@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18820cc0-8575-a678-84f6-5bca2c0b0498>