Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4501940imu; Tue, 29 Jan 2019 02:41:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN5HEJ3awDEWfE7YfW+ExTByl6d48DQGhRBEl9ushB01lw7F59/YTe14Ph75VIMUFZRs/KRo X-Received: by 2002:a62:5dd1:: with SMTP id n78mr25232496pfj.58.1548758505620; Tue, 29 Jan 2019 02:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548758505; cv=none; d=google.com; s=arc-20160816; b=sdl0nC63dcccHkeIH//EjZI4Pxvi2bmmZUL7irLgJ9f7hSKpxvABs8KkapmYYmUs85 2+4cSkrhfn3KKNuGZMpaNyrML8c3ej5t8RstQtrq15UHwsuepqmhYtqIjWwLUWxD/PS5 F4AMspuF9pZF9QrQIj2BlJTjs8vchQgck2YMyUA1cZPvN3bz9kLU/Q2FBSRTWdNuObaJ gtdCY57m2DRn6ozVrNNLbWQ3GwJ8MKV//fPQitSirro7M4FlEezkEqiAqMsgHIenpV5J EmyIuWwbbFDp1TX+Itd3Ii7+hTl3IODr6esKRP74OEbFakadRC59GMONolhBKjVc53C3 HcXA== 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:dkim-signature; bh=pJ8AxhrRM9qT1PNZ3CqRF8YEvfKWIQCI2sjgTj85hTc=; b=nF5qmCMrXTnFCR0h3BaoyyVebRNnD1o5NXsOgNPCoPo1BDo0nuB+43EAZh6x/ubbIR HC/9WWbpCp4029xAVai75GXzjmKetiRa5ad3P/MbluwnR4sbS8j43o1h+Xu5hjbwWl2N uU0/HrjEqLJAWnpu5iTDbXKRMupSDp24cbHMA92Gc0ZRqtVgQ7LrFespL8CYijvsPIZj LNew1oVNh3JvGR+hrEI7SugeqJ0jqoONDhynVTk/oOr7/vzkbwlxzEzPYjBRTYSSlqe4 zYJ+XvWFbGmvHxpOsxo3SJLWCR6OtqzxSufVWxHyO2fwQAbtpqbgQ22fZ1Smfi2qM+h6 9/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ec0i2dTs; 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 k5si33071945pfi.176.2019.01.29.02.41.29; Tue, 29 Jan 2019 02:41:45 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ec0i2dTs; 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 S1726957AbfA2KlH (ORCPT + 99 others); Tue, 29 Jan 2019 05:41:07 -0500 Received: from merlin.infradead.org ([205.233.59.134]:57168 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbfA2KlG (ORCPT ); Tue, 29 Jan 2019 05:41:06 -0500 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pJ8AxhrRM9qT1PNZ3CqRF8YEvfKWIQCI2sjgTj85hTc=; b=ec0i2dTsAeVCskkDxACabq9aV 7xMJKYYAEJ0GB+I00fp+EO1ATXhQGAYu3NxV/kM6hfpoh08LPixWOub7Df5z/kwUNaj/HqJp9X//Q +9g97E1qQ0rFOmubcT2Zt/n1vSFXPWZFRQoXq6NWx7biB3edFUsGOVMUlrxF1KhPVPlATi5rJQR12 cNfqXyoStGByRZxIkIGfBmaIkRY2pLLGXIWXq72fVpKW3h9OqBPKoZeSIx5pZdXF1L00as/9PL5ih /Vg+tAHSFA5xEi8NFy8dxsNd6oxDKywueV5bIJbmDhkvJoqln7Ndv9YfHv+QICCtxxZ0+kWSjzpCh 29LBvpfGQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1goQp4-0000JW-OO; Tue, 29 Jan 2019 10:40:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 77F9A201EC171; Tue, 29 Jan 2019 11:40:53 +0100 (CET) Date: Tue, 29 Jan 2019 11:40:53 +0100 From: Peter Zijlstra To: Chunyan Zhang Cc: Ingo Molnar , Vincent Wang , Quentin Perret , linux-kernel@vger.kernel.org, Chunyan Zhang Subject: Re: [PATCH V3] sched/cpufreq: calculate util / cap in advance in map_util_freq() Message-ID: <20190129104053.GI28467@hirez.programming.kicks-ass.net> References: <1548656841-3440-1-git-send-email-chunyan.zhang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548656841-3440-1-git-send-email-chunyan.zhang@unisoc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 02:27:21PM +0800, Chunyan Zhang wrote: > From: "vincent.wang" > > When a task that is in_iowait state is enqueued, cpufreq_update_util() > will be invoked with SCHED_CPUFREQ_IOWAIT flag. In this case,the value > of util and cap, which are parameters used in map_util_freq(), will be > cpu frequency, instead of cpu util and capactiy. Didn't I tell you to fix the IOWAIT case to not pass in such large numbers?