From owner-freebsd-current@FreeBSD.ORG Wed Jun 1 20:18:09 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 CAD31106564A; Wed, 1 Jun 2011 20:18:09 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 52B6C8FC13; Wed, 1 Jun 2011 20:18:08 +0000 (UTC) Received: by vxc34 with SMTP id 34so212260vxc.13 for ; Wed, 01 Jun 2011 13:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lvCrJFGfoBD9IoC5ZJdV3lep3urc0TRqpaQZ8lUhQsk=; b=omnNBYVJL7E4y0xL0ohMP6PI2XxrF+u6lqBL4wThUyaz42ChWCFcGsTJE2AXCRy/ku cCJuYPNySQbnq9PWd01Qkzqdo4NAc6c4ZpGIsuvDj9UOgXpz467tTe6Eb8AR/G8jyuEx jjlx4QW1t+Of5OU8ptFzhro2XDPoplk6jUtlQ= 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; b=p8zflTSr4NU7lgrxSduaVYPMOJV4BM5K8mt9FBQiqfYn+pxglsT4pMSM2oaUtep5p8 rnb+SeX1hSP9fdDgTEIUcbmYQ4aMs4m4hGWnlEAE6i9mEKA0rgX5sJbdj8I2V5kV59/4 2wsfBXpx3hWLre3U7EJReRYZgBUEjGBmDDM3k= MIME-Version: 1.0 Received: by 10.52.175.132 with SMTP id ca4mr2438323vdc.98.1306957605226; Wed, 01 Jun 2011 12:46:45 -0700 (PDT) Received: by 10.52.107.97 with HTTP; Wed, 1 Jun 2011 12:46:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jun 2011 12:46:45 -0700 Message-ID: From: Jack Vogel To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 20:18:09 -0000 Awesome, glad to see this happening :) Jack On Wed, Jun 1, 2011 at 11:21 AM, 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 > > This is part of a bigger effort which brought to serveral smaller > commits along the way, in order to fix some edge cases. > > 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. > > 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. > > Thanks, > Attilio > > > -- > 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" >