Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp858931lqo; Fri, 10 May 2024 19:03:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULqx81fHBhq9z2cX96aYDeNt1vb+liMyO8ig7AjIzJF9KFNiHCptTqyxc8lfreT++Qw6BOYlpBcVBMeRUOg0cR0kVU87E6+jAsFE8AuQ== X-Google-Smtp-Source: AGHT+IExLN7Jzm4Ge4UFUygW4qS4iboMv+jlWyR3iRECHEg1jQr4FCrubGFyHr5BY4eh5FF7Xla8 X-Received: by 2002:a05:6a00:1149:b0:6ed:ca65:68b with SMTP id d2e1a72fcca58-6f4c908ae25mr10279044b3a.4.1715392998700; Fri, 10 May 2024 19:03:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715392998; cv=pass; d=google.com; s=arc-20160816; b=Vu3lsdye2vwFjDpvSwdwBj8g6sCXJt+VljILAZGGZ/5hMqP5f3bzEKUN6HGdDF05PS 5CvDMNfXSHF+WOTOi27V7iRkBfgGZ3dxNmbuQjMZTnEtX38Kv15iewCgN5Qf8WJXBkAN I4wj8zIeH0JLH39LvqJydU4qctdVWn8FTr2P8em74emBbAJn37wrrsOxzQGUB4GQZ3Il kIGDssIJwTlEhCIDRVqfBC3bBQCudyG8QGHPLlGynx/JgPhO/uRVt5R426gJPqth7Tux 0Qxo/u2pXTcVhWdDTAzSncNGNZOBEXOP1u1++xt4OcDo/Qulyqfx+Pk9TCuMi35bh2lE ZEhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=u6V27w9Elu3u/pD8Slmp6ksTzr07hsPIaIb7/sQr47g=; fh=JEc3WI8iv7wRNAkZvA6B2g9T/MVXgC/uyMBdLi9TRqo=; b=oi3zSW934ZayWMgEKZJmUj3MA/u+DbyUMP1ypPzYV+10u9nsJ8UcDEs8wuidqhmSAa 5z8tx90wkx6eYgrOApYCsLZf3+j4CR4Ihb7LXtw/T2vhriLbvVTOuLiqvPPG3ss6lC1a TckjdmDA047Ijny9jPIXJqKJIcX4KQcfk7eQVcZxuBqy/4+CgI2AorV/Qk4OfJW1uP57 XOd2L05VNDsXmxucrl7XMkSlXl2ZEnykSb1fO1OkXfhPl1Prt1Ux08i6V+Pmmae44iC4 uWQBjl+a5D3K4VSfPIgf5hX2GFBrOWFm4/GbfH2pml2mMBpf8mfvY/Px3ou/10etrOXP a35w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=rYyYJX1R; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176370-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a7df0esi5173833b3a.44.2024.05.10.19.03.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 19:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=rYyYJX1R; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176370-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176370-linux.lists.archive=gmail.com@vger.kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 54A40283452 for ; Sat, 11 May 2024 02:03:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 269CD14AAD; Sat, 11 May 2024 02:03:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="rYyYJX1R" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 6FB3712B77 for ; Sat, 11 May 2024 02:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715392989; cv=none; b=d/onKjSio+1y2QUAcIeyUEeYzcUEiqVexlSWgMXC9cwYUcHxsuTJxuz3wLjq1jR6BXncOihLcvF283c2qCGmx7BtLCJO5m57HopJRvnra2hKfzeD/SStMaPiGPllwfAghGZ/zfiPmqV47j1TgonwIr56RtkceLJfmEU5K8uTeWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715392989; c=relaxed/simple; bh=23NCtM4rk91GLA9JKh8efv+I/oh07TPyt/vfGu2aLuo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YTWqHlO4i+LJRvdq9v4MphItWgcX9C56fJuGKX9l2QOpVdD3VMdNjBrEs6k017xeQy62MmDYc6kc/5zf4ejoLCRNjLYICsyTqgodeUMC8s9k4pPFeZCrIHA3q1h30UOaWHc5zPY7nCnWYofSU7zO4sGdBAuwQaC0NAWoXi18vcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b=rYyYJX1R; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41b7a26326eso18154365e9.3 for ; Fri, 10 May 2024 19:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1715392986; x=1715997786; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=u6V27w9Elu3u/pD8Slmp6ksTzr07hsPIaIb7/sQr47g=; b=rYyYJX1RFtQtI02lTjDN4ppYamBcVMGgWRYCi2UiuBkOAUW3yG85SmWAfPf9UUoKHy hxTVMJQ4Ci9ufU1kDIzq5YKdwTE7XM49AbTAwxh1X+RKNELnFJH0UvXqoNPBlzwoMy3S CMavNqEpmLcnCfVhU8oi0BmdpDIjL0Mx2eIp4b7BtGVFgcNG5R+73+usbMBEarfpFtV0 dNFdVrcCTohYyo7zAXPvlzOqWSt1qXDoOy9/PXmx6poCybvZ7B6agTvKaT++ZLGMVKhi KO6nGWknGIthC/zhFDLtAx8XhOLhiFW9OVGgFKxoImaDODtEJCDc9FFuPj1Ecy5Z2YXi UPCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715392986; x=1715997786; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=u6V27w9Elu3u/pD8Slmp6ksTzr07hsPIaIb7/sQr47g=; b=d8EQiZiNXw3vb+6ADc39bmxiB3iftiiy09ou1OiPIzCLK3rM1tHYKt79tvOxuQPlbP cC8MwxzDaTonIXsZRYKa/ZGxlMCiX8K4VLbyGUrhaJNBggxXWMQYF8tCmcSpoVLmfjrq FQau3u5RTT5B5nTP+52Qkj+hv7HDAHnx6gWJWQYITcoeJ5VDO5n08+wN6dzy34/Khx0Q KdtI4NmZ2Tajv/lQN7oieGcSHxXYWx9Ek6l3w0HVvFTDQyjM7M8TdpkJrzV8Ijexoi1e TBvDGjPH8Vqf0qkLp/h8lGluH4HxKv6a+i/yRM8DSGSI/jQAL6C5aQNl3u8FRLZGdWQ6 BuDw== X-Forwarded-Encrypted: i=1; AJvYcCUMJHQenaHE29NwhB+Wv59mTiavoUXCISaG2ni6um52Utwhi6cNKCYldCIhl4MEM33yutfFnv2S8WuXqeV7lkqOBdumPZdDjVOzI61S X-Gm-Message-State: AOJu0Yxw0HpLtnVFPB2rsSSz97FHN8jOO6C/ggqsz/z8nLAiWyVacpvL 8QTnZC6ctSSoGLZfiU7onh32A1+agpnsi0//qQbPiENMHF5MDgylKJHmKuMQ3HI= X-Received: by 2002:a05:600c:1c1c:b0:41a:c170:701f with SMTP id 5b1f17b1804b1-41fead61f3cmr36992635e9.38.1715392985507; Fri, 10 May 2024 19:03:05 -0700 (PDT) Received: from airbuntu (host81-157-90-255.range81-157.btcentralplus.com. [81.157.90.255]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41ff6fd7e73sm41994055e9.27.2024.05.10.19.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 19:03:04 -0700 (PDT) Date: Sat, 11 May 2024 03:03:03 +0100 From: Qais Yousef To: Vincent Guittot 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 Subject: Re: [PATCH v2] sched: Consolidate cpufreq updates Message-ID: <20240511020303.c27wr52eqflft2o3@airbuntu> References: <20240505233103.168766-1-qyousef@layalina.io> <20240507110809.a45amdmhy5vr5cuw@airbuntu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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! 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)) {