From: "Adam J. Richter" <adam@yggdrasil.com>
To: kaos@ocs.com.au
Cc: linux-kernel@vger.kernel.org
Subject: Re: Rusty's module talk at the Kernel Summit
Date: Wed, 3 Jul 2002 08:53:03 -0700 [thread overview]
Message-ID: <200207031553.IAA04513@adam.yggdrasil.com> (raw)
On Wed, 03 Jul 2002 22:27:33 +1000, Keith Owens wrote:
>On Wed, 3 Jul 2002 00:31:35 -0700,
>"Adam J. Richter" <adam@yggdrasil.com> wrote:
>> As individual space optimizations go, 4% is respectable,
>>especially for something that has no cost
>It is not at no cost. Getting 4% requires arch dependent code to
>handle all the tables that are affected by partial text removal. I can
>get 2% for nothing by discarding data.init. Discarding text.init is a
>lot harder.
[...]
>The problem is the partial removal of code when there are tables that
>point to _all_ the code. Partial code removal requires a lot of work
>to adjust every table that refers to code and correct them. To make it
>worse, the tables are arch specific. Most architectures have
>__ex_table, with different formats for each arch. Some have unwind
>data, always arch dependent format. MIPS has dbe.
>Data is not referenced by any of these tables so a partial discard of
>data is easy, no side effects to worry about.
OK, I agree that anyone wanting to implement discarding of
some module init sections would be best off to start with .init.data.
I don't know enough about the formats of these tables right now
to really understand the best way to handle them, but I suspect that
the simplest approach might be a mechanism where copy_*_user and the like
could generate assembler that does a .pushsection to a different section
depending on the current section, so you could have "__ex_table" and
".init.__ex_table", etc. Then it might be possible to deal with these
sections in a way that is not architecture specific, and be able
to discard the obselete parts of these tables after the init code
has completed. However, this would probably require a gas or gcc
extension.
[...]
>> As I understand it, __ex_table is just for copy_{to,from}_uesr,
>>which would almost never be done from init sections
>__ex_table is used for any code that requires recovery. Mainly
>copy..user but not exclusively.
>>The core kernel already deals with the same issue.
>It does not. There is no code to adjust any tables after discarding
>kernel __init sections. We rely on the fact that the discarded kernel
>area is not reused for executable text.
Come to think of it, if the core kernel's .text.init pages could
later be vmalloc'ed for module .text section, then I think you may have
found a potential kernel bug.
Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
next reply other threads:[~2002-07-03 15:50 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-03 15:53 Adam J. Richter [this message]
2002-07-03 17:07 ` Hugh Dickins
2002-07-03 18:46 ` Oliver Neukum
2002-07-03 23:25 ` Keith Owens
2002-07-03 23:09 ` Keith Owens
-- strict thread matches above, loose matches on Subject: below --
2002-07-11 5:44 Adam J. Richter
2002-07-11 5:07 Adam J. Richter
2002-07-04 17:24 Adam J. Richter
2002-07-11 2:48 ` Rusty Russell
2002-07-11 2:45 ` David S. Miller
2002-07-11 3:30 ` Alexander Viro
2002-07-11 5:13 ` Rusty Russell
2002-07-11 6:37 ` Alexander Viro
2002-07-11 7:14 ` Rusty Russell
2002-07-11 10:54 ` Daniel Phillips
2002-07-11 17:37 ` Roman Zippel
2002-07-11 18:01 ` Thunder from the hill
2002-07-11 18:50 ` Daniel Phillips
2002-07-17 18:16 ` bill davidsen
2002-07-17 19:35 ` Thunder from the hill
2002-07-11 18:28 ` Daniel Phillips
2002-07-11 19:48 ` Roman Zippel
2002-07-11 20:29 ` Daniel Phillips
2002-07-11 23:37 ` Alexander Viro
2002-07-12 1:54 ` Daniel Phillips
2002-07-12 3:53 ` Rusty Russell
2002-07-12 6:49 ` Kai Henningsen
2002-07-12 11:30 ` Roman Zippel
2002-07-12 0:00 ` Rusty Russell
2002-07-12 6:57 ` Kai Henningsen
2002-07-19 0:19 ` Richard Gooch
2002-07-22 16:29 ` Alexander Viro
2002-07-23 4:37 ` Richard Gooch
2002-07-11 4:02 ` Cort Dougan
2002-07-11 4:19 ` Arnaldo Carvalho de Melo
2002-07-11 4:46 ` Cort Dougan
2002-07-11 2:55 ` Arnaldo Carvalho de Melo
2002-07-11 3:01 ` Arnaldo Carvalho de Melo
2002-07-11 5:16 ` Rusty Russell
2002-07-03 7:31 Adam J. Richter
2002-07-03 8:54 ` Rogier Wolff
2002-07-03 12:27 ` Keith Owens
2002-07-03 14:10 ` Keith Owens
2002-07-01 17:20 Adam J. Richter
2002-07-01 16:12 Adam J. Richter
2002-07-01 17:02 ` jlnance
2002-07-03 5:01 ` Keith Owens
2002-07-01 8:45 Keith Owens
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=200207031553.IAA04513@adam.yggdrasil.com \
--to=adam@yggdrasil.com \
--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
all inboxes | Powered by JetHome®