Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2010 08:48:27 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Joshua Neal <jdneal@gmail.com>
Cc:        "sbruno@freebsd.org" <sbruno@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: MAXCPU preparations
Message-ID:  <alpine.BSF.2.00.1009280846490.69239@fledge.watson.org>
In-Reply-To: <AANLkTik0Eq2w565cgszvXK4kgDo08%2B28iPkk3CsU-LqC@mail.gmail.com>
References:  <1285601161.7245.7.camel@home-yahoo> <1285604516.7245.16.camel@home-yahoo> <alpine.BSF.2.00.1009272210040.69239@fledge.watson.org> <201009271738.19497.jhb@freebsd.org> <alpine.BSF.2.00.1009272240340.69239@fledge.watson.org> <AANLkTik0Eq2w565cgszvXK4kgDo08%2B28iPkk3CsU-LqC@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--621616949-1982540403-1285660107=:69239
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT


On Mon, 27 Sep 2010, Joshua Neal wrote:

> I hit this bug at one point, and had to bump MEMSTAT_MAXCPU.  It's already 
> asking the kernel for the max number and throwing an error if it doesn't 
> agree:

Yes, it looks like MAXCPU was bumped in the kernel without bumping the limit 
in libmemstat.  The bug could be in not having a comment by the definition of 
MAXCPU saying that MEMSTAT_MAXCPU needs to be modified as well.

> I was thinking a more future-proof fix would be to get rid of the static 
> allocations and allocate the library's internal structures based on the 
> value of kern.smp.maxcpus.

Agreed.  I'm fairly preoccupied currently, but would be happy to accept 
patches :-).

Robert

>
> - Joshua
>
> On Mon, Sep 27, 2010 at 2:42 PM, Robert Watson <rwatson@freebsd.org> wrote:
>>
>> On Mon, 27 Sep 2010, John Baldwin wrote:
>>
>>> Also, I think we should either fix MAXCPU to export the SMP value to
>>> userland, or hide it from userland completely.  Exporting the UP value is
>>> Just Wrong (tm).
>>
>> Well, it's useful in the sense that it tells you what the maximum number of
>> CPUs a kernel can support is, which is helpful, especially if you're futzing
>> with MAXCPU as a kernel option :-).
>>
>> But, more generally, many things that use MAXCPU should probably use either
>> mp_maxid or DPCPU.  Not everything, but most things.
>>
>> Robert
>> _______________________________________________
>> 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"
>>
>
--621616949-1982540403-1285660107=:69239--



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