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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proc/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

info[i].vmem = 0;
Expand Down
Loading