Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2010 09:45:11 -0700
From:      Sean Bruno <seanbru@yahoo-inc.com>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        "sbruno@freebsd.org" <sbruno@FreeBSD.org>, "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, Joshua Neal <jdneal@gmail.com>, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: MAXCPU preparations
Message-ID:  <1285692311.2454.11.camel@home-yahoo>
In-Reply-To: <alpine.BSF.2.00.1009280846490.69239@fledge.watson.org>
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> <alpine.BSF.2.00.1009280846490.69239@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2010-09-28 at 02:48 -0500, Robert Watson wrote:
> 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

Working on a dynamic version today.  I'll spam it over to you for review
later.  

I'm moving the percpu struct definitions outside of struct memory_type,
allocating quantity kern.smp.maxcpus, removing the boundary checks based
on MEMSTAT_MAXCPU and then removing MEMSTAT_MAXCPU all together.

Sean




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