nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

sched: replace sync pause with async pause for nxtask_terminate

Open hujun260 opened this issue 1 year ago • 1 comments

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

hujun260 avatar Sep 29 '24 12:09 hujun260

[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_pause and 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 will spin_lock_irqsave be used differently?
    • Related Issues: Are there any NuttX Issues prompting this change?
  • 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.

nuttxpr avatar Sep 29 '24 12:09 nuttxpr

@hujun260 please fix the conflict.

xiaoxiang781216 avatar Oct 05 '24 06:10 xiaoxiang781216