site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Andrew Gallatin