From owner-freebsd-arch@FreeBSD.ORG Sun May 29 02:48:53 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 BF165106564A; Sun, 29 May 2011 02:48:53 +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 507248FC0C; Sun, 29 May 2011 02:48:52 +0000 (UTC) Received: by yie12 with SMTP id 12so1505070yie.13 for ; Sat, 28 May 2011 19:48:52 -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=0eTAUQgQho0KpjQcgkjSA1pNkan8lLU+mZeSQZ4lZj8=; b=nHdH+jvqd97nQwklgCAnNcGhKz1hsm1pymRILlVaks/ccL5qi1aka+Z9NuxVYM0SXa Tx4KRnWEDq1zljTLjJjtfP/AVF4JA/HT+hn46eCeTylEYATbPacAtLoT8xM3TY7jVZHS YSc5FfsEnPCCl6DB24pYkhOQGclnaPqQljrWs= 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=QJ3l1VmxEB6KdICxSpamHZD0HvJhzrUs5wHVQ4kIRR4fnqwZ29PAhvY6OjpkfRaUEs eJmlBGvUjjOJEMQGLxTaUNWe7dXsM3G5sk5+DX/VQJ9l7Z16+acNJgXmOfS26WF7IyqX EP3xhcuyMdHqmOv3HPjvAr0etLIDkw34QKGSw= MIME-Version: 1.0 Received: by 10.236.175.38 with SMTP id y26mr4577500yhl.304.1306637332392; Sat, 28 May 2011 19:48:52 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.103.136 with HTTP; Sat, 28 May 2011 19:48:52 -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: Sat, 28 May 2011 22:48:52 -0400 X-Google-Sender-Auth: hyYqyUUVDjH52ldX2USa0amNndI 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 02:48:53 -0000 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 C= PU on each >> real core >> >> The above should already work as expected. =C2=A0One thing is that curre= ntly 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 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. =C2=A0But 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 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. Attilio --=20 Peace can only be achieved by understanding - A. Einstein