Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2561275rdf; Mon, 6 Nov 2023 19:49:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IErLz7AkRgcYN3ZPJkC5xMHypZPiQCmqPlgBDLRjugwTfgbh9kXeddnhRN9mLSKjHjBmk5c X-Received: by 2002:a17:903:11c7:b0:1cc:38e6:f097 with SMTP id q7-20020a17090311c700b001cc38e6f097mr2563383plh.7.1699328982921; Mon, 06 Nov 2023 19:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699328982; cv=none; d=google.com; s=arc-20160816; b=w9v86WL3UFHjBRK97ouTZSbXngNwhljos+PEM2QPibYJGi3GAvIh8at16bD6esYH1P Xa8B/LMSZDcc2xgEgBZaudJo58EHZKYNpoVy0EgZguVu+CpBbT/YCOwqVFqLL9k/zIMc chLxnFvvBIM58aXlnmb8gTK1ostiCDmg/XwewwepwXUztz0db18vqmEMJaxTFFlrsw/P Cyc2pqtIEnzkpByq1yMhMKwdOAmaERlc0lL4QmSlwzewPwrNbNGuxslFYqIU0LM7zeZ+ R8HZ7rdMV3nMXaHVxqDdFNQFhmBbH45tNwmNc0EFBT3uIPD2xhKEALs0bu7Abrw7w1da c/dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:mime-version:date :dkim-signature:message-id; bh=8H2mvIjp6dWAfy8ApUJkKLe3+aKqzQ0bA2gZK2qOYlg=; fh=/he3ZEV5UulUEHn+2QRhf917UP9mb5MI8b1A6DTpRHA=; b=RO4qU7qg3v1Byzk9Pi5VIrCd+SfzpEI/XeJ//VLTKWMFlnSO+sgrxhb7excIpy4sV2 zP8mJPXf3AbbafK3/jx0Plr2cdwnoKE5LesN452Oj89qj0xRutJbKB7gtGTjexv8hPVb qSHxcN8XoOk2q0RwqF1rizStYHTIycdFku2PJo59faS7jgjFaYQKCDhDKxNLg2xulnJ8 1/X+GEPsba1/S0L4+enKDkz6zG4MVbLE7GB9Ij8mYF+oPaOS9XVReGce/dbKSRj/y8hu kmab+lSMAs+TQkYd6QjW8osY51eeIGH0paft7WqChCmIDbQuN7MZjykJJvdZJR1NihZd 0aUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tP9nXKBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d1-20020a170903230100b001cc4f55db71si9990100plh.343.2023.11.06.19.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 19:49:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tP9nXKBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 98938807831D; Mon, 6 Nov 2023 19:49:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232973AbjKGDtb (ORCPT + 99 others); Mon, 6 Nov 2023 22:49:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbjKGDta (ORCPT ); Mon, 6 Nov 2023 22:49:30 -0500 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B4E3D57 for ; Mon, 6 Nov 2023 19:49:27 -0800 (PST) Message-ID: <585ca8ea-c371-dca4-52ef-0f2d2e019774@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1699328965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8H2mvIjp6dWAfy8ApUJkKLe3+aKqzQ0bA2gZK2qOYlg=; b=tP9nXKBk6fIkaavRtfywtiNQehl/R9TDQIVe2EWmdwL+VaVAnpHSR3tjck2v1TdQ2PgY3l swN0OHPJZcI2b4D36tUkFkAooEH0xNtNScpAkAGDJOp4Uy8Rulh5HvL6JwtCFI4J5x7trD ahmgyZZUliZYGncGTybYyX5VgurB2wY= Date: Tue, 7 Nov 2023 11:49:15 +0800 MIME-Version: 1.0 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yajun Deng Subject: Re: [PATCH v3 1/3] sched: Don't account execution time for task group To: Peter Zijlstra 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 References: <20231031125928.235685-1-yajun.deng@linux.dev> <20231031125928.235685-2-yajun.deng@linux.dev> <20231106124912.GM8262@noisy.programming.kicks-ass.net> Content-Language: en-US In-Reply-To: <20231106124912.GM8262@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 19:49:40 -0800 (PST) On 2023/11/6 20:49, Peter Zijlstra wrote: > 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? I think so, but it can be safer to use rt_entity_is_task().