Re: 'global' rq->clock

From: Ingo Molnar
Date: Sat May 03 2008 - 06:10:39 EST



* David Miller <davem@xxxxxxxxxxxxx> wrote:

> > there's already such a mechanism in sched-devel.git (and has been
> > there for a week or two): an architecture can set time_sync_thresh
> > to -1LL during early bootup and essentially disable all the
> > synchronization logic.
>
> Does it remove all of the code too? :-)
>
> Please give us a config boolean. The only platform for which a
> run-time knob is even necessary is x86.

yeah, will try something like that too.

the thing is, core kernel folks have to resist such pressures
_somewhat_.

Architecture maintainers will put pressure on us from two directions: if
a particular generic feature only helps _another_ architecture, they
find it a nuisance and want it to be gone as much as possible.

If a particular feature helps them, they want it supported and
default-enabled as much as possible. In fact, complaints come if a
generic-looking feature shows up in one architecture only. (recent
example: inlining optimizations ;-)

And you are totally right about sched_clock() being dead on accurate an
globally synchronous on sparc64 - and you are right to find _any_ issue
about it a nuisance. I totally envy you that sparc64's sched_clock() is
so simple - it should have been like that on x86 years ago, if hw
designers werent so impotent about it.

( although please note that the growing generalization that goes on
_did_ find a subtle nohz problem on sparc64 early in the merge window,
so it's not like these changes are totally useless to you. )

but it all goes in the other direction as well: many folks find
endianness problems a nuisance on x86, many folks find TLB and explicit
cache coherence complications a nuisance on x86 as well. The bus-to-phys
complication which is an identity on x86. Etc. etc.

But the core kernel is a conscious and intelligent union of all
architecture's needs, and often we maintain complications even if they
make no sense on the most popular platform. I think it makes strategic
sense because it keep the kernel truly generic and truly clean. It also
keeps architectures honest: even today the x86 architecture is still not
as clean as sparc64 for example.

so please be patient, we are working on it :)

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/