[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1zm4ytjhg.fsf@ebiederm.dsl.xmission.com>
Date: Mon, 23 Apr 2007 23:43:55 -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:
>> 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.
>
> Which is, btw, I think a total misdesign of our module stuff, but heh, I
> remember that lead to some flamewars back then...
>
> Like anything else, modules should have separated the entrypoints for
>
> - Initiating a removal request
> - Releasing the module
>
> The former is use did "rmmod", can unregister things from subsystems,
> etc... (and can file if the driver decides to refuse removal requests
> when it's busy doing things or whatever policy that module wants to
> implement).
>
> The later is called when all references to the modules have been
> dropped, it's a bit like the kref "release" (and could be implemented as
> one).
>
> If we had done that (simple) thing back then, module refcounting would
> have been much less of a problem... I remember some reasons why that was
> veto'ed but I didn't and still don't agree.
The basic point is because a thread can terminate sooner if we have an
explicit request to stop, we need that in the design.
Because we need to find the threads to request that they stop we need to
have some way to track them.
Since we need to have some way to track them having an explicit data
structure that the callers manage seems to make sense.
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