Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

risc-v: Accelerate schedule by percpu #15081

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Dec 9, 2024

Summary

Fetch TCB info in percpu scratch register for better performance.

Similar to 948ac9b

Impact

RISC-V arch level code

Testing

ostest

@no1wudi no1wudi marked this pull request as draft December 9, 2024 06:02
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: M The size of the change in this PR is medium labels Dec 9, 2024
@nuttxpr
Copy link

nuttxpr commented Dec 9, 2024

[Experimental Bot, please feedback here]

No, this PR does not fully meet the NuttX requirements. While it provides a summary of the change and mentions testing, it lacks crucial details.

Here's what's missing:

  • Summary: While the what is described, the why and how are missing. Why is fetching TCB info in percpu scratch registers better for performance? Explain the mechanism and the expected performance gains. Mention any related NuttX issues.
  • Impact: The impact section is overly simplistic. While it mentions RISC-V arch code, it doesn't explicitly answer the required questions. Each impact question (user, build, hardware, documentation, security, compatibility) needs a YES/NO answer followed by a description if YES. Even if the answer is NO, stating it explicitly is important for clarity. For example:
    • Impact on user: NO
    • Impact on build: NO
    • Impact on hardware: YES (Affects RISC-V architectures. No changes to existing boards or drivers, but modifies low-level architecture code.)
    • Impact on documentation: NO (or YES if documentation needs updating)
    • Impact on security: NO (or YES with explanation if applicable)
    • Impact on compatibility: NO (or YES with explanation if applicable)
  • Testing: "ostest" is insufficient. Provide details about the build host (OS, CPU, compiler) and the specific RISC-V target (simulator, board, configuration) used for testing. Crucially, the testing logs before and after the change are missing. These logs are essential to demonstrate the actual performance improvement and validate the change's effectiveness. If ostest was run before and after, include the relevant output. Even a simple timing comparison would be helpful.

The PR needs to be significantly more detailed to be considered complete. Provide the missing information to ensure reviewers can properly assess the change.

arch/risc-v/include/irq.h Outdated Show resolved Hide resolved
@no1wudi no1wudi force-pushed the riscv branch 3 times, most recently from fe66e6f to ba568f6 Compare December 10, 2024 08:30
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/arch.h Outdated Show resolved Hide resolved
arch/risc-v/include/irq.h Outdated Show resolved Hide resolved
arch/risc-v/include/irq.h Outdated Show resolved Hide resolved
@no1wudi no1wudi marked this pull request as ready for review December 16, 2024 01:45
@no1wudi no1wudi force-pushed the riscv branch 2 times, most recently from 92d1a27 to fdb91ee Compare December 16, 2024 04:31
@github-actions github-actions bot added Size: S The size of the change in this PR is small and removed Size: M The size of the change in this PR is medium labels Dec 16, 2024
@no1wudi no1wudi force-pushed the riscv branch 4 times, most recently from 21549c5 to e0334c0 Compare December 20, 2024 03:20
Fetch TCB info in percpu scratch register for better performance.

Signed-off-by: Huang Qi <[email protected]>
* to store the current task pointer.
*/

#ifndef CONFIG_RISCV_PERCPU_SCRATCH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not always enable CONFIG_RISCV_PERCPU_SCRATCH

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, SCRATCH register is always available, I'll try to remove this option and refine relative logic first

@xiaoxiang781216
Copy link
Contributor

@no1wudi let's continue on this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants