From patchwork Sun Sep 24 10:39:29 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: 144140 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp835111vqu; Sun, 24 Sep 2023 13:56:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3a+4STPIL/BQZ+bftSetDSQLCyKq1fMnUJNp9P8f2N/N4qGhDKBT1lrKq8wyqYAkQlBF1 X-Received: by 2002:a81:8506:0:b0:595:320d:c9e2 with SMTP id v6-20020a818506000000b00595320dc9e2mr5002617ywf.24.1695589002086; Sun, 24 Sep 2023 13:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695589002; cv=none; d=google.com; s=arc-20160816; b=YkZ2DHcg0hyjm0DqwsW+9FzKJz5A6kBYKs/0IX/Wy5PTEsn2N65G+KlhoS09EyOqGD hSRdUj08LiU+A87BbK2l1+UAXkg8JLMRx1p32zevBvxHVyeWb4w5BghGJLB4G8OvBmIw MXzp7aGY79rO3bCBSDPqgMi0Be5b+lx2MIByjfInoHqZsmK6mIJlm3zjZtV/vlgwfo4K pe57NQzz+Z7YGSCl99XK8x5TlCpiSRB30pROrbhUEfKS+WUlEGMrjJ3a3ZqWnEDX5pxq h4BAKf3AeZWOd2MZhEGf+WxpWmK5sNkFHqSLQuQ1csGQlM1sILYIuY5qoQzNSdMlZq6j hgRw== 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=Iby/f6knc8Llp2MPydntv2sbevQFn926+/F0Sda8m1Q=; fh=7+E32S13j/co1XjyHLqMWZCaNmlyFOJ1mA7SUUGvU70=; b=sXGzGOITEj1qlMsZ6V6Nk1ehCxjp0lxN6mUiTezabbRXZnqYNXLju7me3vt2Q+pSwh K8/MoavdR9nAkzShctu5C5f+XwJLmXDaLWrnlPrLfaWQ4c56xVKz4JAnaBvChFnkaNhP elkGmEoL+azkcYs9WH02zZVFMeKopxAL33wadGxskfek4UY4NueXZR3fHK83oQ4gtwHm qHBNRmi8SeLx5j3fTjZ/nhU/Dz1EOkIzX9dD9LmkYYTZ34JmTT1mTEseNIHa87Orp41P 9eaRg+06lrBDvGrpXktg0uABpLlSThAVImOVYweLqPagUBVlTgv/DsBZFv/DyheMQki1 5L8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Ozdq1/cJ"; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id lw7-20020a17090b180700b0027762924984si365144pjb.183.2023.09.24.13.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 13:56:42 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b="Ozdq1/cJ"; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F1474807C74C; Sun, 24 Sep 2023 03:40:45 -0700 (PDT) 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 S230019AbjIXKjl (ORCPT + 30 others); Sun, 24 Sep 2023 06:39:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbjIXKjh (ORCPT ); Sun, 24 Sep 2023 06:39:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21CD5103; Sun, 24 Sep 2023 03:39:31 -0700 (PDT) Date: Sun, 24 Sep 2023 10:39:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695551969; 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=Iby/f6knc8Llp2MPydntv2sbevQFn926+/F0Sda8m1Q=; b=Ozdq1/cJ2kfFwdGuIEqvE+EyoBmvc3BT5jLZM5Y6GH5o/72a/BYcOMqYvQ253WL0vHq6hb eM5DrvbwLLaSNRLwRdAFgYS/RQxka4FkFRt1BrYnKS46IAqJx/blgd1CxQi1cu5fFDi8xH UkRLLrAznXfJn/TEZHoBWVJjDlQbM7V4NXYM+U0wX8EvFqaCikK+AMg4pvHdG7KfH2gSsO XQ4UwbSFK0d50htezJp6A14LfPNllFsoSs9gSmuaFHTHJJyUnne7t7Jd7V3+8kHPPI2ZaJ xYVo0Fr1cQzE0Ia2U65jRJFnRokqiROcC7jf/OaPj/CZz69V97qBHpTVWoGXYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695551969; 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=Iby/f6knc8Llp2MPydntv2sbevQFn926+/F0Sda8m1Q=; b=lU7s/0/QSNIk8bB+Wp9BHKeAPQHKhXRoG8C+HOK7uYcjEk3gPw/wixVRiWl08TmzafB9yy VhHN2Kjx5ZIqGHCw== From: "tip-bot2 for Josh Don" 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: Make cfs_rq->throttled_csd_list available on !SMP Cc: Josh Don , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230922230535.296350-1-joshdon@google.com> References: <20230922230535.296350-1-joshdon@google.com> MIME-Version: 1.0 Message-ID: <169555196901.27769.4146483684793646610.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 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]); Sun, 24 Sep 2023 03:40:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777953933315652289 X-GMAIL-MSGID: 1777953933315652289 The following commit has been merged into the sched/core branch of tip: Commit-ID: 30797bce8ef0c73f0c388148ffac92458533b10e Gitweb: https://git.kernel.org/tip/30797bce8ef0c73f0c388148ffac92458533b10e Author: Josh Don AuthorDate: Fri, 22 Sep 2023 16:05:34 -07:00 Committer: Ingo Molnar CommitterDate: Sun, 24 Sep 2023 12:08:28 +02:00 sched/fair: Make cfs_rq->throttled_csd_list available on !SMP This makes the following patch cleaner by avoiding extra CONFIG_SMP conditionals on the availability of rq->throttled_csd_list. Signed-off-by: Josh Don Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230922230535.296350-1-joshdon@google.com --- kernel/sched/fair.c | 4 ---- kernel/sched/sched.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7572000..41c960e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5763,11 +5763,9 @@ static bool distribute_cfs_runtime(struct cfs_bandwidth *cfs_b) if (!cfs_rq_throttled(cfs_rq)) goto next; -#ifdef CONFIG_SMP /* Already queued for async unthrottle */ if (!list_empty(&cfs_rq->throttled_csd_list)) goto next; -#endif /* By the above checks, this should never be true */ SCHED_WARN_ON(cfs_rq->runtime_remaining > 0); @@ -6134,9 +6132,7 @@ static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) { cfs_rq->runtime_enabled = 0; INIT_LIST_HEAD(&cfs_rq->throttled_list); -#ifdef CONFIG_SMP INIT_LIST_HEAD(&cfs_rq->throttled_csd_list); -#endif } void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9260120..96f8ab7 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -634,9 +634,7 @@ struct cfs_rq { int throttled; int throttle_count; struct list_head throttled_list; -#ifdef CONFIG_SMP struct list_head throttled_csd_list; -#endif #endif /* CONFIG_CFS_BANDWIDTH */ #endif /* CONFIG_FAIR_GROUP_SCHED */ };