site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Michael Smith writes:
No, I was complaining about the KPIs being inflicted on us. I cringe every time I write "m = mbuf_next(m)". Should I cringe at this? Is the kernel linker smart enough to replace these function calls with m = m->m_next at link time, or do these function calls really happen?
Thanks to the glory of pipelining, branch prediction and speculative execution, they're much cheaper than you think, but no, if you were to think about it for a second you would realise that an abstract KPI would be worthless if it worked out that way.
No, it would be worthless if it happened at compile time. That's not what I mean. By "kernel linker" I meant at module load time, not at driver compile/link time. 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. 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