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

[arm64] add hw thread self #8942

Merged
merged 4 commits into from
May 28, 2024

Commits on May 27, 2024

  1. [libcpu] arm64: Add hardware thread_self support

    This patch introduces hardware-based thread self-identification
    for the AArch64 architecture. It optimizes thread management by
    using hardware registers to store and access the current thread's
    pointer, reducing overhead and improving overall performance.
    
    Changes include:
    - Added `ARCH_USING_HW_THREAD_SELF` configuration option.
    - Modified `rtdef.h`, `rtsched.h` to conditionally include
      `critical_switch_flag` based on the new config.
    - Updated context management in `context_gcc.S`, `cpuport.h`
      to support hardware-based thread self.
    - Enhanced `scheduler_mp.c` and `thread.c` to leverage the new
      hardware thread self feature.
    
    These modifications ensure better scheduling and thread handling,
    particularly in multi-core environments, by minimizing the
    software overhead associated with thread management.
    
    Signed-off-by: Shell <smokewood@qq.com>
    polarvid committed May 27, 2024
    Configuration menu
    Copy the full SHA
    b90fd0c View commit details
    Browse the repository at this point in the history
  2. fixup: address suggestion

    polarvid committed May 27, 2024
    Configuration menu
    Copy the full SHA
    2647534 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54ddf8c View commit details
    Browse the repository at this point in the history
  4. scheduler: add cpu object for UP scheduler

    Also, maintain the rt_current_thread in cpu object on UP scheduler.
    polarvid committed May 27, 2024
    Configuration menu
    Copy the full SHA
    3d4093f View commit details
    Browse the repository at this point in the history