mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
sched_ext: Rename scx_local_or_reject_dsq() to scx_resolve_local_dsq()
The following rescue execution addition gives the function a third possible destination, making a name that enumerates the outcomes a poor fit. Rename to the destination-neutral scx_resolve_local_dsq(). No functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
This commit is contained in:
parent
12da4723b6
commit
8b3b8522c9
|
|
@ -1507,7 +1507,7 @@ static void scx_dispatch_enqueue(struct scx_sched *sch, struct rq *rq,
|
|||
bool is_rq_owned = false;
|
||||
|
||||
if (dsq->id == SCX_DSQ_LOCAL) {
|
||||
dsq = scx_local_or_reject_dsq(sch, rq, p, &enq_flags);
|
||||
dsq = scx_resolve_local_dsq(sch, rq, p, &enq_flags);
|
||||
is_rq_owned = true;
|
||||
}
|
||||
|
||||
|
|
@ -2279,7 +2279,7 @@ static void move_local_task_to_local_dsq(struct scx_sched *sch,
|
|||
struct scx_dispatch_q *src_dsq,
|
||||
struct rq *dst_rq)
|
||||
{
|
||||
struct scx_dispatch_q *dst_dsq = scx_local_or_reject_dsq(sch, dst_rq, p, &enq_flags);
|
||||
struct scx_dispatch_q *dst_dsq = scx_resolve_local_dsq(sch, dst_rq, p, &enq_flags);
|
||||
|
||||
/* @dsq is locked and @p is on @dst_rq */
|
||||
lockdep_assert_held(&src_dsq->lock);
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void scx_init_root_caps(struct scx_sched *sch)
|
|||
}
|
||||
|
||||
/**
|
||||
* scx_local_or_reject_dsq - Pick the local or reject DSQ for an insert
|
||||
* scx_resolve_local_dsq - Pick the local or reject DSQ for an insert
|
||||
* @sch: enqueuing sub-sched
|
||||
* @rq: rq whose local DSQ @p targets
|
||||
* @p: task being inserted
|
||||
|
|
@ -246,8 +246,8 @@ void scx_init_root_caps(struct scx_sched *sch)
|
|||
* to and run by its nearest non-bypassing ancestor. If root is bypassing, it
|
||||
* always holds all caps.
|
||||
*/
|
||||
struct scx_dispatch_q *scx_local_or_reject_dsq(struct scx_sched *sch, struct rq *rq,
|
||||
struct task_struct *p, u64 *enq_flags)
|
||||
struct scx_dispatch_q *scx_resolve_local_dsq(struct scx_sched *sch, struct rq *rq,
|
||||
struct task_struct *p, u64 *enq_flags)
|
||||
{
|
||||
if (!scx_has_subs())
|
||||
return &rq->scx.local_dsq;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ void scx_online_ecaps(struct rq *rq);
|
|||
void scx_offline_ecaps(struct rq *rq);
|
||||
void scx_discard_ecaps_to_sync(s32 cpu, struct scx_sched_pcpu *pcpu);
|
||||
void scx_discard_stale_ecaps_syncs(void);
|
||||
struct scx_dispatch_q *scx_local_or_reject_dsq(struct scx_sched *sch, struct rq *rq,
|
||||
struct task_struct *p, u64 *enq_flags);
|
||||
struct scx_dispatch_q *scx_resolve_local_dsq(struct scx_sched *sch, struct rq *rq,
|
||||
struct task_struct *p, u64 *enq_flags);
|
||||
bool scx_task_reenq_on_cap_revoke(struct rq *rq, struct task_struct *p);
|
||||
void scx_reenq_reject(struct rq *rq);
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ static inline void scx_online_ecaps(struct rq *rq) {}
|
|||
static inline void scx_offline_ecaps(struct rq *rq) {}
|
||||
static inline void scx_discard_ecaps_to_sync(s32 cpu, struct scx_sched_pcpu *pcpu) {}
|
||||
static inline void scx_discard_stale_ecaps_syncs(void) {}
|
||||
static inline struct scx_dispatch_q *scx_local_or_reject_dsq(struct scx_sched *sch, struct rq *rq, struct task_struct *p, u64 *enq_flags) { return &rq->scx.local_dsq; }
|
||||
static inline struct scx_dispatch_q *scx_resolve_local_dsq(struct scx_sched *sch, struct rq *rq, struct task_struct *p, u64 *enq_flags) { return &rq->scx.local_dsq; }
|
||||
static inline bool scx_task_reenq_on_cap_revoke(struct rq *rq, struct task_struct *p) { return false; }
|
||||
static inline void scx_reenq_reject(struct rq *rq) {}
|
||||
static inline void scx_dec_has_subs(struct scx_sched *sch) {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user