Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Borislav Petkov:

- Use the correct static key checking primitive on the IRQ exit path

- Two fixes for the new forceidle balancer

* tag 'sched_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
entry: Fix compile error in dynamic_irqentry_exit_cond_resched()
sched: Teach the forced-newidle balancer about CPU affinity limitation.
sched/core: Fix forceidle balancing

+12 -13
+1 -1
kernel/entry/common.c
··· 392 392 DEFINE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); 393 393 void dynamic_irqentry_exit_cond_resched(void) 394 394 { 395 - if (!static_key_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) 395 + if (!static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) 396 396 return; 397 397 raw_irqentry_exit_cond_resched(); 398 398 }
+11 -5
kernel/sched/core.c
··· 5752 5752 5753 5753 extern void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi); 5754 5754 5755 + static void queue_core_balance(struct rq *rq); 5756 + 5755 5757 static struct task_struct * 5756 5758 pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) 5757 5759 { ··· 5803 5801 } 5804 5802 5805 5803 rq->core_pick = NULL; 5806 - return next; 5804 + goto out; 5807 5805 } 5808 5806 5809 5807 put_prev_task_balance(rq, prev, rf); ··· 5853 5851 */ 5854 5852 WARN_ON_ONCE(fi_before); 5855 5853 task_vruntime_update(rq, next, false); 5856 - goto done; 5854 + goto out_set_next; 5857 5855 } 5858 5856 } 5859 5857 ··· 5972 5970 resched_curr(rq_i); 5973 5971 } 5974 5972 5975 - done: 5973 + out_set_next: 5976 5974 set_next_task(rq, next); 5975 + out: 5976 + if (rq->core->core_forceidle_count && next == rq->idle) 5977 + queue_core_balance(rq); 5978 + 5977 5979 return next; 5978 5980 } 5979 5981 ··· 6006 6000 if (p == src->core_pick || p == src->curr) 6007 6001 goto next; 6008 6002 6009 - if (!cpumask_test_cpu(this, &p->cpus_mask)) 6003 + if (!is_cpu_allowed(p, this)) 6010 6004 goto next; 6011 6005 6012 6006 if (p->core_occupation > dst->idle->core_occupation) ··· 6072 6066 6073 6067 static DEFINE_PER_CPU(struct callback_head, core_balance_head); 6074 6068 6075 - void queue_core_balance(struct rq *rq) 6069 + static void queue_core_balance(struct rq *rq) 6076 6070 { 6077 6071 if (!sched_core_enabled(rq)) 6078 6072 return;
-1
kernel/sched/idle.c
··· 434 434 { 435 435 update_idle_core(rq); 436 436 schedstat_inc(rq->sched_goidle); 437 - queue_core_balance(rq); 438 437 } 439 438 440 439 #ifdef CONFIG_SMP
-6
kernel/sched/sched.h
··· 1232 1232 return false; 1233 1233 } 1234 1234 1235 - extern void queue_core_balance(struct rq *rq); 1236 - 1237 1235 static inline bool sched_core_enqueued(struct task_struct *p) 1238 1236 { 1239 1237 return !RB_EMPTY_NODE(&p->core_node); ··· 1263 1265 static inline raw_spinlock_t *__rq_lockp(struct rq *rq) 1264 1266 { 1265 1267 return &rq->__lock; 1266 - } 1267 - 1268 - static inline void queue_core_balance(struct rq *rq) 1269 - { 1270 1268 } 1271 1269 1272 1270 static inline bool sched_cpu_cookie_match(struct rq *rq, struct task_struct *p)