From owner-svn-src-stable-10@FreeBSD.ORG Thu Jan 9 10:44:27 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEC062F9; Thu, 9 Jan 2014 10:44:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9A88160E; Thu, 9 Jan 2014 10:44:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09AiRfM083491; Thu, 9 Jan 2014 10:44:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09AiRZ7083490; Thu, 9 Jan 2014 10:44:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401091044.s09AiRZ7083490@svn.freebsd.org> From: Alexander Motin Date: Thu, 9 Jan 2014 10:44:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260473 - stable/10/sys/x86/cpufreq X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 10:44:27 -0000 Author: mav Date: Thu Jan 9 10:44:27 2014 New Revision: 260473 URL: http://svnweb.freebsd.org/changeset/base/260473 Log: MFC r259197: Do not DELAY() for P-state transition unless we want to see the result. Intel manual says: "If a transition is already in progress, transition to a new value will subsequently take effect. Reads of IA32_PERF_CTL determine the last targeted operating point." So seems it should be fine to just trigger wanted transition and go. Linux does the same. Modified: stable/10/sys/x86/cpufreq/est.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/cpufreq/est.c ============================================================================== --- stable/10/sys/x86/cpufreq/est.c Thu Jan 9 10:40:36 2014 (r260472) +++ stable/10/sys/x86/cpufreq/est.c Thu Jan 9 10:44:27 2014 (r260473) @@ -1288,10 +1288,9 @@ est_set_id16(device_t dev, uint16_t id16 msr = (msr & ~0xffff) | id16; wrmsr(MSR_PERF_CTL, msr); - /* Wait a short while for the new setting. XXX Is this necessary? */ - DELAY(EST_TRANS_LAT); - if (need_check) { + /* Wait a short while and read the new status. */ + DELAY(EST_TRANS_LAT); est_get_id16(&new_id16); if (new_id16 != id16) { if (bootverbose)