All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dave Jones <davej@codemonkey.org.uk>,
	Ed Tomlinson <tomlins@cam.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [drm:drm_init] *ERROR* Cannot initialize the agpgart module.
Date: Sat, 28 Dec 2002 01:20:13 +0100	[thread overview]
Message-ID: <3E0CEE3D.F3282E22@linux-m68k.org> (raw)
In-Reply-To: 20021226042938.281142C04D@lists.samba.org

Hi,

Rusty Russell wrote:

> > So where is the documentation describing module locking de jour ?
> 
> Here's the FAQ again.  Note that the init stuff is not currently true
> (you can enter a module doing init, with possibly bad results),
> because Linus patched my code.  It's on my TODO list to revisit this
> issue.

Rusty, you should do this rather soon. Could you please explain, how you
intend to solve the module init races? The "don't enter module until
init is finished" concept doesn't work, so what else do you want to do?

> Q: How does the code in try_module_get() work?
> A: It disables preemption for a moment, checks the live flag, and then
>    increments a per-cpu counter if the module is live.  This is even
>    lighter-weight (in icache and cycles) than using a brlock, but has
>    the same effect.

Q: But if I have a large number of modules (e.g. netfilter) and I have
to use try_module_get() for each of them, won't it still affect
performance?

> Q: Are these changes all so you could implement an in-kernel module
>    linker?
> A: No, they were to prevent load and unload races without altering
>    every module, nor introducing drastic new requirements.

Q: Wasn't it possible to do the rewrite in several steps? What made it
so urgent that everything had to be 2.6?

> Q: Doesn't putting linking code into the kernel just add bloat?
> A: The total linking code is about 200 generic lines, 100
>    x86-specific lines. [...]
> 
>    The previous code had to implement the two module loading
>    system calls, the module querying system call, and the /proc/ksyms
>    output, required a little more code than the current x86 linker.

2.4.20: wc kernel/module.c include/linux/module.h
   1283    3800   29616 kernel/module.c
    415    1609   13173 include/linux/module.h
   1698    5409   42789 total

2.5.52: wc kernel/module.c kernel/params.c arch/i386/kernel/module.c
include/linux/module*
   1414    4400   35284 kernel/module.c
    338    1093    8182 kernel/params.c
    124     412    3347 arch/i386/kernel/module.c
    368    1174    9954 include/linux/module.h
     61     244    1958 include/linux/moduleloader.h
    127     619    5199 include/linux/moduleparam.h
   2432    7942   63924 total

Q: Doesn't the querying system call provide the same information as
/proc/modules and /proc/ksyms? Is procfs now required to load modules?
Q: How can I debug modules with ksymoops?
Q: Why was it necessary to remove the system calls? Wasn't it possible
to emulate them?

> Q: Why not just fix the old code?
> A: Because having something so intimate with the kernel in userspace
>    greatly restricts what changes the kernel can make.  Moving into
>    the kernel means I have implemented modversions, typesafe
>    extensible module parameters and kallsyms without altering
>    userspace in any way.  Future extensions won't have to worry about
>    the version of modutils problem.

Q: Can I see the modversions implementation?
Q: Was there an analysis, which discussed the limitation of the old
code? Was it really impossible to design a more flexible interface,
which left as much as possible in userspace?

Rusty, could you _please_ start answering questions instead of ignoring
them or is there no discussion required anymore, now that your code is
in the kernel?

bye, Roman



  reply	other threads:[~2002-12-28  1:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20021218094714.43C712C076@lists.samba.org>
2002-12-18 12:57 ` [drm:drm_init] *ERROR* Cannot initialize the agpgart module Ed Tomlinson
2002-12-18 16:29   ` Dave Jones
     [not found] ` <200212181803.23279.tomlins@cam.org>
     [not found]   ` <20021219105909.GE29122@suse.de>
2002-12-20 23:29     ` Ed Tomlinson
2002-12-21 14:22       ` Dave Jones
2002-12-22  4:41         ` Ed Tomlinson
2002-12-22 12:28           ` Dave Jones
2002-12-22 14:08             ` Ed Tomlinson
2002-12-23  1:10         ` Rusty Russell
2002-12-23 12:10           ` Dave Jones
2002-12-26  3:51             ` Rusty Russell
2002-12-28  0:20               ` Roman Zippel [this message]
2002-12-17  1:49 Ed Tomlinson
2002-12-17  8:06 ` Paul P Komkoff Jr
2002-12-17 12:50   ` Ed Tomlinson
2002-12-20  1:30     ` Matt Bernstein
2002-12-20  1:43       ` Randy.Dunlap
2002-12-20  9:33         ` Dave Jones
2002-12-17 12:33 ` Dave Jones

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=3E0CEE3D.F3282E22@linux-m68k.org \
    --to=zippel@linux-m68k.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tomlins@cam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.