Re: [PATCH] x86: add /proc/cpuinfo/physical id quirks

From: Alex Chiang
Date: Thu Aug 20 2009 - 17:20:32 EST


* Andi Kleen <andi@xxxxxxxxxxxxxx>:
> > I am leaning towards sysfs, and prefer:
> >
> > /sys/devices/system/cpu/$cpu/chassis_id
> >
> > How does that sound?
>
> I would prefer to simply use the existing physical id for this
> like in your original patch. We already have a bewildering zoo
> of different CPU IDs, no need to increase the confusion even
> more.

This was my initial instinct as well, and was why I was trying to
find out the original intent of "physical id". It seemed
unambiguous to me, but I was trying to figure out what history
(if any) there was around its semantics.

Since "physical id" is basically a made-up field (i.e., isn't
represented directly in cpuid instruction), it does seem like the
appropriate place for any quirky platforms to hook into if
necessary.

> Incidentially mcelog already knows how to use physical ID for this,
> would need to be changed for a new sysfs interface

There is probably a lot of userspace stuff that looks at physical
id that would need to be taught about a new interface.

It turns out I need to rework my patch anyway because I need to
think about the case where a user disables some cores in the
BIOS, in which case my (fragile) table selection scheme falls
apart.

But I would like to get some agreement/guidance about how we
end up presenting the information to the user.

Thanks.

/ac

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