From owner-freebsd-current@FreeBSD.ORG Mon Sep 27 20:54:16 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 1EE8C1065670; Mon, 27 Sep 2010 20:54:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id ED8198FC0A; Mon, 27 Sep 2010 20:54:15 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7BC5046B60; Mon, 27 Sep 2010 16:54:15 -0400 (EDT) Date: Mon, 27 Sep 2010 21:54:15 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Scott Long In-Reply-To: Message-ID: References: <1285601161.7245.7.camel@home-yahoo> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: sbruno@freebsd.org, "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 20:54:16 -0000 On Mon, 27 Sep 2010, Scott Long wrote: > 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. I suppose, in a very worst case scenario, we can read the source code for libmemstat and see what it does. Robert > > Scott > > > > On Sep 27, 2010, at 9:26 AM, Sean Bruno wrote: > >> Does this look like an appropriate modification to libmemstat? >> >> Sean >> >> >> ==== //depot/yahoo/ybsd_7/src/lib/libmemstat/memstat.h#4 >> - /home/seanbru/ybsd_7/src/lib/libmemstat/memstat.h ==== >> @@ -28,12 +28,13 @@ >> >> #ifndef _MEMSTAT_H_ >> #define _MEMSTAT_H_ >> +#include >> >> /* >> * 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 */ >> >> /* >> * Amount of caller data to maintain for each caller data slot. >> Applications >> >> >> _______________________________________________ >> 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" > > _______________________________________________ > 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" >