From owner-freebsd-current@FreeBSD.ORG Tue Sep 28 07:48:28 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768F4106566C; Tue, 28 Sep 2010 07:48:28 +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 47E868FC0C; Tue, 28 Sep 2010 07:48:28 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B961D46B17; Tue, 28 Sep 2010 03:48:27 -0400 (EDT) Date: Tue, 28 Sep 2010 08:48:27 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Joshua Neal In-Reply-To: Message-ID: References: <1285601161.7245.7.camel@home-yahoo> <1285604516.7245.16.camel@home-yahoo> <201009271738.19497.jhb@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="621616949-1982540403-1285660107=:69239" Cc: "sbruno@freebsd.org" , freebsd-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: Tue, 28 Sep 2010 07:48:28 -0000 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 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--