On Sun, 25 Jun 2000, Rusty Russell wrote:
> cleanup_module can block whenever. I don't understand what you're
> trying to say here?
s/cleanup_module/->open()/. Sorry.
> Adding a field to every registerable structure is gross. The
And adding the same code all over the place apparently isn't. Right.
> responsibility for getting modules right should be with the person
> writing the modules. The rules are simple; and people w/o module
> support don't pay the penalty for the extra field everywhere...
About one word in .data per driver. Sure. You do realize that
file_operations is never allocated dynamically, don't you?
> > - make sure that caller uses try_inc_mod_count() (automatically takes care
> > of all issues with cleanup_module() blocking).
>
> This function is non-intuitive, adds code complexity, changes
> well-established rules, and is completely undocumented.
Is it? It's "atomically grab a reference if it's not too late and tell
whether it was too late". What complexity?
> The proposed solution keeps old semantics. Not only is that much
> preferable this stage of development, it's *always* preferable to
> avoid gratuitous change!
Except that the old semantics was broken. _Your_ code doesn't use modules.
Fine. A lot of places in the kernel do, though. And whoever responsibility
it is, the fact being that it regulary gets fucked up in quite a few
cases, not to mention bloated in _every_ case. And if you think that
building without a module support is going to save the score - alas, it
won't. If ->open() is empty except the MOD_INC_USE_COUNT (and there's
quite a number of such) it will not go away.
Keeping old scheme might be fine, but when the price is a byzantine
construction that may be broken by very small changes in unrelated parts
of the kernel. Thanks, but I'll pass on it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:06 EST