Skip to content

Commit e212743

Browse files
arighihtejun
authored andcommitted
sched_ext: Make scx_rq_bypassing() inline
scx_rq_bypassing() is used both from ext.c and ext_idle.c, move it to ext.h as a static inline function. No functional changes. Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 353656e commit e212743

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

kernel/sched/ext.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,11 +1701,6 @@ static bool scx_tryset_enable_state(enum scx_enable_state to,
17011701
return atomic_try_cmpxchg(&scx_enable_state_var, &from_v, to);
17021702
}
17031703

1704-
static bool scx_rq_bypassing(struct rq *rq)
1705-
{
1706-
return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
1707-
}
1708-
17091704
/**
17101705
* wait_ops_state - Busy-wait the specified ops state to end
17111706
* @p: target task

kernel/sched/ext.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ static inline bool scx_kf_allowed_if_unlocked(void)
1313
return !current->scx.kf_mask;
1414
}
1515

16+
static inline bool scx_rq_bypassing(struct rq *rq)
17+
{
18+
return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
19+
}
20+
1621
DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
1722

1823
void scx_tick(struct rq *rq);

0 commit comments

Comments
 (0)