* [PATCH v2] rslib: Add scheduling points during the test
@ 2025-05-15 3:51 Ryo Takakura
0 siblings, 0 replies; only message in thread
From: Ryo Takakura @ 2025-05-15 3:51 UTC (permalink / raw)
To: john.ogness, pmladek
Cc: Jason, gregkh, linux-serial, linux-kernel, lkp, oe-lkp,
oliver.sang, ryotkkr98
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.
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>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
---
Changes since v1:
[1] https://lore.kernel.org/linux-serial/20250510013515.69636-1-ryotkkr98@gmail.com/
- Add Reviewed-by by John and Petr.
- Add Reported-by by kernel test robot <oliver.sang@intel.com>.
- Add Closes and its link.
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-15 3:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 3:51 [PATCH v2] rslib: Add scheduling points during the test Ryo Takakura
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox