Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3107214imm; Thu, 17 May 2018 03:34:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZ4UP4a0fMLaYQuakQeyy8OZPaXpo18eIUVHjadsN7DlNg5rN+Ft3v1snfMiX9wmpH2LFb X-Received: by 2002:a62:4fd8:: with SMTP id f85-v6mr4692769pfj.77.1526553293006; Thu, 17 May 2018 03:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526553292; cv=none; d=google.com; s=arc-20160816; b=yrexyFAzDqmSJKSf0BDShrN3lwNu6DM2HjXQnNPOEyxyjCjNV8A50JzLM49S6srYlu cnq+s5NjjAD1j/Ftt+CiQeXL5L3NEYjanR02RaKnPb7IrUpS6BaBvlENV7ry1PH7JALC iII3W2r8ke0P1kNYXK9ZrbTu0eiQY/OzvbtsajxBG93jTbPeqAd/TpwzHWFj+E14+mJg 6KXx9FiISoRbljMUODiTeWrZC99xmO5YlhrgbbzRQThketAUih2gPdWdRbm4s6Wt9tsq ToVb3EYskBvoFjmFxwpEVyZAFwAYtRbZAcG9quEArbWMTeys0yfhfufZjq8DP6wPHN53 Z9yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pLNyNMs0kyBfMEREYAKP6G5KFgO5aWzr1ArSeFs9SyY=; b=PkMJhbwWDz7qIokvr51sPKFXB7kHIwCDjoFsBhvBKQllZg6rX3vlgJuu4W/Ze/2P9z 2im/6mLYStOwWPfNEC3AS+olGKf6LcV229URxFFC9i0EcPtJQtFakD7ZrEDBde03jXqP rPZoIkV4k/eut0MsPuNt/Q4vQG+W7UAieLtf/7ScmhI2M3o00ZWPv4490DolyGC98akB B87qvMfsap7Z9Z8wq2OtEjQYLqN3sJJ5prePvSRsVA65Jenrxb+yPrgBBHrE0nVw/WT/ YLq1iUdgOhyrj2ufg17+sHOP3eLqgIbiMZPzumaiuzqwVlu8lH8Y9mYDDRjeU1XBsjkj a2Lw== 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 r59-v6si4751216plb.187.2018.05.17.03.34.38; Thu, 17 May 2018 03:34:52 -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; 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 S1752063AbeEQKe0 (ORCPT + 99 others); Thu, 17 May 2018 06:34:26 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:41356 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbeEQKeZ (ORCPT ); Thu, 17 May 2018 06:34:25 -0400 Received: from 79.184.254.241.ipv4.supernova.orange.pl (79.184.254.241) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id e7f110b875b17bad; Thu, 17 May 2018 12:34:23 +0200 From: "Rafael J. Wysocki" To: Joel Fernandes , Viresh Kumar Cc: Ingo Molnar , Peter Zijlstra , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: Re: [V2] sched/schedutil: Don't set next_freq to UINT_MAX Date: Thu, 17 May 2018 12:33:51 +0200 Message-ID: <218097156.b89HneGrTB@aspire.rjw.lan> In-Reply-To: <20180511204712.GA83958@joelaf.mtv.corp.google.com> References: <20180511204712.GA83958@joelaf.mtv.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, May 11, 2018 10:47:12 PM CEST Joel Fernandes wrote: > On Wed, May 09, 2018 at 04:05:24PM +0530, Viresh Kumar wrote: > > The schedutil driver sets sg_policy->next_freq to UINT_MAX on certain > > occasions to discard the cached value of next freq: > > - In sugov_start(), when the schedutil governor is started for a group > > of CPUs. > > - And whenever we need to force a freq update before rate-limit > > duration, which happens when: > > - there is an update in cpufreq policy limits. > > - Or when the utilization of DL scheduling class increases. > > > > In return, get_next_freq() doesn't return a cached next_freq value but > > recalculates the next frequency instead. > > > > But having special meaning for a particular value of frequency makes the > > code less readable and error prone. We recently fixed a bug where the > > UINT_MAX value was considered as valid frequency in > > sugov_update_single(). > > > > All we need is a flag which can be used to discard the value of > > sg_policy->next_freq and we already have need_freq_update for that. Lets > > reuse it instead of setting next_freq to UINT_MAX. > > > > Signed-off-by: Viresh Kumar > > --- > > V2: > > - Rebased over the fix sent by Rafael > > > > lkml.kernel.org/r/2276196.ev9rMjHTR0@aspire.rjw.lan > > > > - Remove the additional check from sugov_update_single() as well. > > - This is for 4.18 now instead of stable kernels. > > Reviewed-by: Joel Fernandes (Google) Applied, thanks!