Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp646909pxj; Wed, 2 Jun 2021 08:02:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzOpOUIBREEHsJlRcPi4+RRxbn+ZEZkxeViqYINRC7syU0QQZx+7xanhMUJ8CkkaU78O2n X-Received: by 2002:a17:906:a203:: with SMTP id r3mr35223202ejy.361.1622646157832; Wed, 02 Jun 2021 08:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622646157; cv=none; d=google.com; s=arc-20160816; b=GN713fE5Q+RL2w6Emmcc6tjiPOmjG/PaOZozdS3vkAW9lXtfOfxmeZmCn0NYK0UAIj PjtYzKJi3/y78cDtUR3Yr52rQ2Sz44NE1FtAGWQqBgS+QnyIf6XTvGSIldeH5SWT1NmM DOMCFWdJFRy57mYA+on2aLAlGOplU/zP6l01w4E3BpcoGlY0l+WYttXOuAnKj0zdiPKW zFLkPIS0MhaTOd8P6fZOV59tK53jc6g9xEbNNJfPzMm0M5+ANwR5E533rhQfI2keM5H1 JMYvTV5xruxFnYpTf5T/4HZeaduKihqzPlGojn0j+S0T21yceDbgfCh2aDtDDBtHXQDA T+YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=4icxJHxsut6nOFGxWJyjYZTeX2A6UoikdLKuDyrU2FM=; b=T8QdjKRZ2MjoXV5kE/DkGi5MrX9RjKbcglPMNocArVWC/KtB9NocBxusVJrNXaKhlJ BOZ3vJtYjSOKSYEcWAjBTVZ6X2/iINqnhirH1dsM66don8vjdeU4yvgRikpXi7m3EfJz Pfy/n18pGbBXgwd4f1bKmvmb3lSLDNFL1O4pm+TODthISZ/CDHkUmyQjz5NyonedDJMr wvSRIMcJfYkKGanVNOSIaAuIeB3HJSxTsM0S8weVaTPDki7ozWog3aarEqfk7EhMJAiZ PvsLXGY+5opxZpviMrvjz8wzoj6g3G77/waqpgjRM8/mEG1aetS+uhAc73MAebHw+7gY 0S4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 19si71726ejx.529.2021.06.02.08.02.14; Wed, 02 Jun 2021 08:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbhFBPAb (ORCPT + 99 others); Wed, 2 Jun 2021 11:00:31 -0400 Received: from foss.arm.com ([217.140.110.172]:47160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbhFBPAb (ORCPT ); Wed, 2 Jun 2021 11:00:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 022D912FC; Wed, 2 Jun 2021 07:58:48 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2BE7A3F719; Wed, 2 Jun 2021 07:58:45 -0700 (PDT) Subject: Re: [PATCH] sched/fair: Fix util_est UTIL_AVG_UNCHANGED handling To: Xuewen Yan Cc: Vincent Donnefort , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Patrick Bellasi , Quentin Perret , linux-kernel References: <20210514103748.737809-1-dietmar.eggemann@arm.com> <20210519160633.GA230499@e120877-lin.cambridge.arm.com> From: Dietmar Eggemann Message-ID: <9309950f-1e6b-44ab-4536-678b4ced4f49@arm.com> Date: Wed, 2 Jun 2021 16:58:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/05/2021 08:25, Xuewen Yan wrote: > On Fri, May 28, 2021 at 6:38 AM Dietmar Eggemann > wrote: >> >> On 27/05/2021 07:41, Xuewen Yan wrote: >>> Hi >>> >>> On Wed, May 26, 2021 at 10:59 PM Dietmar Eggemann >>> wrote: >>>> >>>> On 19/05/2021 18:06, Vincent Donnefort wrote: >>>>> On Fri, May 14, 2021 at 12:37:48PM +0200, Dietmar Eggemann wrote: [...] >>> IMHO, Maybe it would be better to put it in the util_est structure >>> just like UTIL_EST_WEIGHT_SHIFT? >> >> Yeah, can do. >> >> I just realized that 'kernel/sched/pelt.h' does not include >> directly (or indirectly via "sched.h". But I can easily >> move cfs_se_util_change() (which uses UTIL_AVG_UNCHANGED) from pelt.h to >> pelt.c, its only consumer anyway. > > Since there are so many questions, why not add ( #include "pelt.h" ) > directly into (kernel/sched/debug.c)? > > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > index 9c882f20803e..dde91171d4ae 100644 > --- a/kernel/sched/debug.c > +++ b/kernel/sched/debug.c > @@ -7,6 +7,7 @@ > * Copyright(C) 2007, Red Hat, Inc., Ingo Molnar > */ > #include "sched.h" > +#include "pelt.h" Didn't want to expose PELT internals unnecessarily. And ... turns out that the include dependency `"sched.h" before "pelt.h"` exists for much more things than just UTIL_AVG_UNCHANGED. So I think I don't have to care about the issue in this case. I sent out a v2 addressing your comment.