[PATCH 4/4] conf: Deduplicate NUMA distance code