Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
On Sun, Feb 21, 2010 at 07:18:20AM +0000, Mindaugas Rasiukevicius wrote:
> Darran Hunt <darran%NetBSD.org@localhost> wrote:
> > The new code is modular - it has its own kern_dtrace.c module. I'm
> > not sure that replacing the #ifdefs with stub functions is the best
> > idea - won't that make the proc and lwp functions a bit less efficient
> > with calls to the empty functions?
>
> Compiler will optimise them out. We already do that in various places,
> including threading and scheduling code.
It will if they are #defined out (rather than being functions that just
return). However a moderm x86 cpu should prefetch through such a function
(all the jumps are fully predicted).
> Also:
>
> + if (dtrace_vtime_active) {
> + (*dtrace_vtime_switch_func)(newl);
> + }
>
> It is worth to give a separate cache line for dtrace_vtime_active and
> use __predict_false().
__predict_false() yes, but separating things into their own cache lines
is probably a pessimalisation - mainly because it increases the working
set (of cache lines) of the code.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index