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

Show assigned cpu in dump task #5828

Merged
merged 1 commit into from
Mar 23, 2022
Merged

Show assigned cpu in dump task #5828

merged 1 commit into from
Mar 23, 2022

Conversation

no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Mar 23, 2022

Summary

Show assigned cpu in dump task, before this PR (please ignore the format issue caused by paste) :

[CPU0] riscv_showtasks:    PID    PRI      USED     STACK   FILLED    COMMAND
[CPU0] riscv_showtasks:   ----   ----         0      2048     0.0%    irq
[CPU0] riscv_dump_task:      0      0        1056      2000    52.8%    CPU0 IDLE
[CPU0] riscv_dump_task:      1      0          560      2000    28.0%    CPU1 IDLE
[CPU0] riscv_dump_task:      2      0          560      2000    28.0%    CPU2 IDLE
[CPU0] riscv_dump_task:      3      0          560      2000    28.0%    CPU3 IDLE
[CPU0] riscv_dump_task:      4      0            32      2000     1.6%    CPU4 IDLE
[CPU0] riscv_dump_task:      5      0            32      2000     1.6%    CPU5 IDLE
[CPU0] riscv_dump_task:      6      0            32      2000     1.6%    CPU6 IDLE
[CPU0] riscv_dump_task:      7      0             32      2000     1.6%    CPU7 IDLE

after

[CPU0] riscv_showtasks:    PID    PRI   CPU      USED     STACK   FILLED    COMMAND
[CPU0] riscv_showtasks:   ----   ----  ----         0      2048     0.0%    irq
[CPU0] riscv_dump_task:      0      0     0      1056      2000    52.8%    CPU0 IDLE
[CPU0] riscv_dump_task:      1      0     1       560      2000    28.0%    CPU1 IDLE
[CPU0] riscv_dump_task:      2      0     2       560      2000    28.0%    CPU2 IDLE
[CPU0] riscv_dump_task:      3      0     3       560      2000    28.0%    CPU3 IDLE
[CPU0] riscv_dump_task:      4      0     4        32      2000     1.6%    CPU4 IDLE
[CPU0] riscv_dump_task:      5      0     5        32      2000     1.6%    CPU5 IDLE
[CPU0] riscv_dump_task:      6      0     6        32      2000     1.6%    CPU6 IDLE
[CPU0] riscv_dump_task:      7      0     7        32      2000     1.6%    CPU7 IDLE

Impact

dumptask for risc-v/arm/xtensa with smp support

Testing

rv-virt with qemu 6.2

@no1wudi no1wudi changed the title Show assigned cpu in dump task and other fix for qemu rv Show assigned cpu in dump task Mar 23, 2022
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

BTW how about ps from nsh?

@no1wudi
Copy link
Contributor Author

no1wudi commented Mar 23, 2022

BTW how about ps from nsh?

output from ps:

NuttShell (NSH) NuttX-10.2.0
nsh> ps
  PID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   USED  FILLED COMMAND
    0     0   0   0 FIFO     Kthread N-- Assigned           00000000 002000 000880  44.0%  CPU0 IDLE
    1     1   1   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU1 IDLE
    2     2   2   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU2 IDLE
    3     3   3   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU3 IDLE
    4     4   4   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU4 IDLE
    5     5   5   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU5 IDLE
    6     6   6   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU6 IDLE
    7     7   7   0 FIFO     Kthread N-- Running            00000000 002000 000032   1.6%  CPU7 IDLE
    8     8   0 100 RR       Task    --- Running            00000000 004064 002080  51.1%  nsh_main
nsh> 

@xiaoxiang781216
Copy link
Contributor

Perfect.

Copy link
Contributor

@masayuki2009 masayuki2009 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiaoxiang781216 xiaoxiang781216 merged commit 9cffc10 into apache:master Mar 23, 2022
@jerpelea jerpelea added this to To-Add in Release Notes - 11.0.0 Aug 30, 2022
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 11.0.0 Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants