mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
sched_ext: Add @kargs to scx_fork()
Make sched_cgroup_fork() pass @kargs to scx_fork(). This will be used to determine @p's cgroup for cgroup sub-sched support. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com> Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
parent
b0e4c2f8a0
commit
e3715e3977
|
|
@ -4721,7 +4721,7 @@ int sched_cgroup_fork(struct task_struct *p, struct kernel_clone_args *kargs)
|
|||
p->sched_class->task_fork(p);
|
||||
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
|
||||
|
||||
return scx_fork(p);
|
||||
return scx_fork(p, kargs);
|
||||
}
|
||||
|
||||
void sched_cancel_fork(struct task_struct *p)
|
||||
|
|
|
|||
|
|
@ -3171,7 +3171,7 @@ void scx_pre_fork(struct task_struct *p)
|
|||
percpu_down_read(&scx_fork_rwsem);
|
||||
}
|
||||
|
||||
int scx_fork(struct task_struct *p)
|
||||
int scx_fork(struct task_struct *p, struct kernel_clone_args *kargs)
|
||||
{
|
||||
percpu_rwsem_assert_held(&scx_fork_rwsem);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
void scx_tick(struct rq *rq);
|
||||
void init_scx_entity(struct sched_ext_entity *scx);
|
||||
void scx_pre_fork(struct task_struct *p);
|
||||
int scx_fork(struct task_struct *p);
|
||||
int scx_fork(struct task_struct *p, struct kernel_clone_args *kargs);
|
||||
void scx_post_fork(struct task_struct *p);
|
||||
void scx_cancel_fork(struct task_struct *p);
|
||||
bool scx_can_stop_tick(struct rq *rq);
|
||||
|
|
@ -44,7 +44,7 @@ bool scx_prio_less(const struct task_struct *a, const struct task_struct *b,
|
|||
|
||||
static inline void scx_tick(struct rq *rq) {}
|
||||
static inline void scx_pre_fork(struct task_struct *p) {}
|
||||
static inline int scx_fork(struct task_struct *p) { return 0; }
|
||||
static inline int scx_fork(struct task_struct *p, struct kernel_clone_args *kargs) { return 0; }
|
||||
static inline void scx_post_fork(struct task_struct *p) {}
|
||||
static inline void scx_cancel_fork(struct task_struct *p) {}
|
||||
static inline u32 scx_cpuperf_target(s32 cpu) { return 0; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user