kthread_create and rel_mplock

Sepherosa Ziehau sepherosa at gmail.com
Sun May 18 18:34:47 PDT 2008


On Mon, May 19, 2008 at 3:26 AM, Simon 'corecode' Schubert
<corecode at fs.ei.tum.de> wrote:
> Michael Neumann wrote:
>>
>> If I understand the kthread_create correctly, it will always acquire the
>> mplock (something like a global lock). That means, if I create two
>> threads, they will automatically be serialized (i.e. run sequentially),
>> unless I release the lock within a thread manually. Is that correct?
>
> kthread_* is old stuff and should be avoided.  If possible, use lwkt_*.
> These threads then run without process context and without the mplock.

Threads start with mplock held currently, but if your thread does want
mplock, it will be wise to hold it explicitly.

Best Regards,
sephe

-- 
Live Free or Die





More information about the Kernel mailing list