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

proc: Rename kernel thread to kthread instead of idle #556

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

Conversation

agkaminski
Copy link
Member

@agkaminski agkaminski commented Jun 4, 2024

to avoid confusion when using 'ps' applet

DONE: RTOS-845

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

to avoid confusion when using 'ps' applet

DONE: RTOS-845
@agkaminski agkaminski requested a review from Darchiv June 4, 2024 11:24
@nalajcie
Copy link
Member

nalajcie commented Jun 4, 2024

https://github.com/phoenix-rtos/phoenix-rtos-tests/blob/master/psh/test-ps.py#L17 ?

Copy link

github-actions bot commented Jun 4, 2024

Unit Test Results

7 460 tests  ±0   6 745 ✅ ±0   39m 11s ⏱️ +12s
  420 suites ±0     715 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 4c7b407. ± Comparison against base commit 828df3f.

♻️ This comment has been updated with latest results.

@@ -1944,7 +1944,7 @@ int proc_threadsList(int n, threadinfo_t *info)
}
else {
map = threads_common.kmap;
hal_memcpy(info[i].name, "[idle]", sizeof("[idle]"));
hal_memcpy(info[i].name, "[kthread]", sizeof("[kthread]"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why, kernel threads just can't have its names ? eg. [idle], [klog].

Copy link
Member Author

Choose a reason for hiding this comment

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

Threads in general do not have names

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I see, but asked why, it is (and woud be) a hack anyways.
[kthread] eating 99% of the cpu looks weird (I liked [idle]).

Copy link
Member Author

@agkaminski agkaminski Jun 4, 2024

Choose a reason for hiding this comment

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

I get too many question lately "why there're two idle threads on single core system?" :)
This PR is just a proposition, for @Darchiv to decide whether we want this or not

Copy link
Contributor

Choose a reason for hiding this comment

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

2024-06-05-095634_936x182_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants