Thread (31 messages) 31 messages, 3 authors, 2026-01-06

Re: [PATCH v3 02/13] rv: Add Hybrid Automata monitor type

From: Nam Cao <hidden>
Date: 2025-12-18 05:58:08
Also in: lkml

Gabriele Monaco [off-list ref] writes:
+static inline void ha_start_timer_ns(struct ha_monitor *ha_mon, enum envs env,
+				     u64 expire, u64 time_ns)
+{
+	u64 passed = ha_invariant_passed_ns(ha_mon, env, expire, time_ns);
+
+	ha_start_timer_jiffy(ha_mon, ENV_MAX_STORED,
+			     nsecs_to_jiffies(expire - passed) + 1, time_ns);
What is the +1 for? I guess to prevent it being rounded down to zero? If
so, maybe we should do

     nsecs_to_jiffies(expire - passed + TICK_NSEC - 1)

instead.

Anyway, no big deal:
Reviewed-by: Nam Cao <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help