Re: [PATCH][RFC] kthread abstraction

Christoph Hellwig (hch@caldera.de)
Fri, 1 Feb 2002 17:40:01 +0100


On Fri, Feb 01, 2002 at 10:32:59AM -0600, Adam Keys wrote:
> On February 01, 2002 09:38, Christoph Hellwig wrote:
> > Currently the startup of custom kernel threads contains lots
> > of duplicated code (and bugs!).
>
> Very interesting and approachable patch. Am I correct this replaces the API
> for starting threads like bdflush and kswapd? Is this just an API
> cleanliness thing or is there a performance motivation?

It layers ontop of the old kernel_thread() API.
Currently all user had to duplicate the surrounding code - I've just
created a bunch of helper routines.

> > void kthread_stop(struct kthread *kth)
>
> Do you think you could get by just passing struct task_struct here? I
> realize that would make it less pleasant for calling functions. However, it
> would also prevent you from changing something else in the kthread in a later
> version and catching a caller by surprise.

No - I need the other struct kthread fields - that's why the structure
exists in the first time..

Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.
-
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/