hrtimer: Add hrtimer_forward_safe_from_callback()
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hrtimer: Add hrtimer_forward_safe_from_callback()include/ kernel/ | +34 | 1 reply | |
| 2/2 | rust: hrtimer: Use hrtimer_forward_safe_from_callback()rust/ | +18 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Andreas Hindborg | Thomas Gleixner |
|---|---|---|
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/2] hrtimer: Add hrtimer_forward_safe_from_callback()
From: FUJITA Tomonori <[email protected]>
Safe Rust code can arm a timer while its callback is running, so the Rust abstraction cannot offer hrtimer_forward() from the callback as a safe API.
Thomas suggested a helper that does the check and the update with the base lock held [1]. Patch 1 adds it. Patch 2 makes the Rust callback context use it.
The helper is not Rust specific. As Thomas noted, it can be used for i915_pmu too. null_blk can use it as well. I can send those conversions after the helper is merged.
[1] https://lore.kernel.org/all/877bk3ixp5.ffs@fw13/
FUJITA Tomonori (2):
hrtimer: Add hrtimer_forward_safe_from_callback()
rust: hrtimer: Use hrtimer_forward_safe_from_callback()
include/linux/hrtimer.h | 4 ++++ kernel/time/hrtimer.c | 30 ++++++++++++++++++++++++++++++ rust/kernel/time/hrtimer.rs | 25 ++++++++++++++++++------- 3 files changed, 52 insertions(+), 7 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
Signature · 1 line
2.43.0