Re: [PATCH, RFC] Create 'slot'sysfsattributein/sys/devices/system/cpu/cpuN/topology/

From: Alex Chiang
Date: Thu Apr 24 2008 - 14:44:40 EST


Hi Tony,

* Luck, Tony <tony.luck@xxxxxxxxx>:
> > I noticed that this patch wasn't in the git tree you sent to
> > Linus for 2.6.26. I don't remember seeing a NACK though -- is
> > there something that I could rework to make it more acceptable?
>
> I'm mostly ok with this version of the patch. I didn't see any
> comments from the linux-kernel crowd on the whether they are fond
> of the new API ("slot" file in cpu/cpuN/topology/) and hate to make
> the presumption that because they are silent that they agree.
>
> The "mostly ok" part would transform to "fully ok" if there were a way
> to make sure the "slot" files only appeared on systems where they are
> meaningful (i.e. have a value other then -1 in them). If there is
> an easy way to make this happen, then it would make me happier (less
> clutter in /sys) and perhaps others too (since this API is only useful
> on large systems where "slot" is meaningful, and there is generally
> some bias from the community at large about adding interfaces that
> aren't needed for normal desktop/laptop systems).

Yeah, I agree that the first few attempts weren't so great. I
don't really like the idea of adding a new 'slot' file to sysfs
either.

I reworked this patch to play nicer with the current topology
stuff.

I've also included a cleanup patch that you might be happy to see
(removes the noisy ia64_sal_pltid failed with -1 printk).

Tested on an hp rx4640 with Madisons and verified that I actually
get sane output in /proc/cpuinfo:

[root@max ~]# cat /proc/cpuinfo | grep processor
processor : 0
processor : 1
processor : 2
processor : 3
[root@max ~]# cat /proc/cpuinfo | grep physical
physical id: 0
physical id: 1
physical id: 2
physical id: 3

Also tested on a Tiger and verified that /proc/cpuinfo remains
unchanged, and no useless printk's appear during boot.

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/