From owner-freebsd-current@FreeBSD.ORG Thu Jun 2 04:23:30 2011 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 F027C106564A for ; Thu, 2 Jun 2011 04:23:30 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7107C8FC0C for ; Thu, 2 Jun 2011 04:23:30 +0000 (UTC) Received: by gwb15 with SMTP id 15so316836gwb.13 for ; Wed, 01 Jun 2011 21:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:x-openpgp-key-id:x-openpgp-key-fingerprint :x-openpgp-key-url; bh=UQQlZ6fKiyHVWf4ot8u9iWZIdiLlVx3L4qSNzT22ERg=; b=vcqCZq2EJhNAobhuG9Y0yeiI/j4iLAt7nS+jq/GXQKYu9OpPiD3dT9wvtloeMwODtJ jKr8G1nOiuJe4pa/bF0QPDusjUGKCJRzhgfWc0P+HeIxhQmqvWuCjvk/JSeqeNtnLH2B GnmRguX0REccdv0TSJdg+z++rYkZCLFz1sL64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :x-openpgp-key-id:x-openpgp-key-fingerprint:x-openpgp-key-url; b=pgIpV/r6eYfvheMQS5z9WRUSos5q2KA808LGLUng+pLuW9fHYD964vxUEfpndfDeSQ R1hZV4wWSqBWTolQL6jC4li7Vl/Dz0gKS1HIS8VbtslpYhPeAzMcEfZwszLlz2snIs7i JiAOFkDVo6wACykvAZkSMeYq1sSKEnkep+4Fs= Received: by 10.150.31.4 with SMTP id e4mr245561ybe.127.1306988609580; Wed, 01 Jun 2011 21:23:29 -0700 (PDT) Received: from DataIX.net (adsl-99-19-42-166.dsl.klmzmi.sbcglobal.net [99.19.42.166]) by mx.google.com with ESMTPS id d30sm128733ybd.24.2011.06.01.21.23.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 21:23:27 -0700 (PDT) Sender: "J. Hellenthal" Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.4/8.14.4) with ESMTP id p524NSxx005509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Jun 2011 00:23:28 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.4/8.14.4/Submit) id p524NQdv005501; Thu, 2 Jun 2011 00:23:26 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Thu, 2 Jun 2011 00:23:26 -0400 From: Jason Hellenthal To: Attilio Rao Message-ID: <20110602042326.GA3103@DataIX.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E X-OpenPGP-Key-URL: http://bit.ly/0x89D8547E Cc: Nick Esborn , Marius Strobl , freebsd-current@freebsd.org, Sergey Kandaurov , Sean Bruno Subject: Re: [PATCH] Add the infrastructure for supporting an infinite number of CPUs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jhell@DataIX.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2011 04:23:31 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Attilio, AWESOME! to say the least, but I am sure there is a LOT more to be said. Thank YOU! On Wed, Jun 01, 2011 at 02:21:30PM -0400, Attilio Rao wrote: > Current maximum number of CPUs supported by the FreeBSD kernel is 32. > That number cames from indirectly by the fact that we have a cpumask_t > type, representing a mask of CPUs, which is an unsigned int right now. > I then made a patch that removes the cpumask_t type and uses cpuset_t > type for characterizing a generic mask of CPUs: > http://www.freebsd.org/~attilio/largeSMP/largeSMP-patchset-beta-0.diff >=20 > This is part of a bigger effort which brought to serveral smaller > commits along the way, in order to fix some edge cases. >=20 > Things to pay attention at: > - Userland and kerneland cpuset_t size can be different, thus when > accessing to a kernel cpuset_t object from userland (via kvm_read() > for example) a pattern similar to what pmccontrol does, in this patch, > should be followed > - There are some cpuset_t object in pcpu representing curcpu mask and > !curcpu mask. With transition from cpumask_t to cpuset_t they become > inefficient and not really useful. The next weeks I'll focus on > removing them and make a smarter usage of the cpuset_t interface. > Additively, please note that right now I clobbered pcpu accesses > under scheduler pinnings, because it is possible more than a single > atomic operation is needed for accessing a cpuset_t. When the cleanup > happens those pinnings will go away. > - I had to introduce, among the other things, functions for > representing cpuset_t object in "visual" way, thus > cpusetobj_strprint() and cpusetobj_strscan(). I got the desired format > from what Linux already does, so that someone may be already used to > it. Anyway strings will be represented as a serie of long, hexadecimal > long words, all separated by ", ". The left-most represents the higher > word, following natural bits representation. > - I used cpusetobj_strscan() for implementing KTR_CPUMASK in a way it > supports cpuset_t. Change the kernel config appropriately. > - No MAXCPU has been bumped in the patch, but I encourage you to do so > with your own kernel configurations. >=20 > I really need to commit this patch before code slush happens, thus I > plan to commit it on June 7th, if no one reports bugs or can make good > point on his reviews. Please note that the patch has been greatly > tested and reviewed on all FreeBSD tier-1 and tier-2 architectures. > Anyway more testing and reviews are welcome to happen. >=20 > Thanks, > Attilio >=20 >=20 > --=20 > Peace can only be achieved by understanding - A. Einstein > _______________________________________________ > 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" --=20 "Unity can only be manifested by the Binary. Unity itself and the idea of U= nity are already two." -- Buddha Regards, (jhell) Jason Hellenthal --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) Comment: http://bit.ly/0x89D8547E iQEcBAEBAgAGBQJN5xA9AAoJEJBXh4mJ2FR+RLYIAJl7YVG8e8jB2BnzrGusvprj vHlv6n43XXV3/amnecnavhcS0tcTv4VrAwjOgCUmQj/OVDrt12TckSIwrrgCb1OC 3Ga8z/8Rd3sK1LBGsLZ67eVSc/eALGhuKpCCSwxMGeoBZ1cIStSmx6dskYYiXuTA wXz7aS6MKQCjwWK/7a1iEcN0nNHKENRnIeIAnvyR5LaMH6UePo7hI6vvTQym5aHK slkZc5voWRYPzYA6AUNGzMmk4uDk7+b4/8TbPL1vqQsDdYn+T9HB8YFCzK57kEcE egaHt1F12xf2aMhJgKvvymwlpWfTLeYjl+g+5SFpAuVmPOdks/LJh0RI23EcsN8= =DQtV -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--