sched: replace sync pause with async pause for nxtask_terminate
Summary
In the kernel, we are planning to remove all occurrences of up_cpu_pause as one of the steps to simplify the implementation of critical sections. The goal is to enable spin_lock_irqsave to encapsulate critical sections, thereby facilitating the replacement of critical sections(big lock) with smaller spin_lock_irqsave(small lock)
Impact
nxtask_terminate
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
[Experimental Bot, please feedback here]
The PR summary you provided lacks several key details required by the NuttX PR requirements. Here's a breakdown:
Missing Information:
- Summary:
- What functional part of the code is being changed? You mention
up_cpu_pauseand critical sections but not the specific files/modules affected. - How does the change exactly work? Provide more detail on the mechanism replacing
up_cpu_pause. How willspin_lock_irqsavebe used differently? - Related Issues: Are there any NuttX Issues prompting this change?
- What functional part of the code is being changed? You mention
- Impact:
- Is new feature added? Is existing feature changed? Clarify if this is a pure refactoring or introduces new behavior.
- All other impact categories: You've only listed "nxtask_terminate". Address ALL impact categories, even if the answer is "NO" (provide brief justification).
- Testing:
- Build Hosts: Specify the OS, CPU architecture, and compiler used for testing.
- Target(s): Be more specific about the QEMU configuration (e.g., "qemu-armv8a:nsh_smp").
- Testing logs: The provided logs are placeholders. Include actual logs demonstrating the issue before the change and the successful outcome after the change.
Conciseness:
While the summary aims for conciseness, it sacrifices essential details. It's crucial to strike a balance between brevity and providing enough information for reviewers to understand the PR's scope and impact.
Recommendation:
Expand the PR summary and impact sections to address the missing information. Provide concrete details about the code changes, affected components, and potential consequences. Include actual testing logs demonstrating the problem being solved and the solution's effectiveness.
@hujun260 please fix the conflict.