Re: [tip:sched/core] x86/numa: Check for nonsensical topologies onreal hw as well

From: Peter Zijlstra
Date: Thu May 10 2012 - 08:08:29 EST


On Thu, 2012-05-10 at 13:49 +0200, Peter Zijlstra wrote:
> +static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> +{
> + if (!topology_sane(c->cpu_index, o->cpu_index, "mc"))
> + return false;
> +
> + if (c->phys_proc_id == cpu_data(i).phys_proc_id)
> + return true;
> +
> + return false;
> +}

Argh, that has the very same problem.. it (and the same for the other
two match funcions).

Something like:

if (c->phys_proc_id == cpu_data(i).phys_proc_id && topology_sane())

might do, since then we only verify the topology after we would
otherwise have already accepted it.

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