Received: by 10.223.176.5 with SMTP id f5csp562704wra; Fri, 9 Feb 2018 03:38:40 -0800 (PST) X-Google-Smtp-Source: AH8x224R0HzCOdi+ZUFoCJfpeqpepEelUO3JSPnHhQuKYYhRmBpK6KNQ7No65AvHUapKKWjCTZUW X-Received: by 10.98.78.148 with SMTP id c142mr2560549pfb.153.1518176320538; Fri, 09 Feb 2018 03:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518176320; cv=none; d=google.com; s=arc-20160816; b=Tx7DI1WjH3r26qyx0DFPOMMTpxV4UIiRVCAiU0u0FAnIiJ0Vc05ORXFoN2QsXtlmho qWefkVV6nBfo/xEkBo4Nkpj3UfrRSJEEXyUyRQHAscYhlnbkcSYnJqTEg/DKTQkUBB6Y bPF3Q/mbNRAjLsN+oU76DPqeJKWgB7hz5DUXjZip4P/hS/n5RGUamiyQiQUH/IAQ0c1j 4/uLaHPQ2w1JWvNfvjO7zqL4wEr8UtVGdvySfjXQAXX5Ax1fquYim2SievN4Zf6E+ogs P1Gx0GycNAwN9BGowwJdr7cqPo8uKjx0D3l+rCZ/JsDsZx22jv2L/nF+x5GQGrqj0m1o mS0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Ayf/FeraTfjgpBI/Uyv81R2znn3cbgAip4Ayxayf2i4=; b=Wyxwki9wbofNcNdFF/3oX8kGMm8X+BQM/uTjdomshW25YrXwojzlhq7Cy1RdYUsdfv sRxuyaHB6GXn9EOijXky30Ff5p/1GQqvj+cD3pj1ttPmkGgtmZrP+wmHHrcheTuFi/YQ veX6CYgZBCZHHfntWLLs0pJZlZRe7GApqhND4t9uSMNda4A/6s1Yhut+9LCEIUy8pxc6 OTblxrE/a6vPchtAJolujJLnNigkZG2Bf2InIaXU4wpEGiF/cT5WP68lFrE1DdQnajdB P2nHDOHSSQ2zgUN+zabDsf2FakIfH8Ds3l4KQCPuJrji3a3acGvNrCOm3RWzhC8OmTk4 SPWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kXrxoRjk; 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 m5-v6si1428551plt.642.2018.02.09.03.38.25; Fri, 09 Feb 2018 03:38:40 -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=@gmail.com header.s=20161025 header.b=kXrxoRjk; 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 S1751040AbeBILhr (ORCPT + 99 others); Fri, 9 Feb 2018 06:37:47 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:39248 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbeBILhp (ORCPT ); Fri, 9 Feb 2018 06:37:45 -0500 Received: by mail-ot0-f194.google.com with SMTP id f18so7454922otf.6; Fri, 09 Feb 2018 03:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Ayf/FeraTfjgpBI/Uyv81R2znn3cbgAip4Ayxayf2i4=; b=kXrxoRjkYZr1e49mBLU8eHuICmIji1qEnlxcEuglV7QpRM6LxQpG7jiKdL2xsCWAuc /ctDVROfoOC+3nnW+T4AYF9bv27ukvAELw8vc/qB0dv0a7JnLPCN2Sf3gUMD6GHKBJEQ 1Iyp3EsJB3o2lFnhWCpoRHxDwovao7C2Ts8ynk1pAsugmC53A4FbNprC9R8bA1fhaEMl NxF1eDc5ehU3aJ/4ptAnVXvNsLYxEY1TzGeZ7pBnAmOaLzfS466u50AUELxNz1spX1aa Bto2ogT0gr1zTHHQP3bbg3nTW9ebPmM7EKxVmrQgv1f7HvUj125AaNGA24a22bDpR2+l MlFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Ayf/FeraTfjgpBI/Uyv81R2znn3cbgAip4Ayxayf2i4=; b=GbV+MEGy2H/p7HKR6VfgHGPQVpolJTW3sLp4TOndrFdlj0dIouNDIQ0Q6MNWGf9jhs WrrABgtdSiF6y0NSs8ONVilTSgdh/yQ+PbdolGZaQADuyehr/bQs/GOlwKkLV9Xy6PK7 ug2F1RRjDqZn68JhRkbP034fqyNSOebTWFpd19KK1nRy9VmIVLrfcP8HdeOKngbWdgBJ 02Qx0XA3lvrBXfiC6lVIwdW0fVRYP3QA3Q4XMhsGkUvXeU+nIAJQcoS7ra4/eSXG7Jna W+6lHLjQat234vK2zGJ6Oc9Rlaw75iYET7csvzuXXbgT32A7tyUq/VwZgZy0Yzg5+8gp 9mlA== X-Gm-Message-State: APf1xPBCX+c2Q/iRsu03gB6lfIjK2IaKUqCiIJX7+Mx+jX5bhegJHR09 FU/M4YyaZPxGECuEgm0xoy0CIqpQi7jgp6IDCOo= X-Received: by 10.157.12.215 with SMTP id o23mr2027404otd.322.1518176264815; Fri, 09 Feb 2018 03:37:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.46.234 with HTTP; Fri, 9 Feb 2018 03:37:44 -0800 (PST) In-Reply-To: <20180209112618.GE12979@localhost.localdomain> References: <1518109302-8239-1-git-send-email-claudio@evidence.eu.com> <20180209035143.GX28462@vireshk-i7> <197c26ba-c2a6-2de7-dffa-5b884079f746@evidence.eu.com> <11598161.veS9VGWB8G@aspire.rjw.lan> <20180209105305.GD12979@localhost.localdomain> <20180209112618.GE12979@localhost.localdomain> From: "Rafael J. Wysocki" Date: Fri, 9 Feb 2018 12:37:44 +0100 X-Google-Sender-Auth: 9XBdWo2uBiAImtmmTjAf5A5U9ug Message-ID: Subject: Re: [PATCH] cpufreq: schedutil: rate limits for SCHED_DEADLINE To: Juri Lelli Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Claudio Scordino , Viresh Kumar , Peter Zijlstra , Ingo Molnar , "Rafael J . Wysocki" , Patrick Bellasi , Dietmar Eggemann , Morten Rasmussen , Vincent Guittot , Todd Kjos , Joel Fernandes , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 9, 2018 at 12:26 PM, Juri Lelli wrote: > On 09/02/18 12:04, Rafael J. Wysocki wrote: >> On Fri, Feb 9, 2018 at 11:53 AM, Juri Lelli wrote: >> > Hi, >> > >> > On 09/02/18 11:36, Rafael J. Wysocki wrote: >> >> On Friday, February 9, 2018 9:02:34 AM CET Claudio Scordino wrote: >> >> > Hi Viresh, >> >> > >> >> > Il 09/02/2018 04:51, Viresh Kumar ha scritto: >> >> > > On 08-02-18, 18:01, Claudio Scordino wrote: >> >> > >> When the SCHED_DEADLINE scheduling class increases the CPU utilization, >> >> > >> we should not wait for the rate limit, otherwise we may miss some deadline. >> >> > >> >> >> > >> Tests using rt-app on Exynos5422 have shown reductions of about 10% of deadline >> >> > >> misses for tasks with low RT periods. >> >> > >> >> >> > >> The patch applies on top of the one recently proposed by Peter to drop the >> >> > >> SCHED_CPUFREQ_* flags. >> >> > >> >> >> >> >> [cut] >> >> >> >> > >> >> > > >> >> > > Is it possible to (somehow) check here if the DL tasks will miss >> >> > > deadline if we continue to run at current frequency? And only ignore >> >> > > rate-limit if that is the case ? >> > >> > Isn't it always the case? Utilization associated to DL tasks is given by >> > what the user said it's needed to meet a task deadlines (admission >> > control). If that task wakes up and we realize that adding its >> > utilization contribution is going to require a frequency change, we >> > should _theoretically_ always do it, or it will be too late. Now, user >> > might have asked for a bit more than what strictly required (this is >> > usually the case to compensate for discrepancies between theory and real >> > world, e.g. hw transition limits), but I don't think there is a way to >> > know "how much". :/ >> >> You are right. >> >> I'm somewhat concerned about "fast switch" cases when the rate limit >> is used to reduce overhead. > > Mmm, right. I'm thinking that in those cases we could leave rate limit > as is. The user should then be aware of it and consider it as proper > overhead when designing her/his system. > > But then, isn't it the same for "non fast switch" platforms? I mean, > even in the latter case we can't go faster than hw limits.. mmm, maybe > the difference is that in the former case we could go as fast as theory > would expect.. but we shouldn't. :) Well, in practical terms that means "no difference" IMO. :-) I can imagine that in some cases this approach may lead to better results than reducing the rate limit overall, but the general case I'm not sure about. I mean, if overriding the rate limit doesn't take place very often, then it really should make no difference overhead-wise. Now, of course, how to define "not very often" is a good question as that leads to rate-limiting the overriding of the original rate limit and that scheme may continue indefinitely ...