Messages in this thread | | | Date | Wed, 2 Mar 2011 17:55:45 +0100 | From | Tejun Heo <> | Subject | Re: [PATCH x86/mm UPDATED] x86-64, NUMA: Fix distance table handling |
| |
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
| |