On Fri, Sep 13, 2024 at 12:06 PM Jeff Layton [off-list ref] wrote:
On Fri, 2024-09-13 at 11:59 -0700, John Stultz wrote:
quoted
quoted
+/**
+ * ktime_get_real_ts64_mg - attempt to update floor value and return result
+ * @ts: pointer to the timespec to be set
+ * @cookie: opaque cookie from earlier call to ktime_get_coarse_real_ts64_mg()
+ *
+ * Get a current monotonic fine-grained time value and attempt to swap
+ * it into the floor using @cookie as the "old" value. @ts will be
+ * filled with the resulting floor value, regardless of the outcome of
+ * the swap.
I'd add more detail here to clarify that this can return a coarse
floor value if the cookie is stale.
Sure, or I can just drop the cookie, if that's better.
That seems like the simpler approach, but I don't have a sense of the
actual performance impact, so I'll leave that decision to you.
thanks
-john