[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1abwyv4oq.fsf@ebiederm.dsl.xmission.com>
Date: Mon, 23 Apr 2007 21:20:37 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Linas Vepstas <linas@...tin.ibm.com>,
Christoph Hellwig <hch@...radead.org>,
"<Andrew Morton" <akpm@...l.org>, containers@...ts.osdl.org,
Oleg Nesterov <oleg@...sign.ru>, linux-kernel@...r.kernel.org,
Paul Mackerras <paulus@...ba.org>, linux-s390@...r.kernel.org,
linuxppc-dev@...abs.org
Subject: Re: [PATCH] powerpc pseries eeh: Convert to kthread API
Benjamin Herrenschmidt <benh@...nel.crashing.org> writes:
> Not sure... I can see places where I might want to spawn an arbitrary
> number of these without having to preallocate structures... and if I
> allocate on the fly, then I need a way to free that structure when the
> kthread is reaped which I don't think we have currently, do we ? (In
> fact, I could use that for other things too now that I'm thinking of
> it ... I might have a go at providing optional kthread destructors).
Well the basic problem is that for any piece of code that can be modular
we need a way to ensure all threads it has running are shutdown when we
remove the module.
Which means a fire and forget model however simple is unfortunately
the wrong thing.
Now we might be able to wrap this in some kind of manager construct,
so you don't have to manage each thread individually, but we still
have the problem of ensuring all of the threads exit when we terminate
the module.
Further in general it doesn't make sense to grab a module reference
and call that sufficient because we would like to request that the
module exits.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists