All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] rust: sync: add WaitQueue infrastructure
@ 2026-07-26 22:36 Danilo Krummrich
  2026-07-26 22:36 ` [PATCH 1/5] rust: task: add safe schedule_timeout() wrapper Danilo Krummrich
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Danilo Krummrich @ 2026-07-26 22:36 UTC (permalink / raw)
  To: gregkh, arve, tkjos, brauner, cmllamas, aliceryhl, boqun, gary,
	lyude, daniel.almeida, work, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
	kprateek.nayak, ojeda, bjorn3_gh, lossin, a.hindborg, tmgross,
	tamird, acourbot, peterz, mingo, will, longman, viro, jack, tj,
	jiangshanlai
  Cc: linux-kernel, rust-for-linux, linux-fsdevel, Danilo Krummrich

Add a WaitQueue abstraction wrapping struct wait_queue_head, providing
wait_event()-style methods that take a condition closure directly.

This is needed for a (subsequent) DRM patch series to wait for in-flight file
close operations during driver unbind. The Tyr driver also needs it for "CSF
firmware responses and other GPU-driven events" [1].

Convert CondVar (and PollCondVar) to use WaitQueue internally, removing
duplicate code using WaitQueue as the base primitive.

Also replace the deprecated system_wq wrapper with system_percpu_wq and
system_dfl_wq to avoid introducing more callers generating warnings that would
need to be converted later.

[1] https://lore.kernel.org/dri-devel/20260721151423.444175-2-laura.nao@collabora.com/

Danilo Krummrich (5):
  rust: task: add safe schedule_timeout() wrapper
  rust: workqueue: replace deprecated system_wq with
    system_{percpu,dfl}_wq
  rust: sync: add WaitQueue infrastructure
  rust: sync: convert CondVar and PollCondVar to use WaitQueue
  rust: sync: condvar: use task::schedule_timeout()

 drivers/android/binder/process.rs |   4 +-
 rust/kernel/sync.rs               |   6 +
 rust/kernel/sync/completion.rs    |   2 +-
 rust/kernel/sync/condvar.rs       | 104 +++-----
 rust/kernel/sync/lock/spinlock.rs |   2 +-
 rust/kernel/sync/poll.rs          |  14 +-
 rust/kernel/sync/wait.rs          | 385 ++++++++++++++++++++++++++++++
 rust/kernel/task.rs               |  13 +
 rust/kernel/workqueue.rs          |  40 ++--
 9 files changed, 469 insertions(+), 101 deletions(-)
 create mode 100644 rust/kernel/sync/wait.rs


base-commit: 6f6629ab2185d27cbc65d7d85908159b1293c082
-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-26 22:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 22:36 [PATCH 0/5] rust: sync: add WaitQueue infrastructure Danilo Krummrich
2026-07-26 22:36 ` [PATCH 1/5] rust: task: add safe schedule_timeout() wrapper Danilo Krummrich
2026-07-26 22:36 ` [PATCH 2/5] rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq Danilo Krummrich
2026-07-26 22:36 ` [PATCH 3/5] rust: sync: add WaitQueue infrastructure Danilo Krummrich
2026-07-26 22:36 ` [PATCH 4/5] rust: sync: convert CondVar and PollCondVar to use WaitQueue Danilo Krummrich
2026-07-26 22:36 ` [PATCH 5/5] rust: sync: condvar: use task::schedule_timeout() Danilo Krummrich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.