Re: [PATCH 1/1] x86/split_lock: add the source of exception to warning logs

From: Dongli Zhang
Date: Fri Feb 23 2024 - 22:20:15 EST


Hi Dave,

On 2/23/24 08:27, Dave Hansen wrote:
> On 2/23/24 01:47, Dongli Zhang wrote:
>> @@ -1194,11 +1195,11 @@ static void split_lock_warn(unsigned long ip)
>> bool handle_guest_split_lock(unsigned long ip)
>> {
>> if (sld_state == sld_warn) {
>> - split_lock_warn(ip);
>> + split_lock_warn(ip, true);
>> return true;
>> }
>
> I really despise random true/falses getting passed to functions.
>
> Wouldn't this be a lot easier to read if you just passed the string in:
>
> split_lock_warn(ip, "guest");
>
> rather than bools plus the ternary form dance?

Thank you very much!

I will send v2 after waiting if there is no further comment.

Dongli Zhang