Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2010 21:54:15 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Scott Long <scottl@samsco.org>
Cc:        sbruno@freebsd.org, "current@freebsd.org" <current@freebsd.org>
Subject:   Re: MAXCPU preparations
Message-ID:  <alpine.BSF.2.00.1009272152521.69239@fledge.watson.org>
In-Reply-To: <DC18F801-24A9-4802-A302-0F92F4D2AE15@samsco.org>
References:  <1285601161.7245.7.camel@home-yahoo> <DC18F801-24A9-4802-A302-0F92F4D2AE15@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 27 Sep 2010, Scott Long wrote:

> There's no reason not to include <sys/param.h>.  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 <sys/param.h>
>>
>> /*
>>  * 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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1009272152521.69239>