Repository navigation
sched/wdog: watchdog timer improvements. - #16343
Conversation
c191142 to
e97ec75
Compare
|
Hmmm why is Even through we didn't change this code? Line 579 in e97ec75 Do we need to add |
|
@nuttxpr test avaota-a1:nsh |
|
[Experimental Bot, please feedback here] Build and Test FAILED (avaota-a1:nsh) |
|
@nuttxpr test milkv_duos:nsh |
|
[Experimental Bot, please feedback here] Build and Test FAILED (milkv_duos:nsh) |
|
Sorry @Fix-Point could you check why this PR is crashing OSTest on Arm64 Avaota-A1 T527 and RISC-V SG2000? Thanks! Arm64 Avaota-A1 SBC (Allwinner T527)RISC-V Oz64 SBC (Sophgo SG2000) |
There was a problem hiding this comment.
@Fix-Point OSTest is also failing on rv-virt:knsh64. Here's how to reproduce the failure: https://gist.github.com/lupyuen/0912fbfedd1b17b592321f828d6c7e5d
$ tools/configure.sh rv-virt:knsh64
$ make -j
$ make -j export
$ pushd ../apps
$ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-0.0.0.tar.gz
$ make -j import
$ popd
$ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -kernel nuttx -nographic
$ ostest
signest_test: Simple case:
Total signalled 1240 Odd=620 Even=620
Total handled 1240 Odd=620 Even=620
Total nested 0 Odd=0 Even=0
waiter_action: Delivered to wrong TID 10, expected 53
[ 57.406911] dump_assert_info: Current Version: NuttX 0.0.0 e97ec75fbc May 9 2025 16:38:42 risc-v
[ 57.409460] dump_assert_info: Assertion failed : at file: signest.c:115 task: ostest process: ostest 0xc000001a
|
@nuttxpr test avaota-a1:nsh |
|
[Experimental Bot, please feedback here] Build and Test Successful (avaota-a1:nsh) |
|
@nuttxpr test milkv_duos:nsh |
|
[Experimental Bot, please feedback here] Build and Test Successful (milkv_duos:nsh) |
lupyuen
left a comment
There was a problem hiding this comment.
Tested OK on Real Hardware: Arm64 and RISC-V 64-bit. Thanks!
|
@nuttxpr test avaota-a1:nsh |
|
[Experimental Bot, please feedback here] Build and Test Successful (avaota-a1:nsh) |
|
@nuttxpr test milkv_duos:nsh |
|
[Experimental Bot, please feedback here] Build and Test Successful (milkv_duos:nsh) |
|
@Fix-Point: Please fix the Merge Conflict. Thanks!
|
|
@lupyuen how can I add my milkv_duos to the CI? It should be nice if we could run this test automatically without calling the nuttxpr bot manually |
This commit simplified `nxsched_timer_process` implementation and improve its readability. Signed-off-by: ouyangxiangzhen <[email protected]>
To improve the absolute timer accuracy, this commit move the tick++ to relative wdog timer. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit added CONFIG_TIMER_ADJUST_USEC to support the time compensation for wdog timer. Normally, timer event cannot triggered on exact time due to the existence of interrupt latency. Assuming that the interrupt latency is distributed within [Best-Case Execution Time, Worst-Case Excution Time], we can set the timer adjustment value to the BCET to reduce the latency. Signed-off-by: ouyangxiangzhen <[email protected]>
|
@Fix-Point please fix: |
This commit fixed serveral word spelling mistakes. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit change the type of the constants to unsigned, avoiding signed integer division. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit is to prevent the insufficient sleep time. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit resolves a timing error caused by the round-up behavior in clock_time2ticks. In rare cases, this could lead to a two-tick increment within a single tick interval. To fix this, we introduced clock_time2ticks_floor, which guarantees the correct semantics for obtaining current system ticks. Signed-off-by: ouyangxiangzhen <[email protected]>
This commit added a macro function clock_delay2abstick to calculate the absolute tick after the delay. Signed-off-by: ouyangxiangzhen <[email protected]>
Done. |
@acassis Hmmm are we thinking of triggering the Hardware Test directly from CI? There's a problem: The PR might contain malicious scripts or code, that could mess up our Test PC and Network. We should review the PR Code before doing the Hardware Test. We could do this instead (and it already works today)
Or if we prefer to run the Hardware Test Manually, without calling any GitHub API: git clone https://github.com/lupyuen/nuttx-build-farm
cd nuttx-build-farm
## For Milk-V Duo S and Oz64 SG2000:
## Build and Test github.com/Fix-Point/nuttx, branch timer-improve
./build-test.sh oz64 \
/tmp/build-test.log \
HEAD HEAD \
https://github.com/Fix-Point/nuttx timer-improve \
https://github.com/apache/nuttx-apps master
## For Avaota-A1: Change oz64 to avaota
## Needs a MicroSD MultiplexerThis requires:
|
Summary
nxsched_timer_processfunction to enhance readability and maintainability.tick++operation to the relative watchdog timer, removing unnecessary tick increments for absolute timers.CONFIG_TIMER_ADJUST_USECto support time compensation for watchdog timers, reducing interrupt latency by setting the timer adjustment value to the Best-Case Execution Time (BCET).Impact
Testing
Tested on
QEMU/x86_64andsim.