As we all know, kthreadd is a kernel thread, which is used to help others create new kernel threads (Review kthread_create_list
to see if there is any new kernel thread need to create).
But I can not understand why we do not use create_kthread
to create a new kernel thread?
I do not see any difference kthreadd makes.
Could you give me some suggestions, please.
Thanks for your great help.
Not Really. kthreadd is a daemon thread that runs in kernel space. The reason is that kernel needs to some times create threads but creating thread in kernel is very tricky. Hence kthreadd is a thread that kernel uses to spawn newer threads if required from there . This thread can access userspace address space also but should not do so . Its managed by kernel so one need not worry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With