Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp587175imm; Mon, 21 May 2018 10:47:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkZLgeaA4ZSWocgYpMOm9F29XZMZnkcD9r0TEQ3izxzmns+H8XMVeJJGNXbgCC75KTcYsH X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr21441665plh.291.1526924860894; Mon, 21 May 2018 10:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526924860; cv=none; d=google.com; s=arc-20160816; b=YNAW6X7TTgL5ZnmEJtDgsdmR0FSY7/UsXJWdaeyNzFEwSSoa72sU5/ArFbv7goY9Rn iMT2lhUEqJNzzenNfdDvNLDGcca/KyDHcVsbVQ31Mx092PqusVziY2o0aRo3oH9pEYsR PHknCwcDsSgQCVK0lmzNKcWn5/8jJg+8YdxhdI0FlkqzY+TYPWueFBEi+6hxKQ5Z/C7k ytWgGJHPDgH0Y35ZxJHaMlJwVHeQkH8iNfs6wfy9UajgmoGiMjeruAMThJKbhz4uSFTd wlG26wYfhmMTuPMq4XZaGDJu7Vj9hNJ2MSHOwLmlgp98YswLlN/CNSKElhwZJqKJKp7M qJ5Q== 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:arc-authentication-results; bh=Ei9DdqT7NbfcwvKxMTw/GtwPdD6loYBe/4ixpWD7q1w=; b=aLFRQONkwP2qouiEKIWXDbPEeTHvwYdy/hssEQPTpT41WKrNOvIXk8fq8YtxZOtecY lsazp9NhSRss6CXFoVz639KtZB4ByzTffRv4hoslLY622iVtJSsERY16cd+02ugXM599 WZa1H3y415PVjIkxpDyDRr4Ysr/LzgRSxp5nL7eL24SzVz/E32JgJ6aUpVcGuRwZO7Wv gEPKDMS6bq0IYjVD1prtW1imYjnMai9X1cC9wSsirUtC9vLfoxPpJelzk0ByuzS4gjAe q8nGk1HRodUJK3KH4uQxV5kGKvsv+Lk7iwISYiSpGHCiNx2GsM/rs7Kb38vCA4uZP0Eu iP5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=F2x6uri/; 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 ba9-v6si14723209plb.110.2018.05.21.10.47.26; Mon, 21 May 2018 10:47:40 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=F2x6uri/; 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 S1753287AbeEURqE (ORCPT + 99 others); Mon, 21 May 2018 13:46:04 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:39202 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753097AbeEURqB (ORCPT ); Mon, 21 May 2018 13:46:01 -0400 Received: by mail-pf0-f194.google.com with SMTP id a22-v6so7430519pfn.6 for ; Mon, 21 May 2018 10:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ei9DdqT7NbfcwvKxMTw/GtwPdD6loYBe/4ixpWD7q1w=; b=F2x6uri/ayTB8Vvfi3es0BnbheW60RNinpM8eJC2IGqmHx87JvuHM4PAVKcGcfee0x LuVaB/zUw7r4fhqqiBTET8cZLKJh14ARNZWB8B+Q6T9aAdmZhmRWKjOy/uYrD8/n/Tdv OPMVJdc8/MEUgIe428a45TPHA6k6+dk8w0h5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ei9DdqT7NbfcwvKxMTw/GtwPdD6loYBe/4ixpWD7q1w=; b=jtWZwSlsWuA020DucnZs8l4B2L83C4QmefjW6EuW93xFVn3J+5xpiUtMLeJdWQGTv1 1ih1eJfS/HC+uQmg8+ZQojBbhx9ItvoNTjR7MCf39tzErSM+xbnn7+Xp0lPptenCiRdc V9F7oTk7jih3VpKe7AKSPYoGNefkPGRttQBen1/dfBbgdu8ZydM/WRI4rzuSn00GL7rf hYKjtcQh8/SSfERxd1o5cEmVoBFz24tpv7h0BN1yzeB1p1MurTb6mKgZIxRsNlOIA8bu yl5ARIRcW7c2NNi1HpvebnJqh9LJDOOvSuNWxYCg3Y5eTJ5jeB1KJLqROLAlipuDakQR jgRQ== X-Gm-Message-State: ALKqPwejg3pFdTknALcQhhswNde2g2A1Dw1dxiWSbMpVQ84kFaeugwkF /XhoeGvJINpmmm97UzuAxLky2w== X-Received: by 2002:a63:6d02:: with SMTP id i2-v6mr9467144pgc.228.1526924760965; Mon, 21 May 2018 10:46:00 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id z131-v6sm20822799pgz.86.2018.05.21.10.46.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 May 2018 10:46:00 -0700 (PDT) Date: Mon, 21 May 2018 10:46:00 -0700 From: Joel Fernandes To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Juri Lelli , kernel-team@android.com Subject: Re: [PATCH v3 2/2] cpufreq: schedutil: Cleanup and document iowait boost Message-ID: <20180521174600.GC21678@joelaf.mtv.corp.google.com> References: <20180521085120.7902-1-patrick.bellasi@arm.com> <20180521085120.7902-3-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180521085120.7902-3-patrick.bellasi@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 21, 2018 at 09:51:20AM +0100, Patrick Bellasi wrote: > The iowait boosting code has been recently updated to add a progressive > boosting behavior which allows to be less aggressive in boosting tasks > doing only sporadic IO operations, thus being more energy efficient for > example on mobile platforms. > > The current code is now however a bit convoluted. Some functionalities > (e.g. iowait boost reset) are replicated in different paths and their > documentation is slightly misaligned. > > Let's cleanup the code by consolidating all the IO wait boosting related > functionality within within few dedicated functions and better define > their role: > > - sugov_iowait_boost: set/increase the IO wait boost of a CPU > - sugov_iowait_apply: apply/reduce the IO wait boost of a CPU > > Both these two function are used at every sugov updated and they makes makes->make updated->update > use of a unified IO wait boost reset policy provided by: > > - sugov_iowait_reset: reset/disable the IO wait boost of a CPU > if a CPU is not updated for more then one tick > > This makes possible a cleaner and more self-contained design for the IO > wait boosting code since the rest of the sugov update routines, both for > single and shared frequency domains, follow the same template: > > /* Configure IO boost, if required */ > sugov_iowait_boost() > > /* Return here if freq change is in progress or throttled */ > > /* Collect and aggregate utilization information */ > sugov_get_util() > sugov_aggregate_util() > > /* > * Add IO boost, if currently enabled, on top of the aggregated > * utilization value > */ > sugov_iowait_apply() > > As a extra bonus, let's also add the documentation for the new > functions and better align the in-code documentation. Reviewed-by: Joel Fernandes (Google) thanks, - Joel [..]