Fix-Point commented on PR #17308: URL: https://github.com/apache/nuttx/pull/17308#issuecomment-3530663229
> > I have two main concerns: > > > > 1. You expect the expired timer to be triggered immediately, but your timer is delayed by one tick. What's the difference between this and the original implementation? > > Fix the bug that nxsched_reassess_timer() be called with a timeout earlier than the current time, this is dangerous, it will stop the timer for a very long time > > > 2. Each `wd_start` requires an extra `clock_systime_ticks()`, resulting in an extra `~50` CPU cycles overhead. Can you provide test data to prove that your patch will not cause a performance degradation? > > This only exists for tickless implementation and it is needed, because it is a bugfix > > > To address this issue, I'm working on a better solution. Once the count-based oneshot API (clockdevice) is merged, I will submit the new pull request to fix this. > > If so, it will be good. If you're referring to the issue where setting an expired value causes the Tricore systimer to miss the interrupts, you can refer to this commit https://github.com/apache/nuttx/pull/17276/commits/e5b9e418d26b5495e1a4e9c1b3228b2338602ba4; the ClockDevice patches should fix this problem. This is because the tricore systimer hardware implementation has a flaw; it only generates an interrupt when the comparator outputs are `equal`. To address this, a minimum delay mechanism must be added. For architectures like ARM/x86/RISC-v, setting an expired value will also generate an timer interrupt. -- 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]
