From owner-freebsd-arch@FreeBSD.ORG Sun May 29 03:06:33 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 E3EBB1065672; Sun, 29 May 2011 03:06:32 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 724C18FC15; Sun, 29 May 2011 03:06:32 +0000 (UTC) Received: by yie12 with SMTP id 12so1508013yie.13 for ; Sat, 28 May 2011 20:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ln1aS4EpWu2Ff3myz6p94p4tr36E1rJ0kO7si9kf/io=; b=pO2k4XNYTSwU5VB5OUYGJ4zXs/Z9WYRge8TgmYa8ySwazkcI+Yq5G8B/76PyvTht2u Sf0csGc+hpca8hsToqg1VhMV0bdsegR5aAa+uPA6tf2ErEXycurq8YGfIc/hkt1XjNWF /MJK467pDgZTHopZ9IB/GSHZWUZy9hlt3Ms3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Wc0RaJa6AQwL5ZZMmVZSD5zyla9+r8dEF1bxSVaHKIH8d2kB9Gzah240xBDeL8gqHT 6B7g9yJFLIC/rPfgp26FB2QRtRamb0bbBPq9FSpijm8w0tqMRnNlUsN5DSjc0i0hi6gC Zpv85zb1+XJm+TM638V04eLgeousK23QTXdLk= MIME-Version: 1.0 Received: by 10.236.184.67 with SMTP id r43mr1456317yhm.103.1306638391582; Sat, 28 May 2011 20:06:31 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.103.136 with HTTP; Sat, 28 May 2011 20:06:31 -0700 (PDT) In-Reply-To: References: <4DD3F662.9040603@FreeBSD.org> <4DD54C18.8050305@FreeBSD.org> <4DDA8B2A.6010500@FreeBSD.org> <4DDD2B34.5070702@FreeBSD.org> Date: Sat, 28 May 2011 23:06:31 -0400 X-Google-Sender-Auth: IIc0Uygr-f8wMAEEUsr1T_8RmV0 Message-ID: From: Attilio Rao To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Sun, 29 May 2011 03:06:33 -0000 2011/5/28 Attilio Rao : > 2011/5/25 Andriy Gapon : >> 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. =C2=A0One thing is that curr= ently we have >>> handling of machdep.hyperthreading_allowed tunable under SCHED_ULE. =C2= =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 t= o convert >>> hlt_logical_cpus mask to a set of individual hint.lapic.X.disabled, but= I don't >>> see very much value in that. =C2=A0But if there is a good reason to kee= p 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 don't see the point in keeping alive mp_grab_cpu_hlt() and > supporting, actually. > > On the top of your patch I made some modifies that use directly > ap_watchdog() in cpu_idle() which I think is better for the time > being: > http://www.freebsd.org/~attilio/avg_rem_cpuhlt.diff > > If you are happy with it, just commit as long as Garrett tests that. > > On a second round of changes we can discuss mp_watchdog and eventual > removal / improvements to it. I almost forgot: this change would also require an UPDATE entry, where you explicitly mention the "new" way to deal with CPUs. Use your prefer wording. Attilio --=20 Peace can only be achieved by understanding - A. Einstein