From patchwork Wed May 31 12:04:48 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: 101394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2826893vqr; Wed, 31 May 2023 05:07:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jk8p2tFy3YIRMOYhQyhOAW3vetkp7MXemn3WouAcWNej1E5CfCHWtb0H9orY/FWmyg65b X-Received: by 2002:a05:6a20:9146:b0:10d:8f40:6454 with SMTP id x6-20020a056a20914600b0010d8f406454mr6525727pzc.36.1685534870461; Wed, 31 May 2023 05:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685534870; cv=none; d=google.com; s=arc-20160816; b=f5WTlZv6Q71l9jDOeWmmUpgXFQFC3Nd7vnQtrFgHU1a/WcrlrxURPsjELKEAmPBSbA lNjhf+QwaUiQDzwYeWvH/sdoXtCpC3+1urUIJgUunfYBDqJPw7EuxCPeymCKDLsiltwA jP5v4MN017H3uodeAUEDZs58BtoEP1pyyhladlRK1iw2KgRRZ1FWaRjh97BpvJfbgnWz NYKl1wtn4lQXdAjMio3YjrUXacSNXTWk8Ett8y/W+ghtmrMfiTGclW3Udv9mB7C9VL5v YLsx3u1Pn8oLlSj1u9amaiWb088kEwIiqa+lFLP1F0xqcmPtfqn265t+HmgcExORAFS+ YCVQ== 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=EnXceI711UzJSpm9Tc/LUW38R3dqqmQbiyu3XHe+824=; b=AzA4haEq450Hlk9U7sYscUmyFCvABzcfqDyDmCoOjVxXy4Z0cHOOqVTRLSaDYivgfS P2rz09j8HSpp0kCDdV7+WXmvPhbrbFyYzfVQ4e7LS13cwtPwHCpmtNnHkwrWZyJ6AO4E FtWoXs/gxf6lWnUXvGUY6l06bTSc5DR1UAfuHkSszDgV1351PGae1+swyc9ZmgugB5Tb oPqUDDOwyJ2JOmaUDB31LpWhmPpnDVButhA3FiLlxRY2rvXPf2CiYudC9AfXpyvaBNcD Os901df7Umj9KXspQmhhYFxoIw5Y2PniVIqUXdtnyeQ1v6HQiI8OfmXGzz3mecQ81Rge +NBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UZHQhSJb; dkim=neutral (no key) header.i=@linutronix.de header.b=nmQRFUKe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 14-20020a63010e000000b00534784002c0si867699pgb.424.2023.05.31.05.07.36; Wed, 31 May 2023 05:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UZHQhSJb; dkim=neutral (no key) header.i=@linutronix.de header.b=nmQRFUKe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235102AbjEaMFA (ORCPT + 99 others); Wed, 31 May 2023 08:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235574AbjEaMEv (ORCPT ); Wed, 31 May 2023 08:04:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C0EE5; Wed, 31 May 2023 05:04:50 -0700 (PDT) Date: Wed, 31 May 2023 12:04:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685534689; 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=EnXceI711UzJSpm9Tc/LUW38R3dqqmQbiyu3XHe+824=; b=UZHQhSJbYkB7uyPgdESiTQ4qHJrR7+m/n67D4HEMYCVOFxZZe3aNOPK4m6aHr/q9SkL0Vt rlPLjST1ZGR4sorLSsC2OGPx+6LDIrBBQ6HJVee0GG/eWgAgIw2UvU4zl1lAeXBsWYKPJG sx2KshNrSxJ2NlynKPr4HgECCXi6f5N14Z4cLaGglUV9DzpRVpKiCBFZUDZ2lH1BZSjfRY g4uMTaz25XBw9je7gileZ6N6Ag3wbDepqEl5rKKGyOR3EVP50j2DdhZ1xjqi/q7eMz1O6z f0O9xToRXeGfNGVj/2MR7/jrFKMuj1jXDGWSza8bAO/68jW+qmmV0sxGHigE/w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685534689; 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=EnXceI711UzJSpm9Tc/LUW38R3dqqmQbiyu3XHe+824=; b=nmQRFUKe+/Ed7WwHBQQ6GgyOxr87CkfCWXEG0OaGFOr1cQkLAeunAlFkD+420y5jNW9QSS SpLRIByHu7qLmwBA== From: "tip-bot2 for Arnd Bergmann" 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: Move unused stub functions to header Cc: Arnd Bergmann , "Peter Zijlstra (Intel)" , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230522195021.3456768-6-arnd@kernel.org> References: <20230522195021.3456768-6-arnd@kernel.org> MIME-Version: 1.0 Message-ID: <168553468874.404.6309078676435197068.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767411412333477311?= X-GMAIL-MSGID: =?utf-8?q?1767411412333477311?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 7aa55f2a5902646a19db89dab9961867724b27b8 Gitweb: https://git.kernel.org/tip/7aa55f2a5902646a19db89dab9961867724b27b8 Author: Arnd Bergmann AuthorDate: Mon, 22 May 2023 21:50:21 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 30 May 2023 22:46:26 +02:00 sched/fair: Move unused stub functions to header These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1 warning: kernel/sched/fair.c:12544:6: error: no previous prototype for 'free_fair_sched_group' kernel/sched/fair.c:12546:5: error: no previous prototype for 'alloc_fair_sched_group' kernel/sched/fair.c:12553:6: error: no previous prototype for 'online_fair_sched_group' kernel/sched/fair.c:12555:6: error: no previous prototype for 'unregister_fair_sched_group' Move the alternatives into the header as static inline functions with the correct combination of #ifdef checks to avoid the warning without adding even more complexity. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20230522195021.3456768-6-arnd@kernel.org --- kernel/sched/fair.c | 6 +++--- kernel/sched/sched.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a7a8ccd..48b6f0c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) /************************************************************** * Scheduling class statistics methods: */ -#ifdef CONFIG_SMP + int sched_update_scaling(void) { unsigned int factor = get_update_sysctl_factor(); @@ -702,7 +702,6 @@ int sched_update_scaling(void) return 0; } #endif -#endif /* * delta /= w @@ -6169,8 +6168,9 @@ static inline int throttled_lb_pair(struct task_group *tg, return 0; } -#ifdef CONFIG_FAIR_GROUP_SCHED void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} + +#ifdef CONFIG_FAIR_GROUP_SCHED static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {} #endif diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index ce07782..6784462 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1245,7 +1245,6 @@ static inline raw_spinlock_t *__rq_lockp(struct rq *rq) bool cfs_prio_less(const struct task_struct *a, const struct task_struct *b, bool fi); -void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi); /* * Helpers to check if the CPU's core cookie matches with the task's cookie @@ -2377,7 +2376,6 @@ static inline struct cpuidle_state *idle_get_state(struct rq *rq) #endif extern void schedule_idle(void); -asmlinkage void schedule_user(void); extern void sysrq_sched_debug_show(void); extern void sched_init_granularity(void);