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

Re: [PATCH 1/2] kthread_create


In message <Pine.LNX.4.44.0312302149350.1457-100000 _at_ bigblue.dev.mdolabs.com> you write:
> plus eventually a spinlock) of the task struct. But IMO the code would be 
> cleaner, since you know who is the target of the message.

<shrug> The code's really not that complicated.

> Also, what happens in the task woke up by a send does not reschedule 
> before another CPU does another send? Wouldn't a message be lost?

There's a lock, so only one communication happens at a time, and all
communication is request-response, so it's pretty straightforward.

But an alternate implementation would be to have a "kthread" kernel
thread, which would actually be parent to the kthread threads.  This
means it can allocate and clean up, since it catches *all* thread
deaths, including "exit()".

What do you think?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: