Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2088801rdf; Mon, 6 Nov 2023 04:36:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGm31F5M7cvoMzrQPenOQssebrfHsl8ImnCvFRwTcXI7EsiyCSNe9ML3/wasKDN13DjH3xt X-Received: by 2002:a05:6a20:54a1:b0:12c:b10d:693d with SMTP id i33-20020a056a2054a100b0012cb10d693dmr27792245pzk.6.1699274172502; Mon, 06 Nov 2023 04:36:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699274172; cv=none; d=google.com; s=arc-20160816; b=zno8T/Iu0byRz+rlVWeGhITqkYqeMnPmTTqfqDxqh5BzxFWZ6dNQt+CfZrUhza3rmT oCdH9YZpoynhQsRkVgmSW4kb008pKyqXxpcM69H0vtVDPwj+7dCMpNN/XTGPbnHqm+Tb J+jj0ahpgq883WX6ToxDbXkKH6l907Hf4XCj6zCywWXAeOA+7DPzFM6ALYy0MrghDBpl fBLmceXDUAZuX/akacVo1dvS4u0tbRDceHajKguAQKY/ac9NEyRqt+hgW4Jnxw1yle71 Ph6g+bLPAntD6B+wucOOzcJ8vsLMdSjkQWBjoNfebq02HWNMaWKzA4BjDxyz7vjVJjeZ WOwA== 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=E2D25b0T1SaBIcOpulqdRtTqmMwhLs8nGieykVM8w6U=; fh=HxIBBKEto7/sCaE8WMmcwuRtB7L+q/pMOF/YJXta0nA=; b=PMhAZPi7lC1Q9zqEINqy1xj8uZrCU7dOjW8RaZ66ROHBiMk4yB5t/2tnTGehsyYR5U HOEJIWTScWSFn+iBQv3CZHNsoZ/Rr/Y92im6TWz+fNldn28AAmmLQ6y8gwOY8ArDbyIY nrnXv86c2yOdikIIi79irijQ8fwIYsJCU5JW/bM8aZ1u8ZFYiBLagyWqWhiQm5ZBATvV 0fVhpxPx9lF+dbw9aPn6H0oxEYWwm8Bsfqh/0ZvAbVcywveZtov8bTDViOZy+lW+rscu tvrUs1C2HFWQM3aTWMpTwbb5yS+pIpfC7YvwFI/2pDKQaoTTf2Et9dI1wqPujg8G6uXI Pxhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="Dbl/bj+k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bj5-20020a056a02018500b005bd3c9a9528si9601557pgb.263.2023.11.06.04.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 04:36:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="Dbl/bj+k"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 133B38077534; Mon, 6 Nov 2023 04:36:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231615AbjKFMf7 (ORCPT + 99 others); Mon, 6 Nov 2023 07:35:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbjKFMf4 (ORCPT ); Mon, 6 Nov 2023 07:35:56 -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 0C4D3BD for ; Mon, 6 Nov 2023 04:35:52 -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=E2D25b0T1SaBIcOpulqdRtTqmMwhLs8nGieykVM8w6U=; b=Dbl/bj+khTCKPDiAJmqK7zDnXD pqyFkXV9/jjIPDf9BNykJ+u0tDyUubFs2ueUG3mS7m5NcAgHqTtNZIFGMTXC+/sdkjUaCJwLIuDBn f5Yw1MiqPWHjouTMetWRjLL1p5j7O6/qZLTnlppV028xxcHYbeartXL72hrl4+S69+CjxSZJ0k2M6 7fEiZe0NzT5e+SB5gORE5TJt8V/n0r5xFgdLNCkmPGQKL/EdH6BuMSSl5d3ZaRc8cW8TwUdsxMwc1 kg07co3lvae/T4WpIkXkhbb3RWvm3J5WGxhOS29kiatoJmDU4b+72s13xYCoLf2mfh0gH8vDIh2mJ 6CJP+H1Q==; 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 1qzypQ-00AVzS-0C; Mon, 06 Nov 2023 12:35:40 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 5AFD230049D; Mon, 6 Nov 2023 13:35:39 +0100 (CET) Date: Mon, 6 Nov 2023 13:35:39 +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 0/3] Use update_current_exec_runtime simplify code Message-ID: <20231106123539.GL8262@noisy.programming.kicks-ass.net> References: <20231031125928.235685-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231031125928.235685-1-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 04:36:10 -0800 (PST) On Tue, Oct 31, 2023 at 08:59:25PM +0800, Yajun Deng wrote: > update_current_exec_runtime would update execution time for each task, > we can use update_current_exec_runtime simplify code. > > The 1st and 2nd patch update update_current_exec_runtime() applies to all > callers. > The 3rd patch use update_current_exec_runtime simplify update_curr. > > Yajun Deng (3): > sched: Don't account execution time for task group > sched: Don't trace stat runtime for task group > sched/fair: Simplify update_curr() > > kernel/sched/deadline.c | 4 +--- > kernel/sched/fair.c | 13 +++---------- > kernel/sched/rt.c | 5 ++--- > kernel/sched/sched.h | 11 +++++++---- > kernel/sched/stop_task.c | 2 +- > 5 files changed, 14 insertions(+), 21 deletions(-) Hurmph, so I'm having conflicts against this: https://lkml.kernel.org/r/54d148a144f26d9559698c4dd82d8859038a7380.1699095159.git.bristot@kernel.org (obviously).. I've resolved the first patch, which also mostly includes the second patch. However, your second patch isn't entirely right, it now unconditionally traces ->vruntime, which isn't the same. Imagine a regular task getting a PI boost to RT, in that case ->vruntime will be non-zero and the RT task will now be logging a vruntime. Anyway, that tracepoint doesn't really make sense to me anyway, that is, it logs a delta_exec and an absolute vruntime, that's inconsistent. Also, a delta vruntime can be easily computed because the weight should be known. I think I'm going to simply remove the vruntime from that tracepoint and avoid the whole problem. This then also makes resolving patch 3 easier. Let me go squish all this and then I'll post a link to whatever came out.