From owner-freebsd-current@FreeBSD.ORG Wed May 25 16:15:51 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 B8A601065672; Wed, 25 May 2011 16:15:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A01598FC13; Wed, 25 May 2011 16:15:50 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA01088; Wed, 25 May 2011 19:15:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DDD2B34.5070702@FreeBSD.org> Date: Wed, 25 May 2011 19:15:48 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Attilio Rao References: <4DD3F662.9040603@FreeBSD.org> <4DD54C18.8050305@FreeBSD.org> <4DDA8B2A.6010500@FreeBSD.org> In-Reply-To: <4DDA8B2A.6010500@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "freebsd-current@freebsd.org" , "freebsd-arch@freebsd.org" Subject: Re: [rfc] remove hlt_cpus et al sysctls and related code 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, 25 May 2011 16:15:51 -0000 on 23/05/2011 19:28 Andriy Gapon said the following: > I propose the following path for moving forward. > - use hint.lapic.X.disabled to disable individual CPUs by their APIC ID > - use machdep.hyperthreading_allowed tunable to disable second logical CPU on each > real core > > The above should already work as expected. One thing is that currently we have > handling of machdep.hyperthreading_allowed tunable under SCHED_ULE. I plan to > make it unconditional. > > Things to remove: > - all the related sysctls for dynamic onlining/offlining > - machdep.hlt_logical_cpus tunable (it duplicates hint.lapic.X.disabled) > > It's possible to keep machdep.hlt_logical_cpus and just add some code to convert > hlt_logical_cpus mask to a set of individual hint.lapic.X.disabled, but I don't > see very much value in that. But if there is a good reason to keep that tunable, > I am prepared to jump through this hoop. > > If no one objects to this proposal, I will provide a patch soon. The patch is here: http://people.freebsd.org/~avg/cpu-offline-sysctl.diff It should implement the strategy described above. I have mp_watchdog alone for now. It seems to have the same issues with respect to dynamic CPU state change. Besides its compilation is disabled when SCHED_ULE is enabled. mp_watchdog is a nice idea, but I wonder if anyone actually uses it (with success). -- Andriy Gapon