Re: 1.3.100: My notes, as usual

Rogier Wolff (r.e.wolff@et.tudelft.nl)
Tue, 04 Jun 1996 23:48:51 +0200


H. Peter Anvin wrote:
>
> In article <199605122039.WAA26428@wildsau.idv.uni-linz.ac.at>,
> Herbert Rosmanith <herp@wildsau.idv.uni-linz.ac.at> wrote:
> >>
> >> Minor thing: Is it necessary to include math_emu.h in
> >> asm-i386/processor.h unconditionally. Isn't math emulation
> >> configurable, or is that file used outside the emulator? Sounds a bit
> >> broken, too.
> >
> >I wonder if a kernel, that has math-emu configured, makes use of the
> >emulation, when it detects the co-prozessor at bootup time. Maybe it
> >throws out the emulation then ? I think, the math-emu code could
> >probably be built as a module (yet I have no idea how to rewrite it :)
> >
>
> No on both counts. The Linux kernel currently has no facility for
> throwing out compiled code (it would require at least as and ld
> hacks.) Nor could it be built as a module, since there is no way to
> get to the point where it could be inserted.

We could be at that point in about two weeks if Linus would stop
dropping my "kmalloc" patches without telling me why.

I KNOW I can do the patch (because I've done it before) and I get
tired quickly when I have to spend time redoing the patchfiles for
every kernel that comes out every two days or so.....

The trick is to create a new "kfree" call that can be called with
a pointer and a length field. The indicated area will then be added
to the kmalloc pool without it having been malloced through kmalloc.

A compiled-in-driver that is unable to find its hardware could then
indicate to its caller that it wants to be freed (Data and code space).
In the normal event you would only free the init routine's code....

It is unlikely though that this will create a significant saving.

Roger.

-- 
 ** Q: What's the difference between MicroSoft Windows and a virus?       **
 ** A: Apart from the fact that virusses install easier, none.            **
 ** EMail: R.E.Wolff@et.tudelft.nl * Tel +31-15-2783643 or +31-15-2137459 **
 *** <a href="http://einstein.et.tudelft.nl/~wolff/">my own homepage</a> ***