From owner-freebsd-performance@FreeBSD.ORG Mon Mar 12 20:52:15 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D78B106564A; Mon, 12 Mar 2012 20:52:15 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE01F8FC20; Mon, 12 Mar 2012 20:52:14 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so4114176bkc.13 for ; Mon, 12 Mar 2012 13:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=G8uMeOWQPUyE1yCOmjIaBCA4CSqW14hWDV4ZHlI6aHs=; b=XBG+Qmf8W04pHe5MUXOqO8+LS62dJV28rVYelUB9bd6H/c7lhCAweQ1VVcecLmi68R z/ircW1NrAVh8naRNStxlq3NkE+yQgZpp2L4gDFSB4njgj8/viSCu5V55PdEHpPG0wdB bBizCFJ+SWn8aV6yL7VxsKps96KYJ2q4FddeaWUhbT4yg1NpKKrGDQH8aQ82PhImfnLU f3wMJre2lbY5s3nS24ACs83bGP4eUFCKc13QBZ9pYrDaLAKoGJeEsVMRCtKuXe080sY8 k+Rjo5DroHIGnFh6/ABP9D6hgAXnnLzizYx7Ypns8bGHksoU/Wbp40NQOSw+kVbD+hQK nJ9w== Received: by 10.204.152.88 with SMTP id f24mr1095559bkw.121.1331585533685; Mon, 12 Mar 2012 13:52:13 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id f5sm27713986bke.9.2012.03.12.13.52.11 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 13:52:12 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F5E61FA.5080306@FreeBSD.org> Date: Mon, 12 Mar 2012 22:52:10 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120226 Thunderbird/10.0.2 MIME-Version: 1.0 To: Ian Lepore References: <4F5E4B57.1050605@FreeBSD.org> <1331585159.1084.3.camel@revolution.hippie.lan> In-Reply-To: <1331585159.1084.3.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 13 Mar 2012 01:02:31 +0000 Cc: freebsd-performance@freebsd.org, FreeBSD current Subject: Re: Improved Intel Turbo Boost status/control X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 20:52:15 -0000 On 03/12/12 22:45, Ian Lepore wrote: > On Mon, 2012-03-12 at 21:15 +0200, Alexander Motin wrote: >> I'd like to note that recent r232793 change to cpufreq(4) in HEAD opened >> simple access to the Intel Turbo Boost status/control. I've found that >> at least two of my desktop systems (based Nehalem and SandyBridge Core >> i7s) with enabled Intel Turbo Boost in BIOS it is not use it by default, >> unless powerd is enabled. And before this change it was difficult to >> detect/fix. >> >> ACPI reports extra performance level with frequency 1MHz above the >> nominal to control Intel Turbo Boost operation. It is not a bug, but >> feature: >> dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ... >> In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz. >> >> After boot with default settings I see: >> dev.cpu.0.freq: 2933 >> , that means Turbo Boost is disabled. >> >> Enabling powerd or just adding to rc.conf >> performance_cpu_freq="HIGH" >> enables Turbo Boost and adds extra 10-20% to the system performance. >> >> Turbo Boost operation can be monitored in run-time via the PMC with >> command that prints number or really executed cycles per CPU core: >> pmcstat -s unhalted-core-cycles -w 1 >> > > The r232793 patch applies cleanly to 8-stable and builds just fine, but > after install/reboot I don't see a change in the freq_levels > > revolution> sysctl dev.cpu.0 > dev.cpu.0.%desc: ACPI CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.P001 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.coretemp.delta: 70 > dev.cpu.0.coretemp.resolution: 1 > dev.cpu.0.coretemp.tjmax: 101.0C > dev.cpu.0.coretemp.throttle_log: 0 > dev.cpu.0.temperature: 31.0C > dev.cpu.0.freq: 3333 > dev.cpu.0.freq_levels: 3333/130000 3200/117000 3067/105000 > 2933/94000 2800/85000 2667/76000 2533/68000 2400/61000 > 2267/54000 2133/48000 2000/43000 1867/39000 1733/35000 > 1600/32000 1400/28000 1200/24000 1000/20000 800/16000 600/12000 > 400/8000 200/4000 > dev.cpu.0.cx_supported: C1/32 C2/96 C3/128 > dev.cpu.0.cx_lowest: C1 > dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 657us > revolution> > > > I would have expected a 3334 entry to appear after the reboot. Is this > expected (like are there other required changes missing in 8-stable), or > do I have something misconfigured? (I can post more info, but don't > want to spam the list if the answer is going to be "this shouldn't work > in 8.x). I don't know any reason why it should not work on 8.x. It is ACPI BIOS duty to report set of frequencies. This patch just makes system to follow it more close. Make sure your CPU supports Turbo Boost and it is enabled in BIOS. On my system disabling Turbo Boost in BIOS removes the frequency from the list. -- Alexander Motin