[PATCH v7 3/3] sched/headers: Move sched_rt_entity::back to under the CONFIG_RT_GROUP_SCHED block

From: Yajun Deng
Date: Mon Oct 09 2023 - 08:23:34 EST


We already remove the call to the 'back' member when CONFIG_RT_GROUP_SCHED
is disabled.

It's safe to move sched_rt_entity::back to under the
CONFIG_RT_GROUP_SCHED block, it would save a few bytes.

Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
---
v7: Only move back under the CONFIG_RT_GROUP_SCHED block.
v6: Independent patch.
v5: Resend it.
v4: Missed rt_se = root in dequeue_rt_stack().
v3: Keep parent is NULL in init_tg_rt_entry().
v2: Add WARN_ON_ONCE in init_tg_rt_entry().
v1: https://lore.kernel.org/all/20230801062714.3424299-1-yajun.deng@xxxxxxxxx/
---
include/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 292c31697248..d0fe56603e60 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -597,8 +597,8 @@ struct sched_rt_entity {
unsigned short on_rq;
unsigned short on_list;

- struct sched_rt_entity *back;
#ifdef CONFIG_RT_GROUP_SCHED
+ struct sched_rt_entity *back;
struct sched_rt_entity *parent;
/* rq on which this entity is (to be) queued: */
struct rt_rq *rt_rq;
--
2.25.1