linux510/514-tkg: Port prjc v5.15.r1 fixes over, also for upds
Fixes https://github.com/Frogging-Family/linux-tkg/issues/361
This commit is contained in:
@@ -9510,3 +9510,60 @@ index adf7ef194005..11c8f36e281b 100644
|
||||
};
|
||||
struct wakeup_test_data *x = data;
|
||||
|
||||
diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c
|
||||
index 9576c57f82da0a1f831b02474db8cd64b945f294..b8d5b1db9fac55ce5ee74033c253832cc36999b6 100644
|
||||
--- a/kernel/sched/alt_core.c
|
||||
+++ b/kernel/sched/alt_core.c
|
||||
@@ -2912,9 +2912,6 @@ static inline void __sched_fork(unsigned long clone_flags, struct task_struct *p
|
||||
*/
|
||||
int sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
{
|
||||
- unsigned long flags;
|
||||
- struct rq *rq;
|
||||
-
|
||||
__sched_fork(clone_flags, p);
|
||||
/*
|
||||
* We mark the process as NEW here. This guarantees that
|
||||
@@ -2948,6 +2945,20 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
p->sched_reset_on_fork = 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_SCHED_INFO
|
||||
+ if (unlikely(sched_info_on()))
|
||||
+ memset(&p->sched_info, 0, sizeof(p->sched_info));
|
||||
+#endif
|
||||
+ init_task_preempt_count(p);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void sched_post_fork(struct task_struct *p, struct kernel_clone_args *kargs)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+ struct rq *rq;
|
||||
+
|
||||
/*
|
||||
* The child is not yet in the pid-hash so no cgroup attach races,
|
||||
* and the cgroup is pinned to this child due to cgroup_fork()
|
||||
@@ -2982,20 +2993,10 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
* We're setting the CPU for the first time, we don't migrate,
|
||||
* so use __set_task_cpu().
|
||||
*/
|
||||
- __set_task_cpu(p, cpu_of(rq));
|
||||
+ __set_task_cpu(p, smp_processor_id());
|
||||
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
|
||||
-
|
||||
-#ifdef CONFIG_SCHED_INFO
|
||||
- if (unlikely(sched_info_on()))
|
||||
- memset(&p->sched_info, 0, sizeof(p->sched_info));
|
||||
-#endif
|
||||
- init_task_preempt_count(p);
|
||||
-
|
||||
- return 0;
|
||||
}
|
||||
|
||||
-void sched_post_fork(struct task_struct *p) {}
|
||||
-
|
||||
#ifdef CONFIG_SCHEDSTATS
|
||||
|
||||
DEFINE_STATIC_KEY_FALSE(sched_schedstats);
|
||||
|
Reference in New Issue
Block a user