From patchwork Fri Sep 15 12:26:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 140453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1079232vqi; Fri, 15 Sep 2023 07:15:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDF8dUIclPaubK6pmfAVdCo6HSKbS0tpjHq3l9DC3cnQlX3kWxiHh2K7jqnnEC1XOvLkL+ X-Received: by 2002:a05:6300:8088:b0:13f:5234:24ce with SMTP id ap8-20020a056300808800b0013f523424cemr1814879pzc.28.1694787336089; Fri, 15 Sep 2023 07:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694787336; cv=none; d=google.com; s=arc-20160816; b=X01/7s2ZWpTAHXPXxD7jpztnszc2W7fR9wb+u0XcRNYinaS9wCSKnbwPK4XXl2wz0c PX9vZuLoOB4dDuxGShxqzDvRkfPvfpR+psecKL8mfd0r0nJpmX2ylIIknTh+lA/0kIHT DJ8D3I86wx6rz5hhnqd37alxSaGLsXe8aw4hiyUva2PcX+5iIcXFTaGEjzuM0ktyyGPM SWeKssL/J0rBZWgtKW7YyhYq8oxSGR0GEVdyDzetZ0bqXnbuWNvd97k8Ku8ANAWBjfmf lcp+jdrrlye01TNOO497EfuP7kXT3G6iJszcxAddmrUnvfbfUTsPy4XQyga0nic+1h9u BWVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=/+vWFyP7OLMXcdpfdgf7/35HLZDxH06nBm9Y+bQWqeo=; fh=Zds16Q3eNbOSAs+ZHtQiRG10VkUMH8wMTFx/nITTCNQ=; b=eIu9PywflcSxCwf6fu5DzPxBafVxjgOJgV38hFhEO5aDyaNJmv8BbQI/zBihYvlee8 HrocQH4T28v57WF0iUEzNQxEbfKEh/sODuCQPjnkv3tirX/a8CV9BfB98zz794CAPvY8 nKsaAnxtqP/F8awGhpmFFMOpHe/2z2ru/FIM7UoWBh92EzXqtn8kfPL6LCGkVQsmi0JH 0pEKUT/zlhbtsj699C9DUL9GGZmu5n9NZ/q7g5DpeUbU6qjkhKqBIsGfGKK6RrjdQuvH QmRpxdQQkR6/vnTrtDiWl8Eoc3vL4gyNZ//fElaqxHuwkBIKQG8E6dDnGzfLatwgNObr 2g5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JPvV6yCY; dkim=neutral (no key) header.i=@linutronix.de header.b="5Bt1E/1R"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id by24-20020a056a02059800b00565bef99dbdsi3762294pgb.141.2023.09.15.07.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 07:15:36 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=JPvV6yCY; dkim=neutral (no key) header.i=@linutronix.de header.b="5Bt1E/1R"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6303981489F7; Fri, 15 Sep 2023 05:27:24 -0700 (PDT) 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 S234895AbjIOM1J (ORCPT + 32 others); Fri, 15 Sep 2023 08:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234903AbjIOM1I (ORCPT ); Fri, 15 Sep 2023 08:27:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4E52120; Fri, 15 Sep 2023 05:27:01 -0700 (PDT) Date: Fri, 15 Sep 2023 12:26:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694780819; h=from:from:sender:sender:reply-to: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=/+vWFyP7OLMXcdpfdgf7/35HLZDxH06nBm9Y+bQWqeo=; b=JPvV6yCYVt/1BQ9FikRMMf+EgfMFd9p1Km6+5LTt9XmzDWzMnIoXFDI0gDod9oyAjIXLaA pEosRwZovzKHMc++VsmV0M8aYneknncou1GF7eU5+eqxGrGLJYNpHTdlLNYcXHZEknWz0+ 8vqv+ULs7CpL8uAHeTIrLx4m5KPDw3hEm1+KG5bQpJzd2SoUsnt3eEe3jVL9fCUZL0+yIS jUtpDTDgiRzPBNOqC+UGwJMGhDUz6qJqrCcVHbcGqZZz8LN5/ehgJpEP5pBmaWWJCy3cil rX336XHWsqL7a+G7vweY/r+qb9ppHLvSqPmn9km6s0zKxY8t4KvEU90PnOaS0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694780819; h=from:from:sender:sender:reply-to: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=/+vWFyP7OLMXcdpfdgf7/35HLZDxH06nBm9Y+bQWqeo=; b=5Bt1E/1RGu6XtvHgWS3t3VG3IB3XJIRUCCV8/pgccNdj7D/WTo4vENkOfjgiVb3R78M8TE GKe2AaAjkSomomDQ== From: "tip-bot2 for Chengming Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Fix cfs_rq_is_decayed() on !SMP Cc: "Leo Yu-Chi Liang" , Chengming Zhou , Ingo Molnar , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230913132031.2242151-1-chengming.zhou@linux.dev> References: <20230913132031.2242151-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Message-ID: <169478081914.27769.11548694919151227611.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 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]); Fri, 15 Sep 2023 05:27:24 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776929227355069173 X-GMAIL-MSGID: 1777113325713652408 The following commit has been merged into the sched/core branch of tip: Commit-ID: c0490bc9bb62d9376f3dd4ec28e03ca0fef97152 Gitweb: https://git.kernel.org/tip/c0490bc9bb62d9376f3dd4ec28e03ca0fef97152 Author: Chengming Zhou AuthorDate: Wed, 13 Sep 2023 13:20:31 Committer: Ingo Molnar CommitterDate: Fri, 15 Sep 2023 14:24:00 +02:00 sched/fair: Fix cfs_rq_is_decayed() on !SMP We don't need to maintain per-queue leaf_cfs_rq_list on !SMP, since it's used for cfs_rq load tracking & balancing on SMP. But sched debug interface uses it to print per-cfs_rq stats. This patch fixes the !SMP version of 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 Signed-off-by: Chengming Zhou Signed-off-by: Ingo Molnar Tested-by: Leo Yu-Chi Liang Reviewed-by: Vincent Guittot Closes: https://lore.kernel.org/all/ZN87UsqkWcFLDxea@swlinux02/ Link: https://lore.kernel.org/r/20230913132031.2242151-1-chengming.zhou@linux.dev --- 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 41cfd61..c893721 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4866,7 +4866,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