From owner-svn-src-head@FreeBSD.ORG Thu Jul 21 12:37:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3730B106566B; Thu, 21 Jul 2011 12:37:29 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id ACBD78FC13; Thu, 21 Jul 2011 12:37:28 +0000 (UTC) Received: by yic13 with SMTP id 13so727516yic.13 for ; Thu, 21 Jul 2011 05:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=snBy+bPpajT9ZEmUJcIUGvj6BLLHor+IyPB/qhZ2zTI=; b=rN/Chg2SEb/1Ro+WMhBEjTJ3i8y0/SScluiACoxkGmWYGUmgXi4EHIpEAuuDhkKs19 Y3VHhsEzTq0UyKE2cnR2JM7IFLcorJAvBzeRtlhVJ4Ih5M6B3uDhTjL5zb8/1+p77ZqB i0V7ud927Hd78vcSf8yCRrwq59aK5XvTpI8YQ= MIME-Version: 1.0 Received: by 10.150.12.9 with SMTP id 9mr611261ybl.328.1311251846707; Thu, 21 Jul 2011 05:37:26 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.151.155.15 with HTTP; Thu, 21 Jul 2011 05:37:26 -0700 (PDT) In-Reply-To: References: <201107191300.p6JD0UU7073447@svn.freebsd.org> <86zkk8pqrn.fsf@gmail.com> Date: Thu, 21 Jul 2011 16:37:26 +0400 X-Google-Sender-Auth: D7lO022Gbk-hUftsMGl-m1g5VEo Message-ID: From: Sergey Kandaurov To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Sean Bruno , Pan Tsu Subject: Re: svn commit: r224217 - in head/sys: amd64/include ia64/include mips/conf sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 12:37:29 -0000 On 21 July 2011 14:14, Attilio Rao wrote: > 2011/7/20 Pan Tsu : >> Attilio Rao writes: >> >>> Author: attilio >>> Date: Tue Jul 19 13:00:30 2011 >>> New Revision: 224217 >>> URL: http://svn.freebsd.org/changeset/base/224217 >>> >>> Log: >>> =A0 Bump MAXCPU for amd64, ia64 and XLP mips appropriately. >>> =A0 From now on, default values for FreeBSD will be 64 maxiumum support= ed >>> =A0 CPUs on amd64 and ia64 and 128 for XLP. All the other architectures >>> =A0 seem already capped appropriately (with the exception of sparc64 wh= ich >>> =A0 needs further support on jalapeno flavour). >>> >>> =A0 Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduc= ed >>> =A0 during the infrastructure cleanup for supporting MAXCPU > 32. This >>> =A0 covers cpumask_t retiral too. >>> >>> =A0 The switch is considered completed at the present time, so for what= ever >>> =A0 bug you may experience that is reconducible to that area, please re= port >>> =A0 immediately. >>> >>> =A0 Requested by: =A0 =A0 =A0 marcel, jchandra >>> =A0 Tested by: =A0pluknet, sbruno >>> =A0 Approved by: =A0 =A0 =A0 =A0re (kib) >>> >>> Modified: >>> =A0 head/sys/amd64/include/param.h >>> =A0 head/sys/ia64/include/param.h >>> =A0 head/sys/mips/conf/XLP >>> =A0 head/sys/mips/conf/XLP64 >>> =A0 head/sys/mips/conf/XLPN32 >>> =A0 head/sys/sys/param.h >>> >>> Modified: head/sys/amd64/include/param.h >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/sys/amd64/include/param.h =A0 =A0Tue Jul 19 12:41:57 2011 =A0 = =A0 =A0 =A0(r224216) >>> +++ head/sys/amd64/include/param.h =A0 =A0Tue Jul 19 13:00:30 2011 =A0 = =A0 =A0 =A0(r224217) >>> @@ -65,7 +65,7 @@ >>> >>> =A0#if defined(SMP) || defined(KLD_MODULE) >>> =A0#ifndef MAXCPU >>> -#define MAXCPU =A0 =A0 =A0 =A0 =A0 =A0 =A0 32 >>> +#define MAXCPU =A0 =A0 =A0 =A0 =A0 =A0 =A0 64 >>> =A0#endif >>> =A0#else >>> =A0#define MAXCPU =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 >> >> Do you plan to bump MEMSTAT_MAXCPU, too? >> >> =A0$ vmstat -z >> =A0vmstat: memstat_sysctl_uma: Too many CPUs >> =A0$ vmstat -m >> =A0vmstat: memstat_sysctl_malloc: Too many CPUs >> >> =A0$ sysctl kern. | grep smp.\*cpus >> =A0kern.smp.maxcpus: 64 >> =A0kern.smp.cpus: 2 >> > > Jeeeez, we seriously need to fix this getting rid of the static values. > > Anyway, can you try the following patch?: > http://www.freebsd.org/~attilio/memstat_maxcpu.diff > > It is going to add some memory overhead for i386 case. > Something like this should work (vmstat -z, vmstat -m both work). It gets rid of MEMSTAT_MAXCPU at the expense of malloc() at runtime. http://plukky.net/~pluknet/patches/libmemstat_nomaxcpu.diff Probably it should work with maxid, instead of maxcpu to save some memory. Though, using maxcpu is more safe. --=20 wbr, pluknet