You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "g2gps (via GitHub)" <gi...@apache.org> on 2024/05/31 06:10:59 UTC
[PR] arch/risc-v/riscv_mtimer: Update the mtimecmp value once per interrup… [nuttx]
g2gps opened a new pull request, #12433:
URL: https://github.com/apache/nuttx/pull/12433
## Summary
Cache the next timeout value in the drivers instance and update the mtimecmp value once. This is advantageous as the opensbi ecall to set the timer is expensive in systems which don't have the supervisor mode timer extension.
## Impact
Mild reduction in the mtimer interrupt time, when CONFIG_SCHED_TICKLESS is used, on the Litex platform.
Before
```
IRQ HANDLER ARGUMENT COUNT RATE (s) TOTAL TIME(us) MEAN TIME(us) MAX TIME(us)
21 40015396 40434f10 1204 12.607 162752 135 463 // os test
21 40015396 40434f10 2669 850.426 580978 217 718 // custom application
```
With this change
```
IRQ HANDLER ARGUMENT COUNT RATE (s) TOTAL TIME(us) MEAN TIME(us) MAX TIME(us)
21 40015396 40434f10 1217 11.898 142299 116 390 // os test
21 40015396 40434f10 2043 808.788 372405 182 619 // custom application
```
## Testing
[ostest_knsh32_new.txt](https://github.com/user-attachments/files/15509036/ostest_knsh32_new.txt)
[ostest_knsh32_old.txt](https://github.com/user-attachments/files/15509037/ostest_knsh32_old.txt)
[ostest_knsh64_new.txt](https://github.com/user-attachments/files/15509038/ostest_knsh64_new.txt)
[ostest_knsh64_old.txt](https://github.com/user-attachments/files/15509039/ostest_knsh64_old.txt)
[ostest_litex.txt](https://github.com/user-attachments/files/15509041/ostest_litex.txt)
Note: OS test on qemu32 and qemu64 both return -1 before and after this change.
It would be great if this change could be tested on another hardware platform.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/riscv_mtimer: Update the mtimecmp value once per interrup… [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #12433:
URL: https://github.com/apache/nuttx/pull/12433
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/riscv_mtimer: Update the mtimecmp value once per interrup… [nuttx]
Posted by "g2gps (via GitHub)" <gi...@apache.org>.
g2gps commented on PR #12433:
URL: https://github.com/apache/nuttx/pull/12433#issuecomment-2141301703
Resolves #12407
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org