mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] new module format
Date: Wed, 17 Jul 2002 22:34:35 +0200	[thread overview]
Message-ID: <E17UvVM-0004Pp-00@starship> (raw)
In-Reply-To: <Pine.LNX.4.44.0207172146590.8911-100000@serv>

On Wednesday 17 July 2002 22:12, Roman Zippel wrote:
> Hi,
> 
> On Wed, 17 Jul 2002, Daniel Phillips wrote:
> 
> > > 1. Properly fixing module races: I'm playing with a init/start/stop/exit
> > > model, this has the advantage that we can stop anyone from reusing a
> > > module and we only have to wait for remaining users to go away until we
> > > can safely unload the module.
> >
> > I'm satisfied that, for filesystems at least, all the module races can be
> > solved without adding start/stop, and I will present code in due course.
> 
> The start/stop methods are not needed to fix the races, they allow better
> control of the unload process.

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

  reply	other threads:[~2002-07-17 20:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16 13:04 Roman Zippel
2002-07-17 18:54 ` Daniel Phillips
2002-07-17 20:12   ` Roman Zippel
2002-07-17 20:34     ` Daniel Phillips [this message]
2002-07-17 22:45       ` Roman Zippel
2002-07-17 23:47         ` Daniel Phillips
2002-07-18 10:01           ` Roman Zippel
2002-07-18 11:09             ` Daniel Phillips
2002-07-18 12:02               ` Roman Zippel
2002-07-18 12:13                 ` Daniel Phillips
2002-07-19  8:42 ` Rusty Russell
2002-07-19  9:31   ` Roman Zippel
2002-07-20  4:13     ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17UvVM-0004Pp-00@starship \
    --to=phillips@arcor.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome