Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp226584imm; Wed, 18 Jul 2018 00:46:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdRMcHPMujaaolTvD8ZDTr1Zdr/yiW+90vZDxedEM24oLHs/nAoyIanatb4HP1a1pXc8KOq X-Received: by 2002:a62:198e:: with SMTP id 136-v6mr4101755pfz.103.1531899980597; Wed, 18 Jul 2018 00:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531899980; cv=none; d=google.com; s=arc-20160816; b=xiIOs1kKhtArtDfolFJvNcM/iAiOur1cP5Kxjh+kdLpCmqg/VC3rdmKTezXrFkCmmG TEkObJslS8ZBKAPyqQVgLA5vkCD7KuJZuRdAAm8rzjGE0hOvydOd3ObGtYMjrWgm+8fc enY1zzzBvIHyyi4BbWXRzE2dMP2xORxpvvS0l4B7vAgSITomCl4cksBLabV2CIjoFoLe F3dZHiGZ/xr8qWlvjKJVHF6zbkBo0oWPjvsNiXnJnSm+V0hBzhHdx0kTUF6+q1/d9G0j pMizZ9HIl9xDWNAeD8Pds+c6YiLu6H2uau4ih4Zm85XWurjHUUfI+e3ZrVPL494JHi/O RXnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=4OsDnmMykXw8+KX6M4qhILFyM7kyOGwz5shw573DZyE=; b=dAG4YceAecNB0Xl1Zmv5u70rY8NHEw+aiYkYUIvqiiPFdcoUzYJT8dQbvfobGP43OY 4pnXD1h728OKlG0UZv/csK/WKgGpjtiEdUyGIBf8rxBB+vkoUG2TSb86sXCGnd7tfbQv tICZmMb9Up1fgcrsc9CLupeVIu46IjTYuPXR2b3HKqxbw+QYckULdyrU0uH/PnQQKTgp RwAa6+lmsE8ZXod6aH2mgrne0oSZ8C/ZHwA/ScCW+lu7kIX7nBzPj2drskPEBZ5xTbcm mB6pGV8QwRMNieoy5T5dnbuq4mYRx4SjtS5tM8a9N/OSosz30RQ/uJL0k31JvNI4AQjf qMQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EaJFrnuo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x186-v6si2727033pgd.259.2018.07.18.00.46.05; Wed, 18 Jul 2018 00:46:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EaJFrnuo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbeGRIUt (ORCPT + 99 others); Wed, 18 Jul 2018 04:20:49 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:38668 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbeGRIUt (ORCPT ); Wed, 18 Jul 2018 04:20:49 -0400 Received: by mail-oi0-f66.google.com with SMTP id v8-v6so7025933oie.5; Wed, 18 Jul 2018 00:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4OsDnmMykXw8+KX6M4qhILFyM7kyOGwz5shw573DZyE=; b=EaJFrnuoEkUNKFHW3Civ7GB2xA5CDOEj6QtrpltD3E1uVkvH4MWKw3RdDreGHUTM5I PzBgbunU8yN2VFHo/N2d+IDffX9BOXpCILX991aLJOBMAksVYdmcK/ogEePE6T0qE1Ba kM7gVPOp3dzGAbEHm4RcW5X7zvwjN2qIdF9n+ia7T8OXlO1R3XXGsf3+mAfO56iB6ln6 QLKuJKWoNsnLUOWyzn1YKnVffuL27biIrbgEfREsknvD86z6Qs4eHx9cNvC1QSWzzB8s UWXArpwFaXF2P3i2GQObF8lQVMclmpcLKTON/k3bh+W3pfJ2+TRsHXFFcXyr6awkOmad /LOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4OsDnmMykXw8+KX6M4qhILFyM7kyOGwz5shw573DZyE=; b=T7V6TPDgoecVnwoY16Y6hNYAgylUoNRYGqBJZSD8eormAspyf++OeqYtn/i9hjZkzY u9wZr48Us0cjY8O1A1vUaYpnOmaIvZew5c0K2X9SP9NBXtk2xOD4s5C6uoRq5sMMWF2B BUgDEidd7bKeMno6dfNQQY+16V+ShDB7TQTgewevKFlv0BsCjumMpm1AL+NPaC56eRQA j7wT0VBCHqEDbgkv/cElvRwN5sQ3+xwocykuYFpKoafz587UjG+f7nUyk62JJ5Rvt5WZ yD8nuDjpTRWnHBBqEvQIa5kZKfWSCpOUk2mqTI/Tcu1zOvhp+QK6gxOuHDPcELg0XjNZ 0KGw== X-Gm-Message-State: AOUpUlGj2C7Y6cuYNQiiJix0PFuxC7r09rJl/En0BRvQtU6QsjWBfeo3 p/REznREzQGsF7r6EReaLfWs4NQX2C/B2C5wbr8ITA== X-Received: by 2002:aca:ccc4:: with SMTP id c187-v6mr5010886oig.282.1531899855037; Wed, 18 Jul 2018 00:44:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 00:44:14 -0700 (PDT) In-Reply-To: <20180717201323.6rwb4yklq46cmtom@suselix> References: <20180717065048.74mmgk4t5utjaa6a@suselix> <306375154.NhdH6AhdAd@aspire.rjw.lan> <5423012.ZZnfdYddaT@aspire.rjw.lan> <20180717201323.6rwb4yklq46cmtom@suselix> From: "Rafael J. Wysocki" Date: Wed, 18 Jul 2018 09:44:14 +0200 X-Google-Sender-Auth: T53LXHx4scQlqfULBctvPTIxLqI Message-ID: Subject: Re: [PATCH v2] cpufreq: pcc-cpufreq: Disable dynamic scaling on many-CPU systems To: Andreas Herrmann Cc: "Rafael J. Wysocki" , Linux PM , "Rafael J. Wysocki" , Peter Zijlstra , Frederic Weisbecker , Viresh Kumar , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 10:13 PM, Andreas Herrmann wrote: > On Tue, Jul 17, 2018 at 06:14:58PM +0200, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> The firmware interface used by the pcc-cpufreq driver is >> fundamentally not scalable and using it for dynamic CPU performance >> scaling on systems with many CPUs leads to degraded performance. >> >> For this reason, disable dynamic CPU performance scaling on systems >> with pcc-cpufreq where the number of CPUs present at the driver init >> time is greater than 4. Also make the driver print corresponding >> complaints to the kernel log. >> >> Reported-by: Andreas Herrmann >> Signed-off-by: Rafael J. Wysocki >> --- >> >> -> v2: Rework the messages printed in the problematic case. > > I've tested this patch. Effect is as expected: driver loads but use of > ondemand governor is not allowed. Sample output: > > [ 40.757519] pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz > [ 40.831705] pcc_cpufreq_init: Too many CPUs, dynamic performance scaling disabled > [ 40.898353] pcc_cpufreq_init: Try to enable a different scaling driver through BIOS settings > [ 40.972327] pcc_cpufreq_init: and complain to the system vendor > [ 41.025620] cpufreq: Can't use ondemand governor as dynamic switching is disallowed. Fallback to performance governor > ... > [ 41.187928] cpufreq: Can't use ondemand governor as dynamic switching is disallowed. Fallback to performance governor > > Last message is shown for each online CPU in the system (ie. 120x). > > Looks good to me. Thanks a lot! Please also try https://patchwork.kernel.org/patch/10530321/ Cheers, Rafael