Re: mpparse merge

From: Andi Kleen
Date: Thu Apr 10 2008 - 06:37:42 EST


> 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

--
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/