anchao commented on code in PR #21036:
URL: https://github.com/apache/nuttx/pull/21036#discussion_r4396560622
##########
sched/wqueue/kwork_queue.c:
##########
@@ -84,7 +84,7 @@ static int work_qqueue(FAR struct kwork_wqueue_s *wqueue,
/* Preserve regular queue timing across lock contention. */
- if (!period)
+ if (!period && delay > 0)
Review Comment:
Done. Instead of reading the current tick for every delay-0 queue operation,
I only initialize qtime when work_queue_next() is used and the previous qtime
is still 0. This keeps the immediate-work fast path from reading the tick,
while avoiding the back-to-back catch-up behavior for periodic requeueing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]