Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2422734ybg; Fri, 5 Jun 2020 13:36:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7cZrYJI/D7wfYrjfXlC5UhWaR++dClVY92p3RGwHlxXFC6qLveAEfJy63c5orNJ8qqqxw X-Received: by 2002:aa7:c496:: with SMTP id m22mr6970295edq.187.1591389405362; Fri, 05 Jun 2020 13:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591389405; cv=none; d=google.com; s=arc-20160816; b=J0RChdhuWEGtzE32VgpU6jX86u08hWvoqMVJyzBwIky6HtXcjwjpd7Uek5c0DJdz6M QW2brK0imH6PKep2ROVuYDaqaeuq1yjlPxNb67At6BSW+/oE+zwWlouSITE7sJahD09r nVWaykd12x0l74x9nvydkLGh0ihJsdl/xlTLnLY2yDx6kcIE9uOZRwgACVG9t2e5W9cs qtWYtNbKs5bEMqsqzfo+7Ob8xXf5Y2kcb1JpSZx/jWeXh4IRzFqDFTK/xdqXvuuPoSbv 8kP3r2bhww0nCtSZLxgD9Z3SB1FmgUhPZdV6RL8b+/QOX2qBm3T2Q7FOdbmsPEvvvg0U Q2QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mw8VvWe7EE3uVg13FxiUrEz8BgF0q+z7XfuLsYKCdMs=; b=Phhv5ADPNRYFklFdnLX3YqgLYPEuW3YqQ+RlYExGJOg2fHeElxFsASz6MIZaxrTRaN NRv15mG1Y9qnAuDH/HUiVNT6tO4/XBZzoltFeTtQNEAVrBJsXkxTQy8BwyI2WN9xKE0O BH3O04PwUiCDYeyfpu6ndmjadco2g52au25413EF4i4dMwf0ItRgri2XM+Nq78qaBY44 fP/wsIp2v8BMJZQw+ejCfm8Es0GvGBlS02q8OMQsh1HvGHWkMSPaMjOswXB384wmYJXH itg7it/Xlu0pfviEdvpzB5PLnCCNCwBqKC4K4CACS+mBYkVB/VAanHjtUZm1DEu63kDN qT/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XHAiRDHR; 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 a11si3588608eds.271.2020.06.05.13.36.21; Fri, 05 Jun 2020 13:36:45 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XHAiRDHR; 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 S1728181AbgFEUeX (ORCPT + 99 others); Fri, 5 Jun 2020 16:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727888AbgFEUeW (ORCPT ); Fri, 5 Jun 2020 16:34:22 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64D9CC08C5C2; Fri, 5 Jun 2020 13:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mw8VvWe7EE3uVg13FxiUrEz8BgF0q+z7XfuLsYKCdMs=; b=XHAiRDHRfrtWsqJ/5YI/J+wEym fa0fexDxTJwq+EdTS7AbxsFSe4+NNIUeHBU/6Rxr80OklDhzTfHrDx9rfj9NSAHJ1sEzKB3Fsr4u6 uuB6SkvEOPuqg9UUbJSS7oXcrqYzKKDLrV065Z6kEWqNL7fkS7OZVR4ZQFImCgKTTGtdGdogA5nVU YPTBrWzCqBkNOdpvF6yG3rYiCeMxY1W4IuK89xhywUDqKsA0Bgd1ubp+pbpOE93I3yqPqG9Ef8bzv 3qH49us5CbN4FNIv4YyIW05myBHUjNt//8ENJgJi93Gfqf2IVDhXIAa7NtDsxP4dwt/xCFNiIs0Wz P80sOuYg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jhJ2E-0003eW-T9; Fri, 05 Jun 2020 20:33:51 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 65DBB30067C; Fri, 5 Jun 2020 22:33:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0E18221A308C6; Fri, 5 Jun 2020 22:33:47 +0200 (CEST) Date: Fri, 5 Jun 2020 22:33:47 +0200 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: Alexander Monakov , linux-kernel@vger.kernel.org, Linux PM , Giovanni Gherdovich , qperret@google.com, juri.lelli@redhat.com, Valentin Schneider , Vincent Guittot , Doug Smythies Subject: Re: schedutil issue with serial workloads Message-ID: <20200605203347.GM3976@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 05, 2020 at 06:51:12PM +0200, Rafael J. Wysocki wrote: > On 6/4/2020 11:29 PM, Alexander Monakov wrote: > > this is a question/bugreport about behavior of schedutil on serial workloads > > such as rsync, or './configure', or 'make install'. These workloads are > > such that there's no single task that takes a substantial portion of CPU > > time, but at any moment there's at least one runnable task, and overall > > the workload is compute-bound. To run the workload efficiently, cpufreq > > governor should select a high frequency. > > > > Assume the system is idle except for the workload in question. > > > > Sadly, schedutil will select the lowest frequency, unless the workload is > > confined to one core with taskset (in which case it will select the > > highest frequency, correctly though somewhat paradoxically). > > That's because the CPU utilization generated by the workload on all CPUs is > small. > > Confining it to one CPU causes the utilization of this one to grow and so > schedutil selects a higher frequency for it. My initial question was why doesn't io-boosting fix this up, but a quick look at our pipe code shows me that it doesn't seem to use io_schedule(). That is currently our only means to express 'someone is waiting on us' to which we then say 'lets hurry up a bit'. Because, as you've found, if the tasks do not queue up, there is nothing to push the frequency up.