On 11/20/2024 10:49 AM, Rafael J. Wysocki wrote:
I thought about something on the order of 199 us, but now I'm thinking
that 50 us would work too. Less than this - I'm not sure.
50 usec is likely more than enough in practice.
And would you use the same slack value regardless of the sleep
duration, or make it somehow depend on the sleep duration?
I don't see why you'd make it dependent on the sleep duration
sure in theory the longer the sleep -- you could pick a fixed percentage
but you're trying to amortize a theoretical timer register write, and a
cpu wakeup. the timer write is fixed cost and not THAT expensive after
some amount of this . the C state wake up --- sure that is more variable
but that is super important for high occurance things (thousands to millions
of times per hour).
If your ACPI sleeps are high occurance on a system I suspect you have way
bigger problems than an occasional extra wakeup