Re: may b a minor error
Re: may b a minor error
- Subject: Re: may b a minor error
- From: Andrew Gallatin <email@hidden>
- Date: Mon, 19 Jun 2006 10:39:39 -0400 (EDT)
Michael Smith writes:
>
> On Jun 16, 2006, at 12:54 PM, Andrew Gallatin wrote:
>
> > I'm talking about a scheme where, when the module is loaded, its code
> > is re-written by the "kernel linker" (or kextload, or whatever does
> > the
> > relocation when loading a kext) and re-writes KPI functions to do
> > direct structure access. This re-writing code is kernel dependent
> > and could be supplied, for example, via the commpage. This would
> > be similar to what Digital UNIX did when they patched out SMP locks
> > at runtime on UP systems.
>
> That's a really innovative scheme... you could have little patch areas
> that you rewrote all the KPI functions into - and in fact you could
> optimise
> it by copying directly from the KPI function implementation in the
> kernel.
>
> That way, drivers wouldn't have to leave their object modules, they
> could just jump into their own private copies of the functions they
> would otherwise have called...
>
> Brilliant.
>
> = Mike
>
> (Yes, I am well aware of the point you're trying to make. In a few
> cases
> it might actually be useful, but vtable-style indirection isn't the
> big evil here...)
Just in case others aren't aware, I'm proposing optimizing away
function calls which are, in most cases, a simple pointer deref or
assignment, not copying the functions elsewhere.
So what is the big evil then?
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden