Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1905924lqo; Mon, 13 May 2024 01:50:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULuy2WbJILxixQA3ngfGhkIsZ3CoYnaDswgZYaEwC+dxvsihOgSqOIOeHaKUnHz7AMGJPwFcyTkcsPLYFK1R0timFpOwf6kqBbsb3zIg== X-Google-Smtp-Source: AGHT+IF4OG5FW8O66N2SGQl91QllL8k6MzfJIlLAfAFe0lcwndSJ7JMThR3qIGTgW4VkURvwxQuu X-Received: by 2002:a0c:c68d:0:b0:6a0:c800:7b9c with SMTP id 6a1803df08f44-6a1683a744dmr79457096d6.63.1715590241671; Mon, 13 May 2024 01:50:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715590241; cv=pass; d=google.com; s=arc-20160816; b=tQHHZk+Ut/enBGJOawYDMg3NE/X/Z5J3NlylcJOYmv1PXTYNiTgMRYGvJxOVC8GtEJ 3cCBOGqZr6DrAXDIeU8naLUKjyzs8GHRSoDq4MHBURa88/6/Wh++iOHpf3pAMBwnqiNf hrRK0yWMePoBKpTcvNBU+9s4f4o3K1MRCN1cNgv3jGnymB1ZppQLB+sgydEcVeeqSp+l E+ufyQgUUeLv7cQX8QO5r7zuuZaaxuioKkD/7tBavAcsRB1TrCWMjZG86Wa5OJDcwcg9 hpbZAgBct+jgRQH97qmGUstXz7hXi1tJgq5KHfIYgv1Se8fli+aFSLtorehX/c2b84O1 I9+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=q7++kW2Cm2K1g7q3S48vKWO4QTE6hzmFVZfJMpS2VOE=; fh=H3JhUj893jxyBXUFe2//u/76aDdA+cgKN0wIP9NtFI0=; b=VK/k4qo07GIIkH9HLWA/R4gXrwLpL7GaRMrjMXvGFPOQmraGEwQQjRFD/zSatiNovc DRYat4ALpSBa6x7yrX4LaKgeiV1n7ReXIiV/RYDEgkan/KD9CcoFczW5RGStu9YCImw/ Bd4J2WHP7HMeboRo01zVVhzMoXGWiJoOtfYwxHgqxTd3eNBO8PaxWJTRvr1Hlbjf5Dov Rt1+PgSvY3UxRPwLKRzAHEDVTUBNVEKtM7e4kens6feLOrnxotpRlUe1OUV4ilob0cu+ xFwOVXWvhrrebc/afcV15YuwT9Y5zwtKiPWK+Hj0gZ60oUcSoWTAz4nC7yPSIUOMuFVu eVuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xrMTWOPD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-177366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b6873si89971226d6.333.2024.05.13.01.50.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 01:50:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xrMTWOPD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-177366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 594361C21132 for ; Mon, 13 May 2024 08:50:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5D1D148309; Mon, 13 May 2024 08:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xrMTWOPD" Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53131146A60 for ; Mon, 13 May 2024 08:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715590236; cv=none; b=dBrRCB/HbJGU1wNp9HSjBEnM3zto/9Utq17V1DVIeCkFeWzLo+ugfOqQ1niYhTjEUeqsNwaoMCreOlRdLFtcnNd8mEJRBW2No6U8Up6idRZDnnT/9TDKBz1NkX/iITQ8/AsZufJkHtxtEl78/BGbHSe5+7j2Q8xLV3w2aYvu2rI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715590236; c=relaxed/simple; bh=t2CpuG2/kXnCeTE/h8lPr+FMfqwXNQ5Ys+9794rjXJI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=aDbuYPzSr3td+2MQ+iNtI/O4jy25JDZnUz/jy81CkpQVYE0OzccctGL//3y5PmRvdfx9F1BjKcjXaPnTzy3cuH8r0Ub1EHZYPBTwA7RiTc9nAsM6MkSpLwLWZQ7J64+r1jJ3m9p7AP1sBNjT11gnOzVqziJDH/JJYVeSs7iwFro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xrMTWOPD; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-78f049ddd7dso328975285a.1 for ; Mon, 13 May 2024 01:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715590233; x=1716195033; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=q7++kW2Cm2K1g7q3S48vKWO4QTE6hzmFVZfJMpS2VOE=; b=xrMTWOPD/nGYN6oAofxf1WL+q0jIplyPEYwzxkM8gvbe0Qjy3BWHT4YQ5OWda7WY89 Xoyf/ZZ+tvpi1YwCbTyTdOoJKgqGNQhuO+0RF10norYt+5l59K/IVjl1K3nuoYEs1SjB zNUcYve7NhdvCUeenKU9hYk4DpaDWgjUPjbEzPBDWq3ieichMQg5x5rXjAIn6sFZ0iri DVRjwIABIitkXBo83SnWKQQ+0CZd5SMzDyYfi0kGj1vnUH4EJGNsGi9DRpl/TosQzFFB ght3RB7Bqo2AESl+Yx8FkDoC4e+p+tIZ3OeBvj6MKZVeYPR9fpGuXRIk8/gVmXYlQ31e Xydg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715590233; x=1716195033; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q7++kW2Cm2K1g7q3S48vKWO4QTE6hzmFVZfJMpS2VOE=; b=fgh8qiaF1wCPFVffJF/l0gzzpQbrBHPs2n/uB+VdVMuhSfid4ANS3yUd1A9WxUJDPT EC+GcgpcA9ZAGRMPfwcFuVDj4dyl0xnuH8oqveUba7sWq22bUZBwEcCI0u3436zlAur6 sd7GF0UdkotQEKLSUuOoQsOSrzbyHz9wUS+B35srxW/5MyEhXNrgxsYy+cFCrtGMB2N5 k6UM5w0vs17HOmjsDJmz9ibLtx/nJ8bGYF47IroVdia7GIEMiyzYZxqMzVEC4z2k1LPb NSfYEmg9fRO6OL1r4H/oAu1bb6ZNd/LZa6/2ZdG6QgvB/2lGOYVCNjwzDCmu+JLy6dlZ +GlQ== X-Forwarded-Encrypted: i=1; AJvYcCUraDvT966wSmygryAp/YosqZMsXBvN13T0AYL1vY5vqbdaHn+YJuo+uVWPRgORtrY8vvUkQjh3B3PltDMtWo9qFNT/nXz25bhVCJ1E X-Gm-Message-State: AOJu0Yx4xG2dXbDAP+CuFTwAXC46wH3nAuVcQD6EqOhKHSzd1kIt2wkN Q+Ikm3IeuylxAcmxt0Uw76MulvQDrJgJiEeaLg1Uosd0Ak1RmBHZc/fK315K/PnArGOEGhC9LjC J65e3OFKP9Ut603Ks62jqB5KyjdfYnyKiFl6ajA== X-Received: by 2002:a05:620a:4085:b0:792:c3a3:ba3b with SMTP id af79cd13be357-792c75779aamr1186274785a.10.1715590233169; Mon, 13 May 2024 01:50:33 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240505233103.168766-1-qyousef@layalina.io> <20240507110809.a45amdmhy5vr5cuw@airbuntu> <20240511020303.c27wr52eqflft2o3@airbuntu> In-Reply-To: <20240511020303.c27wr52eqflft2o3@airbuntu> From: Vincent Guittot Date: Mon, 13 May 2024 10:50:21 +0200 Message-ID: Subject: Re: [PATCH v2] sched: Consolidate cpufreq updates To: Qais Yousef Cc: "Rafael J. Wysocki" , Viresh Kumar , Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Christian Loehle , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Sat, 11 May 2024 at 04:03, Qais Yousef wrote: > > On 05/07/24 14:53, Vincent Guittot wrote: > > > No I mean going out of idle. On an idle cpu, nothing happens at CFS > > task wakeup and we have to wait for the next tick to apply the new > > freq. This happens for both short task with uclamp min or long > > running/sleeping task (i.e. with high util_est) > > I think I found the problem, thanks for catching it! Ok I will test it when I will be back and have access to the board > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index cbe79c8ac2ed..dea9383a906e 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -4714,7 +4714,7 @@ static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s > if (se->avg.last_update_time && !(flags & SKIP_AGE_LOAD)) > __update_load_avg_se(now, cfs_rq, se); > > - cfs_rq->decayed = update_cfs_rq_load_avg(now, cfs_rq); > + cfs_rq->decayed |= update_cfs_rq_load_avg(now, cfs_rq); > cfs_rq->decayed |= propagate_entity_load_avg(se); > > if (!se->avg.last_update_time && (flags & DO_ATTACH)) {