* [PATCH] w1: add a scheduling point to the slave search
@ 2026-10-13 18:22 Imre Kaloz
0 siblings, 0 replies; only message in thread
From: Imre Kaloz @ 2026-10-13 18:22 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: linux-kernel
sgi_w1 busy-waits through each time slot and has no triplet operation,
so one 64-bit search pass holds the CPU for more than 20 ms. Without
full preemption that delays every task woken meanwhile on a single CPU,
enough to underrun an audio ring while the bus is searched.
Call cond_resched() once per triplet.
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
drivers/w1/w1.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index c16946642789..6f6651e44c42 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -1055,6 +1055,9 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb
dev_dbg(&dev->dev, "Abort w1_search\n");
return;
}
+
+ /* Busy-waiting masters can hold the CPU for a whole pass */
+ cond_resched();
}
mutex_unlock(&dev->bus_mutex);
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.47.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-13 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 18:22 [PATCH] w1: add a scheduling point to the slave search Imre Kaloz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®