Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2096449rdf; Mon, 6 Nov 2023 04:49:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHm/8kuOoaUbdV2SoXQ9f7FEgqVCYc8kxSZKwQ65AWmteVH7pIHmR9CikuSxgTZmXHcbsQm X-Received: by 2002:a05:6a21:18c:b0:136:faec:a7dc with SMTP id le12-20020a056a21018c00b00136faeca7dcmr37705526pzb.11.1699274991698; Mon, 06 Nov 2023 04:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699274991; cv=none; d=google.com; s=arc-20160816; b=dZ8lufK2+7bMIGcKItesMoutFpwaYPt3jlzSi4YN8jSq86K8aBRAMO0s+mphmeWEUD D2PxdbEub2T9ufMKq7/1IN6uf39rNsSKxUIJnXmqE2jT3hjKYIxoZKaiMiQgyUrX0VM6 SZmCe6uyglq7+HwQJ/TjKwbhuS1yG1+RJgkaCR8aC0wCWHOfsFWyy+0Dgq8ddNHJum99 JkCBieU4FjyjsXgJMeyKcX/1H85k2HNtcCZyJNS08d7xCrhuNcH2OPBH5Z7b+NB8lBzN SDJzt4DPtuZRwy4ciMRMsJk7dCfv0cHmUnpiaKEVKGMRTTOQ6USJahnf+TPGomDHdBLx 5s4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2WtEdZBmslCuVN1AQ4HlTQxWbr8sd/oi9GlYQjSg5r0=; fh=HxIBBKEto7/sCaE8WMmcwuRtB7L+q/pMOF/YJXta0nA=; b=Nw5m/3rhH0Vs7KanNOi8oRei282aqXSRU+1eYUzPFfUtkPAiRHsX6beaqZLGj2ZCSw 6y3ktxoAOQQgdZv+AF+5ZpU86EXc6lQqyJtEK9Mr2d9Y/E1RtnrE2t0Xgm1gU/xynFUs 5er36dReKBT3FCvQBKo3wVllVZ6Ck+iIdV6sW5n7bk2XvzraKit+tN844Cx55uA9KaXl zKl7ySAQqmNXkVlH2gqZsxW8qNiaguN9oe1CYAuFr4+Z9UBL4CQNI2WQOiXL4Oqd6Mbi XOmWPzTGkAxQxY/oIwTwPLR3414bQ5Z4mFzWY3IWSeIC/F+Ut9+AAU55sGieHE6dnf4A Et3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="m/B2EWUj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c9-20020a170902d48900b001cc1eab0fe4si8460634plg.298.2023.11.06.04.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 04:49:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="m/B2EWUj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7D59A80A532D; Mon, 6 Nov 2023 04:49:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229874AbjKFMte (ORCPT + 99 others); Mon, 6 Nov 2023 07:49:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjKFMtd (ORCPT ); Mon, 6 Nov 2023 07:49:33 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCE6BB for ; Mon, 6 Nov 2023 04:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2WtEdZBmslCuVN1AQ4HlTQxWbr8sd/oi9GlYQjSg5r0=; b=m/B2EWUjf1oQJWy2kDbDcTYYnn oe3519MUtMpZwzfFB656xvf4avpOWpnP2mFNLRu+rxkG+hD/3Y006DBBEZ/ziFdgM61CRKJ2mg5c6 M6qLyY2X+tjKyKT62s7VrPNIbGvpduhHUOjneLdpGjTiZw2u48ANj9piFqBEEjV8dSCKMCsekYOob 21FxAhtS1MroGtgPsx6Bb0VElRAxnORmY6IKqwmg9IY8jX6wOPpJHYsIbPiy18Ql2En0AK3k1NOL3 4WQ4mNEDuF7Dwc//qa9B52EcJB63biGBblZpeCCFZf/uG2dgbP2irqYLfxAziiMhI0dEwK8/LPxbk slpKsdyg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qzz2W-00AWEc-2t; Mon, 06 Nov 2023 12:49:13 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 6425F30049D; Mon, 6 Nov 2023 13:49:12 +0100 (CET) Date: Mon, 6 Nov 2023 13:49:12 +0100 From: Peter Zijlstra To: Yajun Deng Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] sched: Don't account execution time for task group Message-ID: <20231106124912.GM8262@noisy.programming.kicks-ass.net> References: <20231031125928.235685-1-yajun.deng@linux.dev> <20231031125928.235685-2-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231031125928.235685-2-yajun.deng@linux.dev> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 04:49:49 -0800 (PST) On Tue, Oct 31, 2023 at 08:59:26PM +0800, Yajun Deng wrote: > The rt entity can be a task group. We will account execution time for > each task. For consistency, we don't need to account execution time for > task group. > > Pass a parameter to update_current_exec_runtime, let the caller decide > whether account execution time. > > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index 6aaf0a3d6081..79cf80d73822 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -1018,7 +1018,8 @@ static void update_curr_rt(struct rq *rq) > > trace_sched_stat_runtime(curr, delta_exec, 0); > > - update_current_exec_runtime(curr, now, delta_exec); > + update_current_exec_runtime(curr, now, delta_exec, > + rt_entity_is_task(rt_se)); > > if (!rt_bandwidth_enabled()) > return; ok, I think I've managed to confuse myself again. But at this point rt_se := &rq->curr->rt, which is *always* a task, no?