Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932603AbVLNDvN (ORCPT ); Tue, 13 Dec 2005 22:51:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932609AbVLNDvN (ORCPT ); Tue, 13 Dec 2005 22:51:13 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37055 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S932603AbVLNDvM (ORCPT ); Tue, 13 Dec 2005 22:51:12 -0500 Date: Wed, 14 Dec 2005 04:51:11 +0100 From: Andi Kleen To: "Zhang, Yanmin" Cc: linux-kernel@vger.kernel.org, discuss@x86-64.org, "Pallipadi, Venkatesh" Subject: Re: [discuss] [PATCH] Export cpu topology for IA32 and x86_64 by sysfs Message-ID: <20051214035111.GF15804@wotan.suse.de> References: <8126E4F969BA254AB43EA03C59F44E840431BB03@pdsmsx404> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8126E4F969BA254AB43EA03C59F44E840431BB03@pdsmsx404> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1221 Lines: 33 On Wed, Dec 14, 2005 at 11:11:00AM +0800, Zhang, Yanmin wrote: > The patch exports the cpu topology info through sysfs on ia32/x86_64 > machines. The info is similar to /proc/cpuinfo. > > The exported items are: > /sys/devices/system/cpu/cpuX/topology/physical_package_id(representing > the physical package id of cpu X) > /sys/devices/system/cpu/cpuX/topology/core_id (representing the cpu core > id to cpu X) > /sys/devices/system/cpu/cpuX/topology/thread_siblings (representing the > thread siblings to cpu X) > /sys/devices/system/cpu/cpuX/topology/core_siblings (represeting the > core siblings to cpu X) Hmm, I'm not sure it is that useful. Did someone decide to move all information from cpuinfo into sysfs? And if it's done I think it needs Documentation somewhere. Anyways, the notifier is wrong. You need to handle CPU_UP_CANCELLED too. And you could probably shrink the code size of the show function in half by switching data instead of functions. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/