Repository navigation
sched: inline nxsched_select_cpu nxsched_add_prioritized - #14059
Merged
Merged
Conversation
…erformence Configuring NuttX and compile: $ ./tools/configure.sh -l qemu-armv8a:nsh_smp $ make Running with qemu $ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \ -machine virt,virtualization=on,gic-version=3 \ -net none -chardev stdio,id=con,mux=on -serial chardev:con \ -mon chardev=con,mode=readline -kernel ./nuttx Signed-off-by: hujun5 <[email protected]>
|
[Experimental Bot, please feedback here] Let's break down if this Pull Request (PR) description meets the NuttX requirements. Here's a breakdown of what's missing and how to improve it: Summary:
Impact:
Testing:
Example of an Improved PR Description ## Summary
This PR improves the performance of the NuttX scheduler by inlining the `nxsched_select_cpu` and `nxsched_add_prioritized` functions. These functions are called frequently during task scheduling operations, particularly in systems with multiple CPUs or high task loads. Inlining them reduces function call overhead and allows the compiler to perform more aggressive optimizations.
**[Link to relevant NuttX Issue if applicable]**
## Impact
* **Is new feature added?** NO
* **Is existing feature changed?** YES, this optimizes the existing task scheduling mechanism.
* **Impact on user:** Users may observe slightly improved system responsiveness, particularly in CPU-intensive scenarios.
* **Impact on build:** NO
* **Impact on hardware:** NO, this optimization is not architecture-specific.
* **Impact on documentation:** NO
* **Impact on security:** NO
* **Impact on compatibility:** NO
* **Anything else to consider:** N/A
## Testing
**I confirm that changes are verified on the local setup and work as intended:**
* **Build Host(s):** Ubuntu 20.04, x86_64, GCC 9.4.0
* **Target(s):** QEMU (cortex-a53), nsh_smp configuration
**Testing logs before change:**
[Relevant log snippets showing scheduler performance before the change] [Relevant log snippets showing scheduler performance improvement after the change] Key Points to Remember:
|
xiaoxiang781216
approved these changes
Oct 10, 2024
xiaoxiang781216
approved these changes
Oct 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inline nxsched_select_cpu nxsched_add_prioritized to improve performence
Impact
sched
Testing
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic
-machine virt,virtualization=on,gic-version=3
-net none -chardev stdio,id=con,mux=on -serial chardev:con
-mon chardev=con,mode=readline -kernel ./nuttx