Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760057AbYGPXLS (ORCPT ); Wed, 16 Jul 2008 19:11:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759400AbYGPXLG (ORCPT ); Wed, 16 Jul 2008 19:11:06 -0400 Received: from fizeau.zen.co.uk ([212.23.8.67]:47158 "EHLO fizeau.zen.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758627AbYGPXLE (ORCPT ); Wed, 16 Jul 2008 19:11:04 -0400 X-Greylist: delayed 1101 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 Jul 2008 19:11:04 EDT Date: Wed, 16 Jul 2008 23:49:32 +0100 From: Ben Hutchings To: Nathan Lynch Cc: Andrew Morton , linux-kernel@vger.kernel.org, Ingo Molnar , Vegard Nossum Subject: Re: [PATCH] cputopology: Always define CPU topology information [4th try] Message-ID: <20080716224931.GZ19302@solarflare.com> References: <20080604154454.GD11300@solarflare.com> <20080716213717.GB9594@localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080716213717.GB9594@localdomain> User-Agent: Mutt/1.4.1i X-Originating-Smarthost03-IP: [82.69.137.158] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 41 Nathan Lynch wrote: > Hi Ben- > > Ben Hutchings wrote: > > Not all architectures and configurations define CPU topology information. > > This can result in an empty topology directory in sysfs, and requires > > in-kernel users to protect all uses with #ifdef - see > > . > > > > The documentation of CPU topology specifies what the defaults should be > > if only partial information is available from the hardware. So we can > > provide these defaults as a fallback. > > I've been looking at adding topology information to powerpc and I came > across this. > > I understand the need for fallback definitions of the topology APIs > within the kernel, but I'm not sure I agree with exposing these things > in sysfs unconditionally -- the default values for physical_package_id > and core_id don't really make sense on powerpc (and other non-x86 > architectures, I suspect). In what way are they wrong? > Would you object to a patch which exposes in sysfs only the topology > information which the architecture provides? I was primarily concerned with having the fallbacks available in-kernel. However, I don't think you will be doing user-space any favours by requiring checks for missing attributes for ever. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. -- 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/