seanbru at yahoo-inc.com
Tue Sep 28 16:55:55 UTC 2010
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 :-).
Working on a dynamic version today. I'll spam it over to you for review
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.
More information about the freebsd-current