From owner-freebsd-current@freebsd.org Thu Aug 20 16:44:24 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0424F9BEF28 for ; Thu, 20 Aug 2015 16:44:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD2D58C8 for ; Thu, 20 Aug 2015 16:44:23 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by iodt126 with SMTP id t126so52845274iod.2 for ; Thu, 20 Aug 2015 09:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=26FiI+2RzJcChw9Q5HtTWj0txNjrRw4IuzgC/CIU5I0=; b=fzACyHw2VuKrx8mQY/ANPauVsr65YB1F9EqpFq2SDoHC6ttA9CU5j9/tqOhVeXjxkJ tJsNguvWVk7ekh3evyaTYwQvG/RRrEltJg7Oq+Oe4JiBpMUhUxWD81EWNXTBmDf5DxjB +6zCXviyYR9dIxANNozrZA/a3FGSmKUT8ufE5084oBrVsU1D8FpQpn4kVLz2P19jfe/a aW6ceQpLakHQVUhzkvaCmjyp8jHh1Z+yk5ZgChU7yvbhOn68soNfOvvbXkkxv5YTjPAo WRmShTEu7S21PHuYIOMRwX1TEl1ij4S/Tq9sOHfMHGPWJFtbSw7K8uv8QGdUOKE0qNRX ZjEA== MIME-Version: 1.0 X-Received: by 10.107.12.166 with SMTP id 38mr3093248iom.157.1440089063064; Thu, 20 Aug 2015 09:44:23 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.36.58.149 with HTTP; Thu, 20 Aug 2015 09:44:23 -0700 (PDT) In-Reply-To: <7B1D7A3F-DA20-4195-8228-7D3F07790B5C@sundivenetworks.com> References: <7B1D7A3F-DA20-4195-8228-7D3F07790B5C@sundivenetworks.com> Date: Thu, 20 Aug 2015 09:44:23 -0700 X-Google-Sender-Auth: 9Rwv0qdfecgoqDU6rCWVDXbe8Ic Message-ID: Subject: Re: CPU Perf & Power Mgt From: Justin Hibbits To: Will Green Cc: FreeBSD Current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 20 Aug 2015 16:44:24 -0000 On Thu, Aug 20, 2015 at 5:44 AM, Will Green wrot= e: > Hello, > > I=E2=80=99ve been thinking about CPU performance and power management on = FreeBSD recently. As a user it seems like there has been little activity in= this area and I wanted to try and understand what the situation was. > > From the publicly available information on powerd [1], the wiki [2] and m= y attempts to optimize hardware power/performance; it seems the current app= roach is quite old and laptop-focused. Recent CPU designs can control the s= tate and frequency of individual cores very quickly. In the case of a singl= e heavy thread, a multicore CPU might power-gate all but one core so the ac= tive core can be pushed to a higher frequency. This doesn=E2=80=99t seem to= be possible on FreeBSD at the moment: powerd is userland (~250 ms poll) an= d can only control the frequency of all cores together. > > I understand this opens a can of worms as the CPU core states, frequency = and scheduler would all need to co-operate. However, I think it=E2=80=99s i= mportant that this does happen. Without this functionality FreeBSD is leavi= ng performance on the table and consuming more power than other operating s= ystems. At BSDCan I heard that there was work going on for arm systems, but= didn=E2=80=99t manage to get any details and whether it was relevant to am= d64 too. > > TIA, > Will > > PS. I was interested to see Intel announce at IDF that they'll be working= with open source projects to implement "Speed Shift Technology=E2=80=9D, w= hich leaves responsibility for p-state management on the CPU. > > [1] https://www.freebsd.org/cgi/man.cgi?query=3Dpowerd > [2] https://wiki.freebsd.org/TuningPowerConsumption Hi Will, There was a working group at BSDCan this year on power management, and what we need to / can do to bring it up to par with the modern world. Unfortunately, I haven't had any time lately to work on it, but you can read the notes at https://wiki.freebsd.org/201506DevSummit/ClockDomains In short, the goal is to add infrastructure to the kernel to support overall power management of the system, scaling beyond cpufreq/powerd. Looking for volunteers who could do some of this, due to my lack of time to work on it. - Justin