Yunye Zhao
162eb5ba79
md: add cond_resched() to md_do_sync()'s skip path
...
When sync_request() reports a skipped region (*skipped == 1),
md_do_sync()'s main loop advances the cursor and takes an early
continue:
j += sectors;
...
if (last_check + window > io_sectors || j == max_sectors)
continue;
If the personality returns a small span per call (raid10 recovery
returns only 128 sectors), syncing a large, mostly clean array iterates
this branch an enormous number of times without ever yielding the CPU.
On a non-preemptive kernel the resync thread then trips the soft-lockup
watchdog:
watchdog: BUG: soft lockup - CPU#149 stuck for 313s! [mdX_resync]
md_bitmap_start_sync+0x6f/0xe0
raid10_sync_request+0x2c9/0x1530 [raid10]
md_do_sync+0x810/0x1030
md_thread+0xa7/0x150
Add a cond_resched(). This does not reduce the wasted iterations; the
excessive iteration count is a raid10 problem addressed separately.
Signed-off-by: Yunye Zhao <yunye.zhao@linux.alibaba.com >
Link: https://patch.msgid.link/20260723135535.101995-3-yunye.zhao@linux.alibaba.com
Signed-off-by: Yu Kuai <yukuai@fygo.io >
2026-08-07 16:10:39 +08:00
..
2026-04-03 05:11:08 -06:00
2026-07-08 22:33:34 +02:00
2026-06-16 13:20:54 +05:30
2026-04-20 19:56:44 +02:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-07-10 18:39:17 +02:00
2023-02-14 14:23:07 -05:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2023-02-14 14:23:06 -05:00
2026-03-09 14:53:39 +01:00
2026-03-02 16:50:18 +01:00
2023-02-14 14:23:06 -05:00
2026-06-16 13:20:54 +05:30
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-04-10 15:16:06 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-28 15:44:02 +01:00
2026-03-30 12:06:33 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-07-08 22:33:35 +02:00
2026-02-21 17:09:51 -08:00
2025-12-10 19:28:22 +01:00
2026-02-21 17:09:51 -08:00
2026-05-04 14:53:52 +02:00
2026-05-04 14:53:52 +02:00
2026-03-18 15:36:33 +01:00
2026-07-08 22:33:35 +02:00
2026-07-10 14:39:47 +02:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-07-10 14:40:51 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-07-08 22:33:20 +02:00
2026-03-02 16:54:36 +01:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2025-06-30 16:20:04 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-02 18:43:12 +01:00
2026-05-31 19:09:17 +08:00
2026-02-21 17:09:51 -08:00
2026-05-26 11:01:55 -06:00
2023-02-14 14:23:06 -05:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-07-10 18:40:27 +02:00
2023-03-16 13:37:06 -04:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-10-20 15:22:21 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-07-11 15:18:51 +02:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-07-08 22:33:34 +02:00
2026-07-08 22:33:34 +02:00
2026-07-10 14:41:43 +02:00
2026-07-10 14:42:33 +02:00
2026-01-21 14:06:23 +01:00
2026-01-21 14:06:23 +01:00
2026-07-10 14:42:33 +02:00
2026-03-27 22:19:17 +01:00
2024-05-20 15:51:19 -04:00
2026-01-14 13:12:21 +01:00
2026-06-08 14:59:14 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2026-07-08 22:33:35 +02:00
2025-11-05 08:07:21 -07:00
2026-05-12 12:58:13 +02:00
2026-05-12 12:58:13 +02:00
2025-01-13 07:36:29 -08:00
2026-08-07 14:43:35 +08:00
2026-08-07 14:43:35 +08:00
2026-02-22 08:26:33 -08:00
2025-03-05 00:28:39 +08:00
2026-07-30 18:46:32 +08:00
2026-08-07 14:43:35 +08:00
2026-08-07 16:10:39 +08:00
2026-08-07 14:43:34 +08:00
2026-07-30 18:46:32 +08:00
2023-06-30 15:43:50 -07:00
2026-07-30 18:46:32 +08:00
2026-07-30 23:30:03 +08:00
2026-01-26 13:17:38 +08:00
2026-04-07 13:09:22 +08:00
2026-07-30 16:05:16 +08:00
2026-08-07 14:43:36 +08:00
2026-06-21 03:16:24 +08:00
2026-08-07 15:25:32 +08:00
2026-07-31 05:40:46 +08:00