From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 9 21:40:07 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0212C106566C for ; Fri, 9 Mar 2012 21:40:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B46728FC13 for ; Fri, 9 Mar 2012 21:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q29Le6Cf047598 for ; Fri, 9 Mar 2012 21:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q29Le6FM047597; Fri, 9 Mar 2012 21:40:06 GMT (envelope-from gnats) Resent-Date: Fri, 9 Mar 2012 21:40:06 GMT Resent-Message-Id: <201203092140.q29Le6FM047597@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Wollman Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77EB1106566B for ; Fri, 9 Mar 2012 21:30:13 +0000 (UTC) (envelope-from wollman@zfsnfs.csail.mit.edu) Received: from zfsnfs.csail.mit.edu (zfsnfs.csail.mit.edu [128.30.113.117]) by mx1.freebsd.org (Postfix) with ESMTP id 3BCDD8FC08 for ; Fri, 9 Mar 2012 21:30:13 +0000 (UTC) Received: from zfsnfs.csail.mit.edu (localhost [127.0.0.1]) by zfsnfs.csail.mit.edu (8.14.5/8.14.5) with ESMTP id q29LU6pL043521 for ; Fri, 9 Mar 2012 16:30:06 -0500 (EST) (envelope-from wollman@zfsnfs.csail.mit.edu) Received: (from wollman@localhost) by zfsnfs.csail.mit.edu (8.14.5/8.14.5/Submit) id q29LU52n043520; Fri, 9 Mar 2012 16:30:05 -0500 (EST) (envelope-from wollman) Message-Id: <201203092130.q29LU52n043520@zfsnfs.csail.mit.edu> Date: Fri, 9 Mar 2012 16:30:05 -0500 (EST) From: Garrett Wollman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/165893: processor topology should be exported in more obvious format X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Wollman List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 21:40:07 -0000 >Number: 165893 >Category: kern >Synopsis: processor topology should be exported in more obvious format >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Mar 09 21:40:06 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 9.0-RELEASE amd64 >Organization: MIT Computer Science & Artificial Intelligence Lab >Environment: System: FreeBSD zfsnfs.csail.mit.edu 9.0-RELEASE FreeBSD 9.0-RELEASE #3 r232145M: Sun Feb 26 20:00:10 EST 2012 wollman@zfsnfs.csail.mit.edu:/usr/obj/usr/src/sys/ZFSNFS amd64 >Description: Currently, the sysctl variable hw.ncpu gives the number of logical processors. kern.sched.topology_spec gives a hard-to-parse XML description of the system topology (is this ULE-only or 4BSD as well?). Grepping /var/run/dmesg.boot will tell you the number of sockets, cores, and threads without having to parse XML. It would be preferable if these values were reflected in sysctl variables (in, take your pick, the kern.sched, hw, machdep, or dev.cpu tree) so programs don't have to parse XML or depend on being able to read dmesg.boot. >How-To-Repeat: >Fix: Sprinkle some SYSCTL_RDINT() macros into ${ARCH}/mp_machdep.c. >Release-Note: >Audit-Trail: >Unformatted: