Re: [PATCH x86/mm UPDATED] x86-64, NUMA: Fix distance tablehandling

From: Tejun Heo
Date: Wed Mar 02 2011 - 11:55:55 EST


On Wed, Mar 02, 2011 at 08:46:17AM -0800, Yinghai Lu wrote:
> > * I don't think it's gonna matter all that much. It's one time and
> > only used if emulation is enabled, but then again yeap MAX_NUMNODES
> > * MAX_NUMNODES can get quite high, but it looks way too complicated
> > for what it achieves. Just looping over enabled nodes should
> > achieve about the same thing in much simpler way, right?
>
> what kind of excuse to put inefficiency code there!

Complexity of a solution should match the benefit of the complexity.
Code complexity is one of the most important metrics that we need to
keep an eye on. If you don't do that, the code base becomes very ugly
and difficult to maintain very quickly. So, yes, some amount of
execution inefficiency is acceptable depending on circumstances.
Efficiency too is something which should be traded off against other
benefits.

In this case, it's not a performance critical path at all and similar
level of efficiency can be achieved in much simpler way, so let's do
that, okay?

Thanks.

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