Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4088663imm; Mon, 14 May 2018 02:21:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpyLhABmhT+fLoSRnelb6BARONqkcWeRgxRl0CEAFpLaoS7fRnV/MpVVZbvpoHzSMaodgmz X-Received: by 2002:a17:902:bf08:: with SMTP id bi8-v6mr8961606plb.353.1526289708892; Mon, 14 May 2018 02:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526289708; cv=none; d=google.com; s=arc-20160816; b=QKirin5pCpa39YyxJ3u3hhBFw4qOKoyUlTTcICR/ZtW1EnFIxkn8VOX5ZjNaJYn7wN +1S3XS1WNre0SsZZV1fB7NJIQQfrvFOnLrHEjVFGNVLC54kM3/+gXGnZeF7KGIDw7QA+ Y3umUkeFj9e2hTqnA994WCXDMdVxWHr583KLkPZEPHCJuOSh0kgWo6kJWTHmWJC+S4Gj UKxe1Ue9q492+K6+V5WM06ahHp2sY26V6gC23++xHhasvSpSq4GaVVgeXh/E//sjgjiD lOVE30mSEaSQLzvWbgTLOnmnuj41SOwoDhkIfDh4LY6csXZC/MosSdHHZahTYz2lqtBp xvbA== 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=nNLwqjQcm3ZBzxW5pYErZz4vzIlqEGUSNxaai94iLBo=; b=kBe6VyaVf1s6bGhzxKmIa/F0CK/GJOLbWXK+MBEzyMHPp8bc+nNeuQd4ulsjxTHIff pdvMEesbKm+7hUjlRWPYgXhNBwOAMNA/2RhOiyGtwgcv8AeNj/9QDk/uQHLsQqcrALEL gLn8aCmqCTTnXVpfd65mDBAGW5rj8Lv6EvczCFRL04Gj1bmSb+qUMrvjabnxLP/G+XyI NXh82ajVvRosaoL/YAkKh7Hlz8O22uGazIs1vHgYjSJrBWrEbChXErLp0rOFMTelurQK WMG8KpJZYlG/Yi+6RWrqcmp+Rza4W+BpHLOLs/ySxv3IfCSVwdf8ePlp7f0ECtGCC78P 32Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GIw8XT/z; 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 v24-v6si9604427pfj.292.2018.05.14.02.21.34; Mon, 14 May 2018 02:21:48 -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=GIw8XT/z; 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 S1752154AbeENJVQ (ORCPT + 99 others); Mon, 14 May 2018 05:21:16 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:38711 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751954AbeENJVO (ORCPT ); Mon, 14 May 2018 05:21:14 -0400 Received: by mail-io0-f194.google.com with SMTP id z4-v6so14352298iof.5 for ; Mon, 14 May 2018 02:21:14 -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=nNLwqjQcm3ZBzxW5pYErZz4vzIlqEGUSNxaai94iLBo=; b=GIw8XT/z5bOkD/ktOv2PeyAxnFk1cxSi68ujP5yj93ZYNBvv8Z7ETvjqBLzj8qyBCl ALo8Xq1PhXYtvXqvjyHIegOumdvKX9jCMrxBtYYgvCGZe1jDfnUZJENNIxi8vLzfF2Ah JaRISd8k/w6TLUB1f/ufY5iwC20JTzJiQWFnY= 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=nNLwqjQcm3ZBzxW5pYErZz4vzIlqEGUSNxaai94iLBo=; b=Wt6TwLk0Pidg5LMWDhmCKfwr7N1ALFHCJTQFsVdVmjqr87nkcnbZMKp4BwlRRuyRyb k6CNeVGznw/bunRQSZ6wgGab+CBJffmQH3Y6FkRLmjD9KwsAe3lV32LzCnUc+iTcG8cV n9uEA8BgSDD+ESTM32/ARMeDvB61KVyM1DWm6JWrPZ6nqtZT20PKVJb6jXI3sdY4z90l S8/Z/ry6Q+ofvIpefww6OLqdB4gfqEeJRrK3vsMchALHzEDUnPYXfU2UWJaXVRC5bNl8 NvnQ+hx1hK2k1eZosVsDxB8rwp/ORGpCKKa493kmtKkmAELC4CgL7c4M1zD7Q4rB1m1n /KFQ== X-Gm-Message-State: ALKqPweyCNapg/M+VmzRCOjLr5m3bf34w0XzjBVcbdYPVSH6OyvbDDqV N1CtrIF/CofbaxnoFwKs6+h2ul/opYFCXMOL6Yhymw== X-Received: by 2002:a6b:b0d1:: with SMTP id z200-v6mr10193462ioe.196.1526289673865; Mon, 14 May 2018 02:21:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.4.204 with HTTP; Mon, 14 May 2018 02:20:53 -0700 (PDT) In-Reply-To: <20180511131509.16275-3-patrick.bellasi@arm.com> References: <20180511131509.16275-1-patrick.bellasi@arm.com> <20180511131509.16275-3-patrick.bellasi@arm.com> From: Vincent Guittot Date: Mon, 14 May 2018 11:20:53 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] sched/fair: util_est: update before schedutil To: Patrick Bellasi Cc: linux-kernel , "open list:THERMAL" , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Joel Fernandes , Steve Muckle 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 Hi Patrick, On 11 May 2018 at 15:15, Patrick Bellasi wrote: > When a task is enqueue the estimated utilization of a CPU is updated > to better support the selection of the required frequency. > However, schedutil is (implicitly) updated by update_load_avg() which > always happens before util_est_{en,de}queue(), thus potentially > introducing a latency between estimated utilization updates and > frequency selections. > > Let's update util_est at the beginning of enqueue_task_fair(), > which will ensure that all schedutil updates will see the most > updated estimated utilization value for a CPU. > > Reported-by: Vincent Guittot > Signed-off-by: Patrick Bellasi > Acked-by: Viresh Kumar > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Vincent Guittot > Cc: linux-kernel@vger.kernel.org > Cc: linux-pm@vger.kernel.org > Fixes: 7f65ea42eb00 ("sched/fair: Add util_est on top of PELT") Acked-by: Vincent Guittot > > --- > > Changes in v2: > - improve comment in enqueue_task_fair() (Peter) > - add "Fixes" tag > - add "Acked-by" Viresh tag > ---