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: Fri, 16 Jun 2006 15:54:13 -0400 (EDT)
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden