From: Arjan van de Ven <arjan@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
anna-maria@linutronix.de, tglx@linutronix.de,
peterz@infradead.org, frederic@kernel.org, corbet@lwn.net,
akpm@linux-foundation.org, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Len Brown <len.brown@intel.com>,
Todd Brandt <todd.e.brandt@intel.com>
Subject: Re: [PATCH v2] ACPI: Replace msleep() with usleep_range() in acpi_os_sleep().
Date: Wed, 20 Nov 2024 11:18:41 -0800 [thread overview]
Message-ID: <593c4be2-c21e-49fa-8bf7-a614c01c8e66@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0h5=3LMVCa8kSoomNyF9r_7HLmpkH+YhYEO_N7H6-hAGQ@mail.gmail.com>
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
next prev parent reply other threads:[~2024-11-20 19:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 23:11 [PATCH v2] ACPI: Replace msleep() with usleep_range() in acpi_os_sleep() Len Brown
2024-11-18 11:03 ` Rafael J. Wysocki
2024-11-18 11:38 ` Hans de Goede
2024-11-18 12:02 ` Rafael J. Wysocki
2024-11-18 12:10 ` Hans de Goede
2024-11-18 12:22 ` Rafael J. Wysocki
2024-11-20 9:01 ` Pierre Gondois
2024-11-20 12:06 ` Dietmar Eggemann
2024-11-20 12:59 ` Pierre Gondois
2024-11-18 14:35 ` Arjan van de Ven
2024-11-19 13:42 ` Rafael J. Wysocki
2024-11-19 15:08 ` Arjan van de Ven
2024-11-20 18:03 ` Rafael J. Wysocki
2024-11-20 18:37 ` Arjan van de Ven
2024-11-20 18:49 ` Rafael J. Wysocki
2024-11-20 18:54 ` Len Brown
2024-11-20 19:27 ` Rafael J. Wysocki
2024-11-20 19:18 ` Arjan van de Ven [this message]
2024-11-20 19:41 ` Rafael J. Wysocki
2024-11-21 10:33 ` Len Brown
2024-11-20 18:35 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=593c4be2-c21e-49fa-8bf7-a614c01c8e66@linux.intel.com \
--to=arjan@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=corbet@lwn.net \
--cc=frederic@kernel.org \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=todd.e.brandt@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox