[lkml]   [2002]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Raceless module interface
On Monday 16 September 2002 23:36, Roman Zippel wrote:
> > > > I disagree with pushing the count into the filesystem structure: it
> > > > changes nothing except hide the fact that you're only keeping
> > > > reference counts for the sake of the module. Filesystems are low
> > > > performance impact, but other subsystems really don't want that atomic
> > > > inc and dec for every access.
> > >
> > > As I already said before, it doesn't has to be an atomic reference count.
> >
> > Please explain? It has to be atomic for all the interesting cases
> > (sure, fs mounting might be protected by a lock, but other things aren't).
> Let me explain it in a larger context. You and Daniel are making it really
> more complex than necessary. Only the module itself can really answer the
> question whether it's safe to unload or not.

Excuse me, Roman, but that's the central thesis of my [rfc]. If I didn't
express it concisely enough to make that obvious, I apologize.

> So all the module code
> needs to do is some general module management and ask the module somehow,
> whether it's safe to unload, when the user requests it. The easiest way
> for modules to check for this is to use counters, it's very simple and
> covers the majority of modules.

Err, check. In the [rfc].

> The few modules that don't want/can't use counters can use whatever they
> want and they usually know better how to synchronize with the part of the
> kernel where they installed their hooks into, without disturbing too much
> other parts of the kernel.

Check. In the [rfc].

> I really don't like the synchronize calls as general mechanism, either
> they have to to do too much and possibly disturb other parts without good
> reason

Check. In the [rfc].

> or modules have to take care of it (e.g. don't call somehow
> schedule() without extra protection). This makes the whole synchronize
> mechanism very fragile, which I'd prefer to keep it in the modules which
> really need it, where it can be better controlled.

Yuppers. Are there any points at all we disagree on?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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