From owner-freebsd-arch@FreeBSD.ORG Thu Jun 12 04:46:00 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BACB537B401 for ; Thu, 12 Jun 2003 04:46:00 -0700 (PDT) Received: from critter.freebsd.dk (esplanaden.cybercity.dk [212.242.40.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A57143FA3 for ; Thu, 12 Jun 2003 04:45:57 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h5CBjquw001888; Thu, 12 Jun 2003 13:45:52 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Jeff Roberson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 12 Jun 2003 05:21:03 EDT." <20030612051553.J36168-100000@mail.chesapeake.net> Date: Thu, 12 Jun 2003 13:45:52 +0200 Message-ID: <1887.1055418352@critter.freebsd.dk> cc: arch@freebsd.org Subject: Re: HyperThreading and CPU topologies. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 11:46:01 -0000 In message <20030612051553.J36168-100000@mail.chesapeake.net>, Jeff Roberson wr ites: >Index: smp.h >=================================================================== >RCS file: /home/ncvs/src/sys/sys/smp.h,v >retrieving revision 1.72 >diff -r1.72 smp.h >19a20,46 >> >> /* >> * Topology of a NUMA or HTT system. >> * >> * The top level topology is an array of pointers to groups. Each group >> * contains a bitmask of cpus in its group or subgroups. It may also >> * contain a pointer to an array of child groups. >> * >> * The bitmasks at non leaf groups may be used by consumers who support >> * a smaller depth than the hardware provides. >> * >> * The topology may be omitted by systems where all CPUs are equal. >> */ >> >> struct cpu_group { >> int cg_mask; /* Mask of cpus in this group. */ u_int ? uint32_t ? >> int cg_count; /* Count of cpus in this group. */ >> int cg_children; /* Number of children groups. */ >> struct cpu_group **cg_child; /* Optional child group. */ >> }; >> >> struct cpu_top { >> int ct_count; /* Count of groups. */ >> struct cpu_group **ct_group; /* Array of pointers to cpu >groups. */ >> }; >> >> extern struct cpu_top *smp_topology; -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.