Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3476494rdb; Wed, 13 Sep 2023 13:15:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsGFZt0NRQpE7bSqWAO7qLWPjBRy0adEsbV3SrV3tLw3DrOXBsM8MtoQ6Ou4Z8whRm0/kX X-Received: by 2002:a05:6e02:1a2b:b0:34f:234d:4b5a with SMTP id g11-20020a056e021a2b00b0034f234d4b5amr4157662ile.29.1694636148884; Wed, 13 Sep 2023 13:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694636148; cv=none; d=google.com; s=arc-20160816; b=LjaKALv1Ha1XCUR3H1wrZjzb+6Yj235l2+n5Xh6X7PPwzPc/lhLW8rtwrGiafPeRiY p7nf5pVzoycf4KBxKVIqE3vRLtPxXAVLzGiYsVfhrR8g8wEGZIxSxj+cREc2MTntJiW5 clVKN7W7YS1H+fxvND3yhiKWzxAF2eAJ7nVpswnAel5XaBZO4sjQppPx4Ieq3So4XpJa 50invmsE/UCTQJd9P+lHyV+90IhPYt3J83CFK6mhViB4Adg1Z59eG9x4ywRC1FWNFLqB vhqHW3UpAJJv3FZTEaxE7O61cSSxZLpOBuOLmPjG9QEiDluaPN0DrBRbM8cULFmYOsnd sAyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dGhSbIt4RVsf+l8/Z6SCikAFiRLpLiL6j7bY+eiV6Nw=; fh=+1U2X7HhI28EokcbsoMVssNK7i366fUp3/wQw/Vd6oI=; b=cN2XKUi63DWTk4AHRvXdlVQelKShU/52GQgQa+jlndxqUWNfhDYa6k6nRTiV8k2mn+ UcPThURFBWzOmOkx5fpga3kGsqzyySOn7mupVcpTeewW91ZDBgA4OhxsIQ2776F7ep6v aK59AwnW4AZuVJtvhh9DlPcZxSh4Ve6EBlyczVJSq4ajh90V4+3fAN04Q0xZg6QBwap8 3vHAzAiYy6vlNa0zBY9DswtMfuJ5+oY320C8xifR97m+oSVanXQn4pB94MDtnGQGplU8 Kq4Fl3DwSKAtt9doYod6Sd8EhoguWhXZDJyJJmnMe8sgmSutnrtUwdR3p7d8kILs/E8I /6Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SZfDph77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fc18-20020a056a002e1200b0068e29634d9fsi8111820pfb.235.2023.09.13.13.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 13:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SZfDph77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 96ACF80BD39A; Wed, 13 Sep 2023 06:20:53 -0700 (PDT) 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 S238839AbjIMNUy (ORCPT + 99 others); Wed, 13 Sep 2023 09:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235126AbjIMNUw (ORCPT ); Wed, 13 Sep 2023 09:20:52 -0400 Received: from out-229.mta1.migadu.com (out-229.mta1.migadu.com [IPv6:2001:41d0:203:375::e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C78119B4 for ; Wed, 13 Sep 2023 06:20:48 -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=1694611246; 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; bh=dGhSbIt4RVsf+l8/Z6SCikAFiRLpLiL6j7bY+eiV6Nw=; b=SZfDph77D9h6faQahZjHb4VP48K4rDDbsGXJ/Jqo7W2cH7w5/fjxBlzXM0mo1cKekinlMU RhyMIT/hAp2UTHvbAdsXCgUe0/xWQv5IEShi/j8SX9VBBPqvKF+sgMQFrMzzXiwjhOhRAM hGvEzr8pcs11qBSoiKlPv6bfYsJjHBc= From: chengming.zhou@linux.dev To: mingo@redhat.com, peterz@infradead.org Cc: linux-kernel@vger.kernel.org, chengming.zhou@linux.dev, Chengming Zhou , Leo Yu-Chi Liang , Vincent Guittot Subject: [PATCH v2] sched/fair: Fix cfs_rq_is_decayed() on !SMP Date: Wed, 13 Sep 2023 13:20:31 +0000 Message-Id: <20230913132031.2242151-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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]); Wed, 13 Sep 2023 06:20:53 -0700 (PDT) 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 Yu-Chi Liang Closes: https://lore.kernel.org/all/ZN87UsqkWcFLDxea@swlinux02/ Tested-by: Leo Yu-Chi Liang Reviewed-by: Vincent Guittot Signed-off-by: Chengming Zhou --- 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 8dbff6e7ad4f..845d7729320e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4878,7 +4878,7 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq) static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq) { - return true; + return !(cfs_rq->nr_running); } #define UPDATE_TG 0x0 -- 2.40.1