From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Saket Dumbre <saket.dumbre@intel.com>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ACPI: OSL: ratelimit ACPICA kernel messages
Date: Tue, 18 Feb 2025 19:19:43 +0000 [thread overview]
Message-ID: <9844dd71-4969-4115-bc8c-63ced7d61bbf@gmail.com> (raw)
In-Reply-To: <CAJZ5v0i6m6B4D_TGCkNu69SJbTdQ5vq0QzjYtHqKZpiaCnGSOA@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2414 bytes --]
On 18/02/2025 19:13, Rafael J. Wysocki wrote:
> +Saket Dumbre
>
> On Thu, Feb 13, 2025 at 7:16 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>>
>> In cases where the ACPI AML contains errors there can be quite a large
>> amount of ACPICA kernel log spamming.
>
> Except when someone wants to see them all which also happens.
>
> And wouldn't this also rate limit debug messages from ACPICA
> specifically enabled via the kernel command line?
>
> If so, I'd rather find a way to tell ACPICA to be less verbose.
Yep, makes sense Rafael. The crux of the matter is that there should be
some way to reduce repeated identical "ACPI BIOS Error" messages,
especially when the AML is triggering this 10+ times a second :-)
Colin
>
>> Reduce this by rate limiting the messages.
>>
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
>> drivers/acpi/osl.c | 20 ++++++++++++--------
>> 1 file changed, 12 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
>> index 5ff343096ece..d4ece68e0fd6 100644
>> --- a/drivers/acpi/osl.c
>> +++ b/drivers/acpi/osl.c
>> @@ -159,17 +159,21 @@ void __printf(1, 0) acpi_os_vprintf(const char *fmt, va_list args)
>> if (acpi_in_debugger) {
>> kdb_printf("%s", buffer);
>> } else {
>> - if (printk_get_level(buffer))
>> - printk("%s", buffer);
>> - else
>> - printk(KERN_CONT "%s", buffer);
>> + if (printk_ratelimit()) {
>> + if (printk_get_level(buffer))
>> + printk("%s", buffer);
>> + else
>> + printk(KERN_CONT "%s", buffer);
>> + }
>> }
>> #else
>> if (acpi_debugger_write_log(buffer) < 0) {
>> - if (printk_get_level(buffer))
>> - printk("%s", buffer);
>> - else
>> - printk(KERN_CONT "%s", buffer);
>> + if (printk_ratelimit()) {
>> + if (printk_get_level(buffer))
>> + printk("%s", buffer);
>> + else
>> + printk(KERN_CONT "%s", buffer);
>> + }
>> }
>> #endif
>> }
>> --
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 4901 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
prev parent reply other threads:[~2025-02-18 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 18:16 Colin Ian King
2025-02-18 19:13 ` Rafael J. Wysocki
2025-02-18 19:19 ` Colin King (gmail) [this message]
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=9844dd71-4969-4115-bc8c-63ced7d61bbf@gmail.com \
--to=colin.i.king@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=saket.dumbre@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
all inboxes | Powered by JetHome®