From owner-freebsd-current@FreeBSD.ORG Wed Sep 3 19:42:31 2008 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 59209106564A for ; Wed, 3 Sep 2008 19:42:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id C946B8FC14 for ; Wed, 3 Sep 2008 19:42:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id m83JBvO8011665; Wed, 3 Sep 2008 20:11:57 +0100 (BST) Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Kaxll-0002VR-Kd; Wed, 03 Sep 2008 20:11:57 +0100 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.2/8.14.2) with ESMTP id m83JBvfY063168; Wed, 3 Sep 2008 20:11:57 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.2/8.14.2/Submit) with ESMTP id m83JBupa063160; Wed, 3 Sep 2008 20:11:57 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Wed, 3 Sep 2008 20:11:56 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: David Naylor In-Reply-To: <200809011921.40737.naylor.b.david@gmail.com> Message-ID: <20080903200611.Y57629@ury.york.ac.uk> References: <200809011921.40737.naylor.b.david@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: freebsd-current@FreeBSD.org Subject: Re: powerd and multicore 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, 03 Sep 2008 19:42:31 -0000 On Mon, 1 Sep 2008, David Naylor wrote: > The way I understand powerd works by default is that it monitors the CPU usage > (or idleness) and changes the CPU frequency accordingly. The default values > are >95% idle => decrease frequency; <65% idle => increase frequency. > > The problem arises when you have a system with 4 or more 'cores'. In this > case the first CPU can be running flat out but still report an overall > idleness of 75% and thus the frequency is not increased even though the first > core could easily be stuck, at say 200 when capable of 2400. > > Should powerd be changed to look at CPU specific usage and adjust accordingly > or scale the above defaults according to the number of CPU's. There are a handful of PRs discussing this exact issue, and it is something I was hoping to look into at some point. Have a search for powerd PRs, especially http://www.freebsd.org/cgi/query-pr.cgi?pr=119589 (which contains patches). You may well also be better off discussing this on the -acpi mailing list, which (although this is not strictly related to ACPI) may be the best place to find people ihnterested in power management. > Furthermore, currently (with core 2) all CPU's are controlled using a single > value however (I think) it is possible to have each CPU running on a > different frequency (and at least with some other architectures). Does > powerd handle these cases? I don't believe so, no. I also don't know if the kernel would be ok with CPUs running at different speeds, even if things like timecounters work correctly the scheduler may need to grow some more knowledge of this. Gavin