From owner-freebsd-arch@FreeBSD.ORG Sun May 22 16:57:05 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0325F106564A; Sun, 22 May 2011 16:57:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 87A7B1508CD; Sun, 22 May 2011 16:57:03 +0000 (UTC) Message-ID: <4DD9405D.7040509@FreeBSD.org> Date: Sun, 22 May 2011 20:57:01 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <201105152003.p4FK3tnS050889@svn.freebsd.org> <20110522093302.GA2638@mole.fafoe.narf.at> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig92DE353C391DD26D85323A2A" Cc: Adrian Chadd , Stefan Farfeleder , Marcel Moolenaar , freebsd-arch@freebsd.org Subject: (was: svn commit: r221972 - head/sys/geom/part) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 16:57:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig92DE353C391DD26D85323A2A Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 22.05.2011 20:26, Warner Losh wrote: >> Is it possible to disable this by default for now and have it just >> warn loudly? And/or hide the default value behind a kernel >> configuration variable so we can disable it (but still get the >> warnings) for now? >=20 > Or just delete it entirely as a bad idea? We had this with Marcel's > warning for a long time that turned out to be utterly bogus so we > removed it. I think it is better to solve the problem itself, and not just hide it under warning. May be it is time to remove strict geometry checks and conversions that MBR scheme does. It seems in the world only we still support them. --=20 WBR, Andrey V. Elsukov --------------enig92DE353C391DD26D85323A2A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJN2UBdAAoJEAHF6gQQyKF6eRkH/A0HbZgSJqBEbYZ95KkB8AHW 5H1fVNnbKTLrk0dVCIHOXhb+GO87QQ8WEWT2OnW5tUw4qjbg25LY2kkVbhgJISfB twaqu81QRavfq7ZRs5o5a59Wr8oTQOOOEaU1/uIjtlkH6i2udvQPBl/Rsv0cemdv Hmm+B/hDSP7hb1myUH1/W+8EZuKrM5M4txD0MVQwY6MrgogJhyAu6UP0fI1vLYRl C4LZAfx6dEbn8gM8PE6Y/LD33AMmS6ZOX2dw1noOqtDUhm2Ebg2LOVK1Nh9V09u0 APTRUZhCsEzmAg0roCc8DUJU+9xhGY7f+B/yTj35gScSC+hYM7c7hSv8fgkYwV8= =x+8j -----END PGP SIGNATURE----- --------------enig92DE353C391DD26D85323A2A-- From owner-freebsd-arch@FreeBSD.ORG Mon May 23 16:28:30 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0026106566B; Mon, 23 May 2011 16:28:30 +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 9F0D18FC12; Mon, 23 May 2011 16:28:29 +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 TAA14756; Mon, 23 May 2011 19:28:27 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DDA8B2A.6010500@FreeBSD.org> Date: Mon, 23 May 2011 19:28:26 +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> In-Reply-To: <4DD54C18.8050305@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , "freebsd-current@freebsd.org" , "freebsd-arch@freebsd.org" Subject: Re: [rfc] remove hlt_cpus et al sysctls and related code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 16:28:30 -0000 on 19/05/2011 19:58 Andriy Gapon said the following: > on 18/05/2011 20:04 Attilio Rao said the following: >> 2011/5/18 Garrett Cooper : >>> We use this internally at work still with a software config that uses 4BSD so >>> as long as there is an equivalent tunable, that's good enough for us moving >>> forward. > > Can you please clarify which exactly tunable(s) do you use/need? > Just turning hyperthreading on/off or more? (BTW, doing that via BIOS is > inconvenient / not feasible?) > > BTW, I think that if we switch hyperthreading off then we better off not sending > Start IPI to the logical CPUs at all. > >> Tunables are pretty much acceptable for this case. What is really broken is the >> on-the-fly ability to mark CPUs active/inactive and subsequent handovers. > > Yes, I completely agree. Static disabling of CPUs doesn't have any problems, and > IMO, currently the best way to do it is with hint.lapic.X.disabled. > >> I thought Andriy attached a patch to the tree, but it doesn't seem so... >> anyway, yes, I think that adding tunables for this is very reasonable and not >> as dangerous as the current mechanism. > > I agree. > I haven't sent a patch, because I don't have it yet :) > I decided to solicit opinions before getting to hacking code. > 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. Thank you. -- Andriy Gapon From owner-freebsd-arch@FreeBSD.ORG Wed May 25 16:15:51 2011 Return-Path: Delivered-To: freebsd-arch@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-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture 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 From owner-freebsd-arch@FreeBSD.ORG Wed May 25 16:30:10 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 459971065676; Wed, 25 May 2011 16:30:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 93F2B8FC20; Wed, 25 May 2011 16:30:09 +0000 (UTC) Received: by vws18 with SMTP id 18so8099084vws.13 for ; Wed, 25 May 2011 09:30: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 :content-transfer-encoding; bh=jiZgUomQQZNxMqa3ArR2qFKvVvMueYMA4XqALgZ00YA=; b=ZYu5Mv3pwxUSUOLnozeAzKvMTFliAtDF7qgfCcJZI0PQ/ztEUm0qL9MyUISy5zR4cm zHmWxFti4TK0q191akdj3eOBFhCw/lDfW4kJ1czthoEugzQ15P83m97PsgqT2admf7Ek sBt8kB/Ss+Z0BL+Z57Gtxpg9KIefOuEMrqQ+E= 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=PirJnw+XTnpDiNd1ytc1CQP1zAzVz9kwr509ejvIfQZdMrItkEiStq9stIv4eHGpEh uH9KUiFIDsFoM8pIFq2qqrgSEzE8f9PWRY86halzrL+e7roYpPg41cDaI1UjxkwR6WHY QNPYTjGsGH1F9zQ5TwFaflijCrhP2AqThPdus= MIME-Version: 1.0 Received: by 10.220.105.75 with SMTP id s11mr1597645vco.73.1306341008527; Wed, 25 May 2011 09:30:08 -0700 (PDT) Received: by 10.220.183.11 with HTTP; Wed, 25 May 2011 09:30:08 -0700 (PDT) In-Reply-To: <4DDD2B34.5070702@FreeBSD.org> References: <4DD3F662.9040603@FreeBSD.org> <4DD54C18.8050305@FreeBSD.org> <4DDA8B2A.6010500@FreeBSD.org> <4DDD2B34.5070702@FreeBSD.org> Date: Wed, 25 May 2011 09:30:08 -0700 Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , "freebsd-current@freebsd.org" , "freebsd-arch@freebsd.org" Subject: Re: [rfc] remove hlt_cpus et al sysctls and related code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 16:30:10 -0000 On Wed, May 25, 2011 at 9:15 AM, Andriy Gapon wrote: > 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 C= PU on each >> real core >> >> The above should already work as expected. =A0One thing is that currentl= y we have >> handling of machdep.hyperthreading_allowed tunable under SCHED_ULE. =A0I= 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. =A0But if there is a good reason to keep th= at 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. =A0It seems to have the same issues wit= h respect > to dynamic CPU state change. =A0Besides its compilation is disabled when = SCHED_ULE > is enabled. =A0mp_watchdog is a nice idea, but I wonder if anyone actuall= y uses it > (with success). I'll have to test out the patch, but at first glance it seems ok (at least the machdep.hyperthreading_allowed changes which $WORK depends upon). Thanks! -Garrett