From patchwork Thu May 8 19:57:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dirk.brandewie@gmail.com X-Patchwork-Id: 4138431 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD2B3BFF02 for ; Thu, 8 May 2014 19:58:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDACF20270 for ; Thu, 8 May 2014 19:58:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2393B202D1 for ; Thu, 8 May 2014 19:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932117AbaEHT5o (ORCPT ); Thu, 8 May 2014 15:57:44 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:40336 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755192AbaEHT5n (ORCPT ); Thu, 8 May 2014 15:57:43 -0400 Received: by mail-pd0-f180.google.com with SMTP id y10so2748122pdj.11 for ; Thu, 08 May 2014 12:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yeknVBEvA4dn8aCTDjoW8jCKY3BVh1WIPpDO0uykQB0=; b=fRX6sVkjCNQTa78dG6lYEtExPgSWbQvz82Ab5fGYM5GXDXwtsEeQj0uV8Qoi5eGT16 2EodQgS3s/UBmg7iIyqOs1ts4liS51dZzbIJ+cwmXXil22CkacO5+5v5xPMaadciQvmZ S73ZYMF55l5D6RqFSkCb53JKK3D0xs6uuLvuCwGiR31wHSqFGTTl0iBGMhu2kpaaJMlo pzUohABLwwr+xVbtgDwaSBvDWPFJurYbJiz9z0B6OQ2Z5f3RUtkGp4iTWQkm9GO1tEKE qBpZpKanDA5SmgeentF0TPHMC5JASbtxnIX+nFoHwRSYC8HHverxdsVQO9xWca7Dw7MO VTHg== X-Received: by 10.66.253.170 with SMTP id ab10mr11314837pad.53.1399579062618; Thu, 08 May 2014 12:57:42 -0700 (PDT) Received: from echolake.localdomain (static-50-43-42-35.bvtn.or.frontiernet.net. [50.43.42.35]) by mx.google.com with ESMTPSA id yo9sm8436026pab.16.2014.05.08.12.57.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 May 2014 12:57:41 -0700 (PDT) X-Google-Original-From: dirk.j.brandewie@intel.com From: dirk.brandewie@gmail.com To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, dirk.brandewie@gmail.com, Dirk Brandewie Subject: [PATCH 2/5] intel_pstate: remove setting P state to MAX on init Date: Thu, 8 May 2014 12:57:24 -0700 Message-Id: <1399579047-5792-3-git-send-email-dirk.j.brandewie@intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1399579047-5792-1-git-send-email-dirk.j.brandewie@intel.com> References: <1399579047-5792-1-git-send-email-dirk.j.brandewie@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dirk Brandewie Setting the P state of the core to max at init time is a hold over from early implementation of intel_pstate where intel_pstate disabled cpufreq and loaded VERY early in the boot sequence. This was to ensure that intel_pstate did not affect boot time. This in not needed now that intel_pstate is a cpufreq driver. Removing this covers the case where a CPU has gone through a manual CPU offline/online cycle and the P state is set to MAX on init and the CPU immediately goes idle. Due to HW coordination the P state request on the idle CPU will drag all cores to MAX P state until the load is reevaluated when to core goes non-idle. Reported-by: Patrick Marlier Signed-off-by: Dirk Brandewie --- drivers/cpufreq/intel_pstate.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 39c4f85..eab8ccf 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -554,12 +554,7 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) if (pstate_funcs.get_vid) pstate_funcs.get_vid(cpu); - - /* - * goto max pstate so we don't slow up boot if we are built-in if we are - * a module we will take care of it during normal operation - */ - intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate); + intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); } static inline void intel_pstate_calc_busy(struct cpudata *cpu, @@ -704,11 +699,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum) cpu = all_cpu_data[cpunum]; intel_pstate_get_cpu_pstates(cpu); - if (!cpu->pstate.current_pstate) { - all_cpu_data[cpunum] = NULL; - kfree(cpu); - return -ENODATA; - } cpu->cpu = cpunum; @@ -719,7 +709,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum) cpu->timer.expires = jiffies + HZ/100; intel_pstate_busy_pid_reset(cpu); intel_pstate_sample(cpu); - intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate); add_timer_on(&cpu->timer, cpunum);