Re: [PATCH RESEND] x86/split_lock: Warn for bus locks once for each task
From: Maksim Davydov
Date: Thu Oct 02 2025 - 08:58:35 EST
On 9/17/25 18:37, Pedro Falcato wrote:
On Wed, Sep 17, 2025 at 05:41:11PM +0300, Maksim Davydov wrote:
Hi!
Hi!
I've tested this patch (VM w/ bus lock detection and w/o split lock
detection). The warn mode works fine and as expected with only one
notification per task. However, the ratelimit mode has been changed too:
only one notification per task will be in dmesg, because this mode reuses
notification code of warn mode. But in the documentation for ratelimit mode
there is nothing about the limit of notifications: "Limit bus lock rate to N
bus locks per second system wide and warn on bus locks.". Thus, I think that
ratelimit mode should remain old behaviour.
So, you're suggesting different "warn" behaviors depending on =warn vs
=ratelimit? I don't have a particularly strong opinion here, but I was assuming
that "warn on bus locks" means "do whatever =warn is supposed to do". I'm not
sure warning every time gains you much, though.
For me, it's ok to reduce the number of messages to one per task.
By the way, I read the patch again and noticed that split_lock_warn()
and handle_bus_lock() print messages in the same way. Maybe, it'll be
better to implement an auxiliary wrapper for printing
split_lock/bus_lock warning messages (for example,
print_sl_warn_once()), what do you think?
--
Best regards,
Maksim Davydov