From owner-freebsd-current@FreeBSD.ORG Mon Sep 27 16:00:50 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116451065670 for ; Mon, 27 Sep 2010 16:00:50 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id C804B8FC13 for ; Mon, 27 Sep 2010 16:00:49 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.4/8.14.4) with ESMTP id o8RFfwCh010073; Mon, 27 Sep 2010 09:41:58 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <1285601161.7245.7.camel@home-yahoo> Date: Mon, 27 Sep 2010 09:41:57 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1285601161.7245.7.camel@home-yahoo> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1081) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: "current@freebsd.org" Subject: Re: MAXCPU preparations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 16:00:50 -0000 There's no reason not to include . I'm a little reluctant = to have it depend on the static MAXCPU definition, though. What happens = when you mix-and match userland and kernel and they no longer agree on = the definition of MAXCPU? I suggest creating a sysctl that exports the = kernel's definition of MAXCPU, and have libmemstat look for that first, = and fall back to using the static MAXCPU definition if the sysctl = fails/doesn't exit. Scott On Sep 27, 2010, at 9:26 AM, Sean Bruno wrote: > Does this look like an appropriate modification to libmemstat? >=20 > Sean >=20 >=20 > =3D=3D=3D=3D //depot/yahoo/ybsd_7/src/lib/libmemstat/memstat.h#4 > - /home/seanbru/ybsd_7/src/lib/libmemstat/memstat.h =3D=3D=3D=3D > @@ -28,12 +28,13 @@ >=20 > #ifndef _MEMSTAT_H_ > #define _MEMSTAT_H_ > +#include >=20 > /* > * Number of CPU slots in library-internal data structures. This > should be > * at least the value of MAXCPU from param.h. > */ > -#define MEMSTAT_MAXCPU 64 > +#define MEMSTAT_MAXCPU MAXCPU /* defined in > sys/${ARCH}/include/param.h */ >=20 > /* > * Amount of caller data to maintain for each caller data slot. > Applications >=20 >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"