Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp606264imm; Wed, 6 Jun 2018 03:04:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLvpAu6+LdeU75a9fCHPdB7ZMsT8iMN8l2rVRb4DARbBJF87NSrKA6SwheabImOq8e1SR6E X-Received: by 2002:a65:6290:: with SMTP id f16-v6mr2056234pgv.155.1528279444720; Wed, 06 Jun 2018 03:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528279444; cv=none; d=google.com; s=arc-20160816; b=HtY8A9OlioU7dcDtngeejA7ZmtNPP4JLFR0PvVkrIOSYDvK2KbCrEQBeRnaEzTbKW5 lTI1ZPiFheDYMirwAf0yG9Eqf8p/WKh9d4XWFp/n2gq/0A0vyNc4tm65ilB5PUzElQx6 svueP2yqwKmpusoInESxDuoOXLdbPaSlQJ/rX+7aWTypH2T59N0M+vR8d3vLj2p4PHQb kVf3wW0nHjHBhIxFegvB/1qXOoR6vT+Kj8hx4zeIOyRAq0rAbHqq6GQrn7HTGAE9uoNe CQ4M5BxixGKIXrxuNMdZDh4y/Q8J+U52MKk0jFnBqJPVVfa4jrO/LPZxTT0e6RU6Z8i0 valA== 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=DsI76Uh0deR1Dt0pD0WleivPMHQEDgFkTnKJTGS/BP0=; b=hVoCC/FVZ4A8A3kH7mazDlkCzyo4edESUSx+77pGPmssUA19hhqxGlTwTPisVVBYao 8+AUyajz/hLlzEloXxJ94cPg5BsEvuNXyJ45xVmegz0fihVjP4afz8J+J+mc0aUePSMD 5yw8wrMl7T2J/OzT4DSilu6SVFHL4Do1u5Im0jMczoSG1O8F996WYTrVyrPe4zUJR3cL kmeGAzybsd/hcQFRc/tJyISCNiDz4QKz02EuUuEFay0BsJ7VwckCIjz64N0P2IN8W8jR cgejR9EGkvWOTkBCW4dsHSCNmNqi0OIaMcZIY4tzBF3+l2RQ4QXSI+rCbLjGoe5loz+z ZhHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X5vXkxkF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14-v6si6229221plo.95.2018.06.06.03.03.50; Wed, 06 Jun 2018 03:04:04 -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=@linaro.org header.s=google header.b=X5vXkxkF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932725AbeFFKC6 (ORCPT + 99 others); Wed, 6 Jun 2018 06:02:58 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:44033 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932462AbeFFKC5 (ORCPT ); Wed, 6 Jun 2018 06:02:57 -0400 Received: by mail-io0-f196.google.com with SMTP id g7-v6so6911489ioh.11 for ; Wed, 06 Jun 2018 03:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DsI76Uh0deR1Dt0pD0WleivPMHQEDgFkTnKJTGS/BP0=; b=X5vXkxkF1EgRtNNXZKSXbqqkP7TuRMXombJODQrPHAMqXo52+JZ59iTtMjuczjFxAj ZKUGyD7PuhumFFjxKXoAALzP7Hs1hubMXEfd3aEjlGbeMQVIv5BgOM5q4c/4QRV6ntrj hRG7hAb5by80Pno42y3uwE9mG41LZKRdKOm9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DsI76Uh0deR1Dt0pD0WleivPMHQEDgFkTnKJTGS/BP0=; b=rcZ9GpfllNDAYX9SEYefQLGgz5jf99jTzBPeeQZENmqG887Dgvy6b2LsasZlieEjZz HJZNX8iF8YCTz4oKVvWAzrw+an29zrqlBVb8NsWVBUX9mvF/hjUh4TCQZbh3+iXb7/7o 6EEYpxYWbFFGEwyGOE7ARCSMsKP3KINNp0U09OaKwehhgCCM7k3nMBTw6vprbqtxzzRE gUl8ZZ6+sUvkrUqvi4rkhpIFYIMXyqnwtP/bU8sj54XF+EMNJ6iCrFnci2epvuuCGOL6 GEiJgOwA47U5dZAxH4Se7UjRTDWuBSzXQA1I4wiY43lph0Cx1dBJX+64XiuXRq5VK5mT 09wQ== X-Gm-Message-State: APt69E136C/Sf1RGaHmbSB3crDkrOz/N2seTQLtOp+u3ZVvpECDm/j2q Cy6JRy6zi+nOGt/caWIvt9VO475g8L1eex88aKdOBg== X-Received: by 2002:a6b:1884:: with SMTP id 126-v6mr2039035ioy.183.1528279376316; Wed, 06 Jun 2018 03:02:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:304a:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 03:02:35 -0700 (PDT) In-Reply-To: References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <20180604165047.GU12180@hirez.programming.kicks-ass.net> <20180605141809.GV12180@hirez.programming.kicks-ass.net> <20180606094409.GA10870@e108498-lin.cambridge.arm.com> From: Vincent Guittot Date: Wed, 6 Jun 2018 12:02:35 +0200 Message-ID: Subject: Re: [PATCH v5 00/10] track CPU utilization To: Quentin Perret , Peter Zijlstra Cc: Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Juri Lelli , Dietmar Eggemann , Morten Rasmussen , viresh kumar , Valentin Schneider 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 6 June 2018 at 11:59, Vincent Guittot wrote: > On 6 June 2018 at 11:44, Quentin Perret wrote: >> On Tuesday 05 Jun 2018 at 16:18:09 (+0200), Peter Zijlstra wrote: [snip] >>> >>> > As you mentioned, scale_rt_capacity give the remaining capacity for >>> > cfs and it will behave like cfs util_avg now that it uses PELT. So as >>> > long as cfs util_avg < scale_rt_capacity(we probably need a margin) >>> > we keep using dl bandwidth + cfs util_avg + rt util_avg for selecting >>> > OPP because we have remaining spare capacity but if cfs util_avg == >>> > scale_rt_capacity, we make sure to use max OPP. >>> >>> Good point, when cfs-util < cfs-cap then there is idle time and the util >>> number is 'right', when cfs-util == cfs-cap we're overcommitted and >>> should go max. >>> >>> Since the util and cap values are aligned that should track nicely. I have re run my tests and and the results seem to be ok so far. I'm going to clean up a bit the code used for the test and sent a new version of the proposal >> >> So Vincent proposed to have a margin between cfs util and cfs cap to be >> sure there is a little bit of idle time. This is _exactly_ what the >> overutilized flag in EAS does. That would actually make a lot of sense >> to use that flag in schedutil. The idea is basically to say, if there >> isn't enough idle time on all CPUs, the util signal are kinda wrong, so >> let's not make any decisions (task placement or OPP selection) based on >> that. If overutilized, go to max freq. Does that make sense ? > > Yes it's similar to the overutilized except that > - this is done per cpu and whereas overutilization is for the whole system > - the test is done at every freq update and not only during some cfs > event and it uses the last up to date value and not a periodically > updated snapshot of the value > - this is done also without EAS > > Then for the margin, it has to be discussed if it is really needed or not > >> >> Thanks, >> Quentin