Re: kthread_create() vs kernel_thread()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

> 1. In what situation we should not use the
> kthread_create and instead we should use
> kernel_thread() heavy call which does the do_fork()?

from what I see, kthread_create actually queue your thread inside the 
existing workqueue, thus actually it is just a wrapper for submitting a 
new workqueue.

While in the other hand, kernel_thread really forks new process so it 
has distinct task_struct property.

> 2. What are the down(), up(), signal implecations of
> kthread_create()?

what do you mean here?

> 3. How the O(1) schedular will handle threads created
> using kthread_create()? Will these threads have high
> priority?

I think the scheduler will treat these threads the same thing like any 
other process. But the fact I saw that it is submitted to the 
workqueue, means it is executed in round robin fashion in regards with 
any other job submitted to the same workqueue.

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux