lib/reed_solomon/test_rslib.c | 4 ++++ 1 file changed, 4 insertions(+)
The test has been prone to softlockup but stayed unnoticed because
of the printk calls during the test resets the soflockup watchdog by
calling touch_nmi_watchdog(). With the commit b63e6f60eab4 ("serial:
8250: Switch to nbcon console"), the printk calls no longer suppress
the softlockup and warnings can be observed more evidently that shows
the test needs more scheduling points.
Provide scheduling points by adding cond_resched() for each test
iteration on their up to/beyond error correction capacity.
Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
---
Hi!
The discussion on how the printk was preventing
the softlockup can be found here [0].
Sincerely,
Ryo Takakura
[0] https://lore.kernel.org/all/202501221029.fb0d574d-lkp@intel.com/
---
lib/reed_solomon/test_rslib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/reed_solomon/test_rslib.c b/lib/reed_solomon/test_rslib.c
index 75cb1adac..322d7b0a8 100644
--- a/lib/reed_solomon/test_rslib.c
+++ b/lib/reed_solomon/test_rslib.c
@@ -306,6 +306,8 @@ static void test_uc(struct rs_control *rs, int len, int errs,
if (memcmp(r, c, len * sizeof(*r)))
stat->dwrong++;
+
+ cond_resched();
}
stat->nwords += trials;
}
@@ -400,6 +402,8 @@ static void test_bc(struct rs_control *rs, int len, int errs,
} else {
stat->rfail++;
}
+
+ cond_resched();
}
stat->nwords += trials;
}
--
2.34.1
On Sat 2025-05-10 10:35:15, Ryo Takakura wrote:
> The test has been prone to softlockup but stayed unnoticed because
> of the printk calls during the test resets the soflockup watchdog by
> calling touch_nmi_watchdog(). With the commit b63e6f60eab4 ("serial:
> 8250: Switch to nbcon console"), the printk calls no longer suppress
> the softlockup and warnings can be observed more evidently that shows
> the test needs more scheduling points.
>
> Provide scheduling points by adding cond_resched() for each test
> iteration on their up to/beyond error correction capacity.
>
We should add here:
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202501221029.fb0d574d-lkp@intel.com
> Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
Otherwise, it looks good to me:
Reviewed-by: Petr Mladek <pmladek@suse.com>
Thanks a lot for nailing it down.
Best Regards,
Petr
On Mon, 12 May 2025 13:47:08 +0200, Petr Mladek wrote:
>On Sat 2025-05-10 10:35:15, Ryo Takakura wrote:
>> The test has been prone to softlockup but stayed unnoticed because
>> of the printk calls during the test resets the soflockup watchdog by
>> calling touch_nmi_watchdog(). With the commit b63e6f60eab4 ("serial:
>> 8250: Switch to nbcon console"), the printk calls no longer suppress
>> the softlockup and warnings can be observed more evidently that shows
>> the test needs more scheduling points.
>>
>> Provide scheduling points by adding cond_resched() for each test
>> iteration on their up to/beyond error correction capacity.
>>
>
>We should add here:
>
>Reported-by: kernel test robot <oliver.sang@intel.com>
>Closes: https://lore.kernel.org/oe-lkp/202501221029.fb0d574d-lkp@intel.com
>
>> Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
>
>Otherwise, it looks good to me:
>
>Reviewed-by: Petr Mladek <pmladek@suse.com>
>
>Thanks a lot for nailing it down.
I totally forgot the Reported-by and Closes, thanks!
I'll add them along with your Reviewed-by.
Sincerely,
Ryo Takakura
>Best Regards,
>Petr
On 2025-05-10, Ryo Takakura <ryotkkr98@gmail.com> wrote:
> The test has been prone to softlockup but stayed unnoticed because
> of the printk calls during the test resets the soflockup watchdog by
> calling touch_nmi_watchdog(). With the commit b63e6f60eab4 ("serial:
> 8250: Switch to nbcon console"), the printk calls no longer suppress
> the softlockup and warnings can be observed more evidently that shows
> the test needs more scheduling points.
>
> Provide scheduling points by adding cond_resched() for each test
> iteration on their up to/beyond error correction capacity.
>
> Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
FWIW:
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Thanks for getting to the bottom of this.
On Mon, 12 May 2025 10:22:45 +0206, John Ogness wrote:
>On 2025-05-10, Ryo Takakura <ryotkkr98@gmail.com> wrote:
>> The test has been prone to softlockup but stayed unnoticed because
>> of the printk calls during the test resets the soflockup watchdog by
>> calling touch_nmi_watchdog(). With the commit b63e6f60eab4 ("serial:
>> 8250: Switch to nbcon console"), the printk calls no longer suppress
>> the softlockup and warnings can be observed more evidently that shows
>> the test needs more scheduling points.
>>
>> Provide scheduling points by adding cond_resched() for each test
>> iteration on their up to/beyond error correction capacity.
>>
>> Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
>
>FWIW:
>
>Reviewed-by: John Ogness <john.ogness@linutronix.de>
I'll add it. Thanks!
>Thanks for getting to the bottom of this.
I found it was quite interesting.
So thanks John and Petr for many feedbacks!
Sincerely,
Ryo Takakura
© 2016 - 2025 Red Hat, Inc.