From nobody Wed Dec 17 14:19:47 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA817C71149 for ; Fri, 18 Aug 2023 13:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377121AbjHRNW2 (ORCPT ); Fri, 18 Aug 2023 09:22:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377104AbjHRNWV (ORCPT ); Fri, 18 Aug 2023 09:22:21 -0400 Received: from out-4.mta0.migadu.com (out-4.mta0.migadu.com [IPv6:2001:41d0:1004:224b::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7404273C for ; Fri, 18 Aug 2023 06:22:19 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692364938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kWiC7TwpXHefmJUjt4l0hnA6egWlnTJpUoNrKlCyRb8=; b=MnTRUDALMaABj73LWbuwW3NywPIes6lk5lyznl5AxujgC0tu+G1vXzysu4N9HyYvB5L1ST CGTAe47i3qF4XMS3FozXPCSpD/Hd/1eUuOSXyGCWS9owNpee+g4702Fol0iQ3m3/7hKzy/ OjvZNh8iOyd2KNUizRr1dCiQHaN6/zo= From: chengming.zhou@linux.dev To: mingo@redhat.com, peterz@infradead.org, ycliang@andestech.com Cc: 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, zhouchengming@bytedance.com, linux-kernel@vger.kernel.org Subject: [PATCH v2] sched/fair: Fix cfs_rq_is_decayed() on !SMP Date: Fri, 18 Aug 2023 21:21:48 +0800 Message-ID: <20230818132148.2237811-1-chengming.zhou@linux.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chengming Zhou We don't need to maintain per-queue leaf_cfs_rq_list on !SMP, since it's used for cfs_rq load tracking & balance on SMP. But sched debug interface use it to print per-cfs_rq stats, which maybe better to change to use walk_tg_tree_from() instead. This patch just fix the !SMP version cfs_rq_is_decayed(), so the per-queue leaf_cfs_rq_list is also maintained correctly on !SMP, to fix the warning in assert_list_leaf_cfs_rq(). Fixes: 0a00a354644e ("sched/fair: Delete useless condition in tg_unthrottle= _up()") Reported-by: Leo Liang Signed-off-by: Chengming Zhou Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a80a73909dc2..05e004515fde 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4654,7 +4654,7 @@ static inline void update_misfit_status(struct task_s= truct *p, struct rq *rq) =20 static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq) { - return true; + return !(cfs_rq->nr_running); } =20 #define UPDATE_TG 0x0 --=20 2.41.0