From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 99404B7CCD for ; Tue, 26 Jan 2010 15:27:18 +1100 (EST) Subject: Re: [PATCH 2/2] powerpc: implement arch_scale_smt_power for Power7 From: Benjamin Herrenschmidt To: Joel Schopp In-Reply-To: <4B5DD9F1.2010002@austin.ibm.com> References: <1264017638.5717.121.camel@jschopp-laptop> <1264017847.5717.132.camel@jschopp-laptop> <26556.1264021443@neuling.org> <4B577F1A.9060907@austin.ibm.com> <1264302028.3601.36.camel@pasglop> <4B5DD9F1.2010002@austin.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 26 Jan 2010 15:23:56 +1100 Message-ID: <1264479836.3601.113.camel@pasglop> Mime-Version: 1.0 Cc: Michael Neuling , Peter Zijlstra , ego@in.ibm.com, linux-kernel@vger.kernel.org, Ingo Molnar , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2010-01-25 at 11:50 -0600, Joel Schopp wrote: > > Look at the cputhreads.h implementation ... Today we only support > > power-of-two numbers of threads. > > > I've run 3 threads using cpu hotplug to offline 1 of the 4. It's > certainly a stupid idea, but there you go. Oh, you mean you need to use the actual online count ? In which case, yes, you do indeed need to be a bit more careful... In this case though, you're probably better off special casing "3" :-) Cheers, Ben.