public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Yu Liao <liaoyu15@huawei.com>
Cc: xiexiuqi@huawei.com, peterz@infradead.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org
Subject: Re: [RFC PATCH 2/2] sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT
Date: Mon, 23 Sep 2024 05:28:00 -1000	[thread overview]
Message-ID: <ZvGJAD0eJJ67OO6R@slm.duckdns.org> (raw)
In-Reply-To: <20240923135431.2440320-3-liaoyu15@huawei.com>

Hello,

I applied the patch to sched_ext/for-6.12-fixes with some edits. There's no
strong reason to keep idle in that particular location and it's easier to
move it upward out of CONFIG_FAIR_GROUP_SCHED block.

Thanks.

------ 8< ------
From 7ebd84d627e40cb9fb12b338588e81b6cca371e3 Mon Sep 17 00:00:00 2001
From: Yu Liao <liaoyu15@huawei.com>
Date: Mon, 23 Sep 2024 21:54:31 +0800
Subject: [PATCH] sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT

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.

tj: Move idle field upward to avoid breaking up CONFIG_FAIR_GROUP_SCHED block.

Fixes: e179e80c5d4f ("sched: Introduce CONFIG_GROUP_SCHED_WEIGHT")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409220859.UiCAoFOW-lkp@intel.com/
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 kernel/sched/sched.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 91d14061fdca..b1c3588a8f00 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -432,16 +432,17 @@ struct cfs_bandwidth {
 struct task_group {
 	struct cgroup_subsys_state css;
 
+#ifdef CONFIG_GROUP_SCHED_WEIGHT
+	/* A positive value indicates that this is a SCHED_IDLE group. */
+	int			idle;
+#endif
+
 #ifdef CONFIG_FAIR_GROUP_SCHED
 	/* schedulable entities of this group on each CPU */
 	struct sched_entity	**se;
 	/* runqueue "owned" by this group on each CPU */
 	struct cfs_rq		**cfs_rq;
 	unsigned long		shares;
-
-	/* A positive value indicates that this is a SCHED_IDLE group. */
-	int			idle;
-
 #ifdef	CONFIG_SMP
 	/*
 	 * load_avg can be heavily contended at clock tick time, so put
-- 
2.46.0


      reply	other threads:[~2024-09-23 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 13:54 [RFC PATCH 0/2] sched: Fix compilation error Yu Liao
2024-09-23 13:54 ` [RFC PATCH 1/2] sched: Add dummy version of sched_group_set_idle() Yu Liao
2024-09-23 15:25   ` Tejun Heo
2024-09-23 13:54 ` [RFC PATCH 2/2] sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT Yu Liao
2024-09-23 15:28   ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZvGJAD0eJJ67OO6R@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=liaoyu15@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xiexiuqi@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox