linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: prumpf@mandrakesoft.com (Philipp Rumpf),
	linux-kernel@vger.kernel.org,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: Linux 2.4.1-ac15
Date: Tue, 20 Feb 2001 08:52:29 +1100	[thread overview]
Message-ID: <32669.982619549@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Mon, 19 Feb 2001 16:04:07 -0000." <E14UsnJ-0003l9-00@the-village.bc.nu>

On Mon, 19 Feb 2001 16:04:07 +0000 (GMT), 
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>My spinlock based fix has almost no contention and doesnt require 64 processors
>grind to a halt on a big machine just to handle a module list change. Sorry
>I don't think it supports your argument

I am not proposing that the other cpus grind to a halt.  On the
contrary, they are allowed to continue running.  It is the current
process that is suspended until all other cpus have gone through at
least one schedule.

On Mon, 19 Feb 2001 16:23:09 +0100, 
Manfred Spraul <manfred@colorfullife.com> wrote:
>what about
>
>	spin_unlock_wait(&global_exception_lock);
>
>The actual exception table waker uses
>	spin_lock_irqsave(&global_exception_lock);
>
>	spin_unlock_irqsave(&global_exception_lock);
>
>Or a simple spinlock - the code shouldn't be performance critical.

All lock based fixes have the disadvantage that you penalise the entire
kernel all the time.  No matter how small the overhead of getting the
lock, it still exists - so we are slowing down the main kernel all the
time to handle the rare case of module unloading.

Also notice that we keep adding spinlocks.  One for the main module
list, another for the exception tables.  Then there is the architecture
specific module data, including unwind information for IA64; that also
needs to be locked.  Requiring more than one spinlock to handle module
unloading tells me that the design is wrong.

Using wait_for_at_least_one_schedule_on_every_cpu() has no penalty
except on the process running rmmod.  It does not require yet more
spinlocks and is architecture independent.  Since schedule() updates
sched_data->last_schedule, all the rmmod process has to do is wait
until the last_schedule value changes on all cpus, forcing a reschedule
if necessary.

Zero overhead in schedule, zero overhead in exception handling, zero
overhead in IA64 unwind code, architecture independent.  Sounds good to
me.


  reply	other threads:[~2001-02-19 21:52 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-15 23:15 Linux 2.4.1-ac15 Alan Cox
2001-02-19  9:47 ` Philipp Rumpf
2001-02-19 11:35   ` Alan Cox
2001-02-19 11:54     ` Philipp Rumpf
2001-02-19 16:03       ` Alan Cox
2001-02-19 16:21         ` Philipp Rumpf
2001-02-19 16:27           ` Alan Cox
2001-02-19 16:34             ` Philipp Rumpf
2001-02-19 16:41               ` Alan Cox
2001-02-19 16:48                 ` Philipp Rumpf
2001-02-19 17:03                   ` Alan Cox
2001-02-21  3:02       ` Rusty Russell
2001-02-21 12:01         ` Alan Cox
2001-02-22  2:05           ` Rusty Russell
2001-02-22 10:22             ` Alan Cox
2001-02-23  0:01               ` Philipp Rumpf
2001-02-22  2:27           ` Linus Torvalds
2001-02-22 10:29             ` Alan Cox
2001-02-23 20:40               ` Andrea Arcangeli
2001-02-23 21:09                 ` Linus Torvalds
2001-02-24  4:04                   ` Andrea Arcangeli
2001-02-24  4:54                     ` Andrea Arcangeli
2001-02-19 11:54     ` Keith Owens
2001-02-19 12:15       ` Philipp Rumpf
2001-02-19 13:15         ` Keith Owens
2001-02-19 13:25           ` Christoph Hellwig
2001-02-19 21:32             ` Keith Owens
2001-02-19 13:36           ` Philipp Rumpf
2001-02-19 15:23           ` Manfred Spraul
2001-02-19 16:04       ` Alan Cox
2001-02-19 21:52         ` Keith Owens [this message]
2001-02-20 12:29           ` Philipp Rumpf

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=32669.982619549@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=prumpf@mandrakesoft.com \
    /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;
as well as URLs for NNTP newsgroup(s).