Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp98606imm; Mon, 21 May 2018 02:58:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr1tey6UzPhpgHOVyoxOuyt9BlIzjABYwoqccvRTPFhJHIKsiNY8IH3PJ480P2AT+NzL5wc X-Received: by 2002:a65:5386:: with SMTP id x6-v6mr3621316pgq.188.1526896721706; Mon, 21 May 2018 02:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526896721; cv=none; d=google.com; s=arc-20160816; b=qwGS9EE3ysFDH4Cwn23JEw9uGlpul+RwmmCaiPsYdiNEMYzpccAqIqNCCBULo5tLlH QsnwCFtWKq5W4aNuwhrz9slXyoG7rfY1lde+FKp9ptEmEhEwIf57RV6rdPczaOr+qokw FL3lXPY7rQOjKdN+zwCBnLl+7Y1EqoZ2clam2vN3qbeqkpBQ3SFgEGZvkvwS2OBFh4O8 RAxhjsm6APQV7w0Xmd5vJABicjjVhpzsbjZ52FFJ5lzBFWpl9HFplJXXbOzWSdx5acNo 47qLYJJKGkPp+MuSYJGjhRse4zLel2brUe/Hw+sbUNs76VJFiqGoLpCTX8Qmaw1l55GI 8Ivg== 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:arc-authentication-results; bh=/SV+OSA9jUxN4Hw7Hu3UbOPMVR0KayQ+OrMLiWRxOCY=; b=h+mHUZCVg7CvRGbOvlGYml6qj16C/miSRwCKBc3Icu/02/YVXgoSDtdUcXSmt3gTl2 EMaw68jzHDjVvKRyxG1Rr2WySdc8unC+CUMobPzoB6JXcmr9UVAIGNFs2Uxkl3fi0FCT BredTrI7K+XaZiuPeF8BkkLFdWAtccILsGxjHD8oQfzSeR+A6bgmryxgvG/TSXMV6xUn qF9cUwTULkFUmAcCMypTY5RvXEIL1VF/23O7OPa3rr09NLqfZ91Ow/VrI72inVArKveZ yw7H7qQ5aRBc32D6rC8RLxuvLbmvS00MZG98penW6gViv6BVYuCs4MixRQR4PHZOoKfX OFfw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x15-v6si6563028pge.686.2018.05.21.02.58.27; Mon, 21 May 2018 02:58:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbeEUJ55 (ORCPT + 99 others); Mon, 21 May 2018 05:57:57 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34162 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbeEUJ54 (ORCPT ); Mon, 21 May 2018 05:57:56 -0400 Received: by mail-wm0-f68.google.com with SMTP id a137-v6so11414337wme.1 for ; Mon, 21 May 2018 02:57:55 -0700 (PDT) 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=/SV+OSA9jUxN4Hw7Hu3UbOPMVR0KayQ+OrMLiWRxOCY=; b=jutBdmz2tr5ViEPT9Lvmh5NrZ0d7XDnD54tDHziNRCzxPtHk9xV9Zs6V+zzJXs9IDn eVdRia5+T9Gz1JI9DR+UJA4AU955FHDmq4cNguT13zUe1kBjf8YzDROhnHeYr2vnWTxE k0okyeEgPzWiHZhICO82QYgK2QQlXMV9DeJ61s+IPIGIGMeCvf2bhspNEDZrmO7xnZPy NloblJqOHzuORZeiZdKSyH/F5n6OlR3JuavS5nkVXzjkk7VxWHQvCOFTpHoHUHjNRfEy TbujJ3oo5gS3VwWnL8KTC5og5u4Wv1VLIOVLDHBbUXmGOe6HiDtzPgCqrB8H7uuBW/ev 0Glg== X-Gm-Message-State: ALKqPwdjZI7Ylfyo2VcwgpEUUZhbmLgtuFXVRmPzrrItrfF4DHRjZfG9 8zNhGYBBNYKcnX2jUyoLdJAfBQ== X-Received: by 2002:a1c:ce0e:: with SMTP id e14-v6mr9324736wmg.87.1526896674895; Mon, 21 May 2018 02:57:54 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id w5-v6sm12443529wmd.26.2018.05.21.02.57.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 May 2018 02:57:54 -0700 (PDT) Date: Mon, 21 May 2018 11:57:51 +0200 From: Juri Lelli To: "Rafael J. Wysocki" Cc: Viresh Kumar , "Joel Fernandes (Google.)" , Linux Kernel Mailing List , "Joel Fernandes (Google)" , "Rafael J . Wysocki" , Peter Zijlstra , Ingo Molnar , Patrick Bellasi , Luca Abeni , Todd Kjos , Claudio Scordino , kernel-team@android.com, Linux PM Subject: Re: [PATCH v2] schedutil: Allow cpufreq requests to be made even when kthread kicked Message-ID: <20180521095751.GA11235@localhost.localdomain> References: <20180518185501.173552-1-joel@joelfernandes.org> <20180521051424.mljwmisvrvi6yyc4@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 21/05/18 10:29, Rafael J. Wysocki wrote: > On Mon, May 21, 2018 at 7:14 AM, Viresh Kumar wrote: > > On 18-05-18, 11:55, Joel Fernandes (Google.) wrote: > >> From: "Joel Fernandes (Google)" > >> > >> Currently there is a chance of a schedutil cpufreq update request to be > >> dropped if there is a pending update request. This pending request can > >> be delayed if there is a scheduling delay of the irq_work and the wake > >> up of the schedutil governor kthread. > >> > >> A very bad scenario is when a schedutil request was already just made, > >> such as to reduce the CPU frequency, then a newer request to increase > >> CPU frequency (even sched deadline urgent frequency increase requests) > >> can be dropped, even though the rate limits suggest that its Ok to > >> process a request. This is because of the way the work_in_progress flag > >> is used. > >> > >> This patch improves the situation by allowing new requests to happen > >> even though the old one is still being processed. Note that in this > >> approach, if an irq_work was already issued, we just update next_freq > >> and don't bother to queue another request so there's no extra work being > >> done to make this happen. > > > > Now that this isn't an RFC anymore, you shouldn't have added below > > paragraph here. It could go to the comments section though. > > > >> I had brought up this issue at the OSPM conference and Claudio had a > >> discussion RFC with an alternate approach [1]. I prefer the approach as > >> done in the patch below since it doesn't need any new flags and doesn't > >> cause any other extra overhead. > >> > >> [1] https://patchwork.kernel.org/patch/10384261/ > >> > >> LGTMed-by: Viresh Kumar > >> LGTMed-by: Juri Lelli > > > > Looks like a Tag you just invented ? :) > > Yeah. > > The LGTM from Juri can be converned into an ACK silently IMO. That Sure! :) Thanks, - Juri