From owner-svn-src-all@FreeBSD.ORG Mon Aug 9 14:26:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F07471065672; Mon, 9 Aug 2010 14:26:52 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6916A8FC0C; Mon, 9 Aug 2010 14:26:51 +0000 (UTC) Received: by wyj26 with SMTP id 26so12557199wyj.13 for ; Mon, 09 Aug 2010 07:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=U5f5SO+QDvgrHg7ORM2iO+IszjwrwLglWId/WBfXvYg=; b=aWnJ9p4vFqyrCLpeMT3MC7kX+N2bETy9Y7lled8tsXf6jj8pb1Gm9SCDqnxRXWSlUH zJ5vGFOGvWUJwcpmHtVHDvcV5zqRP5gLil9Q0Q2s4o/duHx8j/YQ8xwRPLq2o3Ont95w VjJMNJgE6fuW48aPgq9NKW8TEYqqsJ0TVpr5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f2D7CDU5kkQuRm9NKax/xtUZOun/cT2f6FQWRgVI1eEjdsVvGMfs3rsF2EgbWoaMwQ j8zwTzMvzmeWSqSwo1QbyJ1k7cQfbE5t3/LgHGjCXw5bbupc0elHe+C5AIhh9fgXa6ht hGGP5qnTxKc+1Xpo/a3UHHsS/p4iPARd/fnfM= MIME-Version: 1.0 Received: by 10.227.145.20 with SMTP id b20mr13993879wbv.28.1281364010084; Mon, 09 Aug 2010 07:26:50 -0700 (PDT) Received: by 10.216.160.10 with HTTP; Mon, 9 Aug 2010 07:26:49 -0700 (PDT) In-Reply-To: References: <201005161943.o4GJhnTo096839@svn.freebsd.org> Date: Mon, 9 Aug 2010 19:56:49 +0530 Message-ID: From: "Jayachandran C." To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, John Baldwin , "Jayachandran C." , svn-src-all@freebsd.org, Joe Landers , Randall Stewart , sbruno@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r208165 - in head/sys: kern mips/conf mips/include mips/mips mips/rmi mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2010 14:26:53 -0000 On Mon, Aug 9, 2010 at 5:35 PM, Attilio Rao wrote: > 2010/8/9 Jayachandran C. : >> On Mon, Aug 9, 2010 at 5:31 AM, Attilio Rao wrote: >>> 2010/5/16 Randall Stewart : >>>> Author: rrs >>>> Date: Sun May 16 19:43:48 2010 >>>> New Revision: 208165 >>>> URL: http://svn.freebsd.org/changeset/base/208165 >>>> >>>> Log: >>>> =A0This pushes all of JC's patches that I have in place. I >>>> =A0am now able to run 32 cores ok.. but I still will hang >>>> =A0on buildworld with a NFS problem. I suspect I am missing >>>> =A0a patch for the netlogic rge driver. >>>> >>>> =A0JC check and see if I am missing anything except your >>>> =A0core-mask changes >>> >>> >>>> Modified: head/sys/kern/subr_smp.c >>>> =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/kern/subr_smp.c =A0 =A0Sun May 16 19:25:56 2010 =A0 =A0 = =A0 =A0(r208164) >>>> +++ head/sys/kern/subr_smp.c =A0 =A0Sun May 16 19:43:48 2010 =A0 =A0 = =A0 =A0(r208165) >>>> @@ -503,7 +503,10 @@ smp_topo_none(void) >>>> =A0 =A0 =A0 =A0top =3D &group[0]; >>>> =A0 =A0 =A0 =A0top->cg_parent =3D NULL; >>>> =A0 =A0 =A0 =A0top->cg_child =3D NULL; >>>> - =A0 =A0 =A0 top->cg_mask =3D (1 << mp_ncpus) - 1; >>>> + =A0 =A0 =A0 if (mp_ncpus =3D=3D sizeof(top->cg_mask) * 8) >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 top->cg_mask =3D -1; >>>> + =A0 =A0 =A0 else >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 top->cg_mask =3D (1 << mp_ncpus) - 1; >>>> =A0 =A0 =A0 =A0top->cg_count =3D mp_ncpus; >>>> =A0 =A0 =A0 =A0top->cg_children =3D 0; >>>> =A0 =A0 =A0 =A0top->cg_level =3D CG_SHARE_NONE; >>>> >>> >>> ... and this is why I particulary hate big commits with complete lack >>> of technical details. >>> >>> This particulary chunk was supposed to fix a nasty and completely MI >>> bug that some users have already met (kern/148698). The complete lack >>> of details didn't help in identify the issue neither that it was a >>> valuable fix. >>> >>> The fix is, however, improper (there is no clear relationship between >>> the multiplication and why that happens) thus I would rather use what >>> Joe has reported in the PR. >> >> >> I was not aware of the PR when I sent this changes to rrs@, and this >> went as a part of MIPS SMP support for XLR which has 32 CPUs >> >> But I'm not sure that the current change is correct, cg_mask is of >> type cpumask_t and I don't think it is guaranteed to be 32 bit (as it >> is a machine dependent type). > > Actually the 32 bits limit is well aware and acknowledged in cpumask_t. > While it is true that it should be an 'opaque' type, in reality it is > not. The maximum limit of 32 CPUs is a reality due to cpumask_t on all > our architectures. > That is why we are going to use cpuset_t for dealing with CPUs numbers > (which is really opaque, at same extent, and is not bound to any > size). In my opinion, your changes added another pitfall for the person who tries to make the cpumask_t 64 bit to support more cpus, which really could have been avoided. But if cpumask_t is going to be changed to cpuset_t soon, I guess we are fine :) JC.