lkml.org 
[lkml]   [2003]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] kthread_create
Date
In message <3FF251B1.4070404@pobox.com> you write:
> Rusty Russell wrote:
> > Hi all,
> >
> > Ingo read through this before and liked it: this is the basis
> > of the Hotplug CPU patch, and as such has been stressed fairly well.
> > Tested stand-alone, and included here for wider review.
>
> Hey, this is pretty cool.
>
> Recalling threads from LKML past, there are two mechanisms I (and some
> others) felt were missing from the equally nifty workqueue stuff:
> 1) one-shot threads
> 2) keventd overflow
>
> For #1, your patch seems to cover that nicely.

It's really for persistent threads, but you can use it as one-shot by
either (1) calling exit() in the core function (and noone calls
kthread_destroy), or (2) not having a core function and just having an
init function. I used this in a test patch.

For #2, if you really can't wait for keventd, perhaps your own
workqueue is in order?

> Anyway, thanks for doing this, it fills a need, I believe.

Yes: stopping threads manually is a real PITA, and things like
complete_and_exit() always make me wince.

Thanks,
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.109 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site