From nobody Sun Feb 8 17:54:45 2026 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5882A6BFC7 for ; Mon, 23 Sep 2024 13:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727099935; cv=none; b=Grdh4/i7fIuyN8MP3KOzxFHRnRyBkvlS3T7KHJJebKhmT5Zxjp+4UrWHI3Mj0HsQuvWXndo8Y15kphrX3+L+UcXy6usvCK8MvmnBqL2yQL4ePRGqOZCpIqAGUxLow8rcfoJHmC0TyDMHF1SzS37j41DKQlQeHEFLL1tN1zvEy8w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727099935; c=relaxed/simple; bh=UxcPhZ/sZJK4RpiHqBEgmsR27OL99HtSS6uQBOaa8q8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=glCwYzzAoMXly736KXZARwCI0irjHbIOkfTTYt12vGszBtdUcQV8AhG0WgxHEP1/efJ2w0uqOyCsr9QeId1+vuLlJBkybHGpE9diSogIa0Y0AVD0HCJHZGKkSj+O737rwVFg3T5p/xh/q8U5MDfBnt9i8HtbHeQQDaE3t6C+uBk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4XC4Kq4S89zpW04; Mon, 23 Sep 2024 21:56:47 +0800 (CST) Received: from dggpeml500003.china.huawei.com (unknown [7.185.36.200]) by mail.maildlp.com (Postfix) with ESMTPS id 9EC71180113; Mon, 23 Sep 2024 21:58:50 +0800 (CST) Received: from huawei.com (10.44.142.84) by dggpeml500003.china.huawei.com (7.185.36.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 23 Sep 2024 21:58:50 +0800 From: Yu Liao To: CC: , , , , , , Subject: [RFC PATCH 1/2] sched: Add dummy version of sched_group_set_idle() Date: Mon, 23 Sep 2024 21:54:30 +0800 Message-ID: <20240923135431.2440320-2-liaoyu15@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240923135431.2440320-1-liaoyu15@huawei.com> References: <20240923135431.2440320-1-liaoyu15@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500003.china.huawei.com (7.185.36.200) Content-Type: text/plain; charset="utf-8" Fix the following error when build with CONFIG_GROUP_SCHED_WEIGHT && !CONFIG_FAIR_GROUP_SCHED: kernel/sched/core.c:9634:15: error: implicit declaration of function 'sched_group_set_idle'; did you mean 'scx_group_set_idle'? [-Wimplicit-func= tion-declaration] 9634 | ret =3D sched_group_set_idle(css_tg(css), idle); | ^~~~~~~~~~~~~~~~~~~~ | scx_group_set_idle Fixes: e179e80c5d4f ("sched: Introduce CONFIG_GROUP_SCHED_WEIGHT") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409220859.UiCAoFOW-lkp@int= el.com/ Signed-off-by: Yu Liao --- kernel/sched/sched.h | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8063db62b027..91d14061fdca 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -582,6 +582,7 @@ static inline void set_task_rq_fair(struct sched_entity= *se, #endif /* CONFIG_SMP */ #else /* !CONFIG_FAIR_GROUP_SCHED */ static inline int sched_group_set_shares(struct task_group *tg, unsigned l= ong shares) { return 0; } +static inline int sched_group_set_idle(struct task_group *tg, long idle) {= return 0; } #endif /* CONFIG_FAIR_GROUP_SCHED */ =20 #else /* CONFIG_CGROUP_SCHED */ --=20 2.33.0 From nobody Sun Feb 8 17:54:45 2026 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 621B919CC0D for ; Mon, 23 Sep 2024 13:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727099935; cv=none; b=ncEZxCg9KmCNq+NnrPKEdovaGKmf+Ui1zcq0yQcOHtUGwgFnrUCP6HBdfABonbnRyD7k3+8jcS8d6mJxNj2f2PseaDTR/4o6HEocJ/QvpIqF6GxXKVgwOUjS+Lde21HCVZ/N0E4OA29angh+yj0oVeOvhMfL31vDsJuaSkdK2NI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727099935; c=relaxed/simple; bh=VVagp1WX76fAq+9V5Vo7EJKS+OM20nfVvs0nUzAZmDw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fmi6hmrnavk5pES+DslSHQ5a8XLFyhwPS1xbMiMLD9+KA0dXE/j0sVsw5xvXFIg1hq8t0+QQIkXUbRqzW1x2cvk3lUjPsRCNZ1xWST4emK0VoSqMOLe7Nx4mOTbzfKm2VlUSrbD4wTpDe5gFhtq2QBgxwllV8nPxbP0NO4GvQKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XC4Hp2P0Jz1HK3S; Mon, 23 Sep 2024 21:55:02 +0800 (CST) Received: from dggpeml500003.china.huawei.com (unknown [7.185.36.200]) by mail.maildlp.com (Postfix) with ESMTPS id C2C8E180041; Mon, 23 Sep 2024 21:58:50 +0800 (CST) Received: from huawei.com (10.44.142.84) by dggpeml500003.china.huawei.com (7.185.36.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 23 Sep 2024 21:58:50 +0800 From: Yu Liao To: CC: , , , , , , Subject: [RFC PATCH 2/2] sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT Date: Mon, 23 Sep 2024 21:54:31 +0800 Message-ID: <20240923135431.2440320-3-liaoyu15@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240923135431.2440320-1-liaoyu15@huawei.com> References: <20240923135431.2440320-1-liaoyu15@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500003.china.huawei.com (7.185.36.200) Content-Type: text/plain; charset="utf-8" When build with CONFIG_GROUP_SCHED_WEIGHT && !CONFIG_FAIR_GROUP_SCHED, the idle member is not defined: kernel/sched/ext.c:3701:16: error: 'struct task_group' has no member named = 'idle' 3701 | if (!tg->idle) | ^~ Fix this by putting 'idle' under new CONFIG_GROUP_SCHED_WEIGHT, this doesn't modify the layout of struct task_group. Fixes: e179e80c5d4f ("sched: Introduce CONFIG_GROUP_SCHED_WEIGHT") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409220859.UiCAoFOW-lkp@int= el.com/ Signed-off-by: Yu Liao --- kernel/sched/sched.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 91d14061fdca..fb871677ba22 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -438,11 +438,14 @@ struct task_group { /* runqueue "owned" by this group on each CPU */ struct cfs_rq **cfs_rq; unsigned long shares; +#endif =20 +#ifdef CONFIG_GROUP_SCHED_WEIGHT /* A positive value indicates that this is a SCHED_IDLE group. */ int idle; +#endif =20 -#ifdef CONFIG_SMP +#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP) /* * load_avg can be heavily contended at clock tick time, so put * it in its own cache-line separated from the fields above which @@ -450,7 +453,6 @@ struct task_group { */ atomic_long_t load_avg ____cacheline_aligned; #endif -#endif =20 #ifdef CONFIG_RT_GROUP_SCHED struct sched_rt_entity **rt_se; --=20 2.33.0