I'm afraid it must show that I didn't read the previous threads closely
enough, but what is the specific benefit supposed to be, if not to address
the races?
> > However, Rusty tells me there are harder cases than filesystems. At this
> > point I'm waiting for a specific example.
>
> For filesystems it's only simpler because they only have a single entry
> point, but the basic problem is always the same.
What do you mean by single entry point? Mount? Register_filesystem?
Lowlevel activity on a filesystem is certainly not restricted to a single
entry point.
> We have to protect
> against module load/unload and unregister. Without an interface change we
> will have to add module owner pointers everywhere and we will see
> contention on the unload_lock due to try_inc_mod_count.
It makes perfect sense for mount to be able to know which module implements
its filesystem. I do not see why updating every mount-like thing in the
system is bad, if it's the best interface.
It's really hard to see why contention on a slow-path lock is anything to
worry about. Anyway, it's not hard to fix the locking model so the lock
only covers the transitions of state bits, instead of all of free_module.
So, I'm still hoping to hear a substantive reason why the filesystem model
can't be applied in general to all forms of modular code. To remind you
of the issue: the proposition is that the subsystem in the module is
always capable of knowing when the module is quiescent, because it does
whatever is necessary to keep track of the users and what they're doing.
-- Daniel - 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/