public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Keith Owens <kaos@ocs.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PART1: Proposed init & module changes for 2.5
Date: Mon, 24 Sep 2001 14:35:54 +1000	[thread overview]
Message-ID: <E15lNTG-0000F2-00@wagner> (raw)
In-Reply-To: Your message of "Mon, 24 Sep 2001 11:01:29 +1000." <4103.1001293289@kao2.melbourne.sgi.com>

In message <4103.1001293289@kao2.melbourne.sgi.com> you write:
> On Mon, 24 Sep 2001 08:42:25 +1000, 
> Rusty Russell <rusty@rustcorp.com.au> wrote:
> >In message <20010923124336.D30515@nightmaster.csn.tu-chemnitz.de> you write:
> >> Can the startcall or the initcall still be called after stopcall? 
> >
> >No: at this stage the module will have to be reloaded, exactly because
> >of assumptions like zero-initialization.
> 
> When we discussed this at linux.conf.au in Sydney, we agreed that we
> could call startfn after stopfn to handle the quiesce unload algorithm.
> That handles the rmmod race without exporting mod use count to
> everything, i.e.
> 
>   rmmod
>   if use count == 0, call stopfn()
>     synchronize_kernel()
>     if use count == 0, exitfn()
>     if use count != 0, startfn()
> 
> That catches the race where a second cpu has entered the module but not
> done MOD_INC_USECOUNT yet.  The module is now in use but stopfn has
> been called, the best thing to do is accept that rmmod lost the race
> and reinstate the module.

Hi Keith!

	Yes, this was my original intention, but the more I thought
about it, the more I wondered if it was worth it.  In fact, my patch
adds CONFIG_MODULE_UNLOAD, because most people don't actually need it,
and I don't really care if most modules are not unloadable.  Loading
modules makes sense.  Unloading them is pretty much an optimization.

	The reason I eventually decided to split initialization in
this version anyway, was that so many drivers get it wrong!  Things
like registering interrupt handlers before they have set up their
internal state, etc.  Splitting it into two functions is merely a
mechanism to get them to think about things a little harder 8)

	  And honestly, I got distracted by the PARAM stuff 8)

Cheers!
Rusty.
--
Premature optmztion is rt of all evl. --DK

  reply	other threads:[~2001-09-24  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-23  6:37 [PATCH] PART1: Proposed init & module changes for 2.5 Rusty Russell
2001-09-23  7:12 ` David Cinege
2001-09-24  0:09   ` Rusty Russell
2001-09-24  3:57     ` David Cinege
2001-09-24  5:31       ` Rusty Russell
2001-09-24  8:14         ` Andrzej Krzysztofowicz
2001-09-24  9:44         ` David Cinege
2001-09-23 10:43 ` Ingo Oeser
2001-09-23 22:42   ` Rusty Russell
2001-09-24  1:01     ` Keith Owens
2001-09-24  4:35       ` Rusty Russell [this message]
2001-09-24  4:54         ` Keith Owens
2001-09-24  5:40           ` 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=E15lNTG-0000F2-00@wagner \
    --to=rusty@rustcorp.com.au \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.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