Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5374243pxu; Wed, 21 Oct 2020 23:55:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytQjjOvfloWnvdVnDU0uhUfR4hKiN7AZomA2ySFKm+r0mgUnexPhCVDwWnUrbaMZ1vJ/MB X-Received: by 2002:a05:6402:37a:: with SMTP id s26mr895262edw.268.1603349703243; Wed, 21 Oct 2020 23:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603349703; cv=none; d=google.com; s=arc-20160816; b=QwsSJdXScz+epTxMPPN6yYWCC1+sWefdfNipvsUuKncnd7fb+p1ghzjtCZA73LwCPU dQFB0tyYus9RP4ODqs8LQ+KFTzkDxxVQeFJuooc6WQv/pKmXaymd3tKT2GJFxWK5ib8P NaemHxVu2bnHhz8Fxhkgar9evjli+a0KcLbrLzuryn9zBUVLLOsmYbcCjEhd3tiJrue1 fzHt2XPy1UXybcL9XrmaldDtn2A5A4MhhzFcsZpZ33H9qgTw5bDONiHzADsRxnvqBKuV agJbsysNE/mkn2NN8f8oyHG7I1QMvqj91NiHNr+TopJ2esPjbIC8IG/wCq4Un3TRVNq4 XBBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3nfTyGbNcAXNAhm8JlmFBrlyPGeajpR191oC4PN/icI=; b=tPF25ob2eZLQwRvOlYe4J/mRxZ2WEx/NMe8v0jVBC0kU/moUjb/9v+At17Ud1rl739 apa3uL5XuPzMMdFSxddWRsVjZ6klpac6QFd9gZ2rO3NOx1wyn+mligbfp7B1sXSMWiuv 5LYp+t7Jp/EKdxtqWv7VD1IIyXEN2eCsFc5U4tec4kPpqCEB6HGW9WTHmjYH1mlPTyWy PItRpKqUzJ2rtZ40MYhpTfZzJRRD1TTKbJfd4hp0tgWOoRvHDptXT4MfCbtnVfeExpzN 77Q0lycD181MffllbCzwi5HyNMcnKMBKb1I5EqNKA4l0V+IWt0FyCC9laNJbwMK1ooBI 9CFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si318413eje.149.2020.10.21.23.54.41; Wed, 21 Oct 2020 23:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505287AbgJUU0E (ORCPT + 99 others); Wed, 21 Oct 2020 16:26:04 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:43714 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504936AbgJUU0D (ORCPT ); Wed, 21 Oct 2020 16:26:03 -0400 Received: from 89-77-60-66.dynamic.chello.pl (89.77.60.66) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.491) id 209d3efdcc2be77e; Wed, 21 Oct 2020 22:26:00 +0200 From: "Rafael J. Wysocki" To: Julia Lawall Cc: Peter Zijlstra , Mel Gorman , Ingo Molnar , kernel-janitors@vger.kernel.org, Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Valentin Schneider , Gilles Muller , viresh.kumar@linaro.org, srinivas.pandruvada@linux.intel.com Subject: Re: [PATCH] sched/fair: check for idle core Date: Wed, 21 Oct 2020 22:25:59 +0200 Message-ID: <2376963.UiH3HBYXtl@kreacher> In-Reply-To: References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <20581608.8Dxr8OdOFj@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, October 21, 2020 9:47:51 PM CEST Julia Lawall wrote: > > On Wed, 21 Oct 2020, Rafael J. Wysocki wrote: > > > On Wednesday, October 21, 2020 2:42:20 PM CEST Julia Lawall wrote: > > > > > > On Wed, 21 Oct 2020, Peter Zijlstra wrote: > > > > > > > On Wed, Oct 21, 2020 at 01:56:55PM +0200, Julia Lawall wrote: > > > > > Prior to 5.8, my machine was using intel_pstate and had few background > > > > > tasks. Thus the problem wasn't visible in practice. Starting with 5.8 > > > > > the kernel decided that intel_cpufreq would be more appropriate, which > > > > > introduced kworkers every 0.004 seconds on all cores. > > > > > > > > That still doesn't make any sense. Are you running the legacy on-demand > > > > thing or something? > > > > > > > > Rafael, Srinivas, Viresh, how come it defaults to that? > > > > > > The relevant commits are 33aa46f252c7, and 39a188b88332 that fixes a small > > > bug. I have a Intel(R) Xeon(R) CPU E7-8870 v4 @ 2.10GHz that does not > > > have the HWP feature, even though the cores seemed to be able to change > > > their frequencies at the hardware level. > > > > That's in the range of "turbo" P-states (if a P-state above a certain threshold > > is requested by the governor, the processor has a license to choose P-states > > in the range above this threshold by itself). > > Sorry, but I don't understand this answer at all. Well, sorry about that and let me rephrase then. Contemporary CPUs have two ranges of P-states, the so called "guaranteed performance" range and the "turbo" range. In the "guaranteed performance" range the CPU runs in the P-state requested by the governor, unless a higher P-state has been requested for another CPU in its frequency domain (usually covering the entire processor package) , in which case that higher P-state will be used (the effective P-state for all CPUs in the frequency domain is the maximum of all P-states requested for individual CPUs). However, if the governor requests a P-state from the "turbo" range, the processor is not required to take that request literally and the PM unit in it may override the governor's choice and cause the CPU to run in a different P-state (also from the "turbo" range), even if lower P-states have been requested for the other CPUs in the processor package. This is also explained in Documentation/admin-guide/pm/intel_pstate.rst (in the Turbo P-states Support section), in more detail and hopefully more clearly. Cheers!