* Re: mpparse merge
[not found] <20080410092947.GA32376@basil.nowhere.org>
@ 2008-04-10 10:14 ` Ingo Molnar
2008-04-10 10:42 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2008-04-10 10:14 UTC (permalink / raw)
To: Andi Kleen
Cc: astarikovskiy, len.brown, linux-kernel, Thomas Gleixner, H. Peter Anvin
(Cc:-ing lkml because obviously others are interested in this topic too)
* Andi Kleen <andi@firstfloor.org> wrote:
> Refering to
>
> commit 9d92083afb7cabe86c166dce9cc569eabbbd6f99
> Author: Alexey Starikovskiy <astarikovskiy@suse.de>
> Date: Fri Apr 4 23:43:18 2008 +0400
>
> x86: merge mpparse_{32,64}.c
>
> in linux-next.
>
> About half of the ifdefs seem to be because 32bit does irq compression
> and 64bit does not. Len removed that at some point, but when the files
> are merged I would rather just readd 64bit irq compression (or move
> 64bit over to per cpu vectors) than have this ifdef jungle
the way Alexey did it is the safest way of doing unifications: keep it
simple and finegrained first, keep the more complex steps to later. We
try to stick to that even if there's a temporary jungle of #ifdefs. In a
related discussion (which was unfortunately private too so no URLs) you
suggested to Alexey to redesign the mp-parsing code first, then unify
it. That's the worst possible approach to unification and i advise
everyone against doing it that way. I very much agree with unifying irq
vector management - it's not a simple task at all.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: mpparse merge
2008-04-10 10:14 ` mpparse merge Ingo Molnar
@ 2008-04-10 10:42 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2008-04-10 10:42 UTC (permalink / raw)
To: Ingo Molnar
Cc: Andi Kleen, astarikovskiy, len.brown, linux-kernel,
Thomas Gleixner, H. Peter Anvin
> the way Alexey did it is the safest way of doing unifications: keep it
> simple and finegrained first, keep the more complex steps to later. We
If he unifies dumbly like you seem to be fond of doing CONFIG_X86_32 when it
should be CONFIG_FUNCTIONALITY is the wrong way. Can we agree on that?
The ifdef jungle is not any less from that, but at least it is clear
what the code does which makes further changes much easier. Basically
it preserves more information.
> try to stick to that even if there's a temporary jungle of #ifdefs. In a
> related discussion (which was unfortunately private too so no URLs) you
> suggested to Alexey to redesign the mp-parsing code first, then unify
> it. That's the worst possible approach to unification and i advise
The best approach depends on the code, not on a static rule of thumb. It
can be either depending on the code and the circumstances or often a mix of
both.
A good example where the static rule of thumb went totally wrong is Glauber's
recent smpboot unification without fixing the state machine first. I'm still
not sure he has all the races out caused by that yet and I predict
you'll have some debugging fun with that in the .26 cycle.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-10 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20080410092947.GA32376@basil.nowhere.org>
2008-04-10 10:14 ` mpparse merge Ingo Molnar
2008-04-10 10:42 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®