Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2092178ybl; Sat, 25 Jan 2020 16:26:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxpptofoJzg1/ryzjMn8Hr0jooV05sbG897Pny3nWmWTs64Ckqu1hwbIi1llxoHDG4VL/aw X-Received: by 2002:aca:b60a:: with SMTP id g10mr3527908oif.102.1579998387246; Sat, 25 Jan 2020 16:26:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579998387; cv=none; d=google.com; s=arc-20160816; b=yhbpsoQkla5DUFqb/BC3g8gPPX6GrGKi6qjizdXHivSsAZbSgp48vjK+E0qKt4LWou MfmHt4Jx9MBgYxA0K6LXroFMfvyRqoArHwwJMBimHKL4w1B2EoOOOoqADhplNCvpJPsv c4SRfjDHgRYHSaBQrxNpC/ouNZibUkm5JLnaDTKgccRCl8ftSFVLk3yRqb8/dIgdpw3i QE5Hg5LsUSabj0Y2KfCsxFL/YabcSKbtQILfkQ2ftSnJcKezsSkjY26IzjWC+y46IyeK P8A0dc+vHtj/eM99qEBu0ak1BRkfQ9O3vhneWlTUph8D/UQPDqGe3qKUyP7JKq5eXadS hHRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RQpWdezWOtoBMhq2dTaQ4veO1aQhtH2iXN+rDdZTHOA=; b=P3709JZ13MqigXYN7o4iQpeN5MskV8NaLDWEkN9V9B/8UZheD044rxDlKkPmCbuEkQ VnumlSuk95UpxrM3/kypm2BRuumbrcarU/R1DQ2LvwFyrwo28HunQabTSj4mpkjGN1II bVIxZP5/cgJXOoaQMhpA2oDvkdKbfR7xMbuxep2myaHiLnPLFiZ4UXFcbOaX+B8TQ70H gJr4oo1gC8Pf7qVXPEGTV691Jo2pCYx4d3SlJ+vWHE0uOY9NMLKvyIjGuDgBxOxxucoW rAGQnJLY0tyX/i/PgA9GIBcixaKqpFMFUEtXd71cDmFzFxjVCxGnEvgc4QAWrw0Jtsi/ ttRg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si1578126oii.37.2020.01.25.16.26.14; Sat, 25 Jan 2020 16:26:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728842AbgAZAZW (ORCPT + 99 others); Sat, 25 Jan 2020 19:25:22 -0500 Received: from foss.arm.com ([217.140.110.172]:33684 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbgAZAZW (ORCPT ); Sat, 25 Jan 2020 19:25:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E40F328; Sat, 25 Jan 2020 16:25:21 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A58333F68E; Sat, 25 Jan 2020 16:25:19 -0800 (PST) Date: Sun, 26 Jan 2020 00:25:17 +0000 From: Qais Yousef To: Wei Wang Cc: Valentin Schneider , Quentin Perret , Wei Wang , dietmar.eggemann@arm.com, chris.redpath@arm.com, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , LKML Subject: Re: [PATCH] [RFC] sched: restrict iowait boost for boosted task only Message-ID: <20200126002515.gjpiiur565muruas@e107158-lin.cambridge.arm.com> References: <20200124002811.228334-1-wvw@google.com> <20200124025238.jsf36n6w4rrn2ehc@e107158-lin> <20200124095125.GA121494@google.com> <849cc9f0-f4ae-f2b6-8449-f55697928cf5@arm.com> <20200124113050.i6ovkibcmutypm3q@e107158-lin> <20200125235934.wrs2nryuk3wmtkxr@e107158-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200125235934.wrs2nryuk3wmtkxr@e107158-lin> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/20 23:59, Qais Yousef wrote: > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > index 9b8916fd00a2..a76c02eecdaf 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -421,7 +421,8 @@ static unsigned long sugov_iowait_apply(struct sugov_cpu *sg_cpu, u64 time, > * into the same scale so we can compare. > */ > boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT; > - return max(boost, util); > + boost = max(boost, util); > + return uclamp_util_with(cpu_rq(sg_cpu->cpu), boost, NULL); > } > > #ifdef CONFIG_NO_HZ_COMMON Forgot to mention this will work if the background task is the only task running on this CPU. Like Quentin already pointed out, the iowait_boost might need more massaging to allow finer per task control. -- Qais Yousef