From: Tejun Heo Date: Sun, 9 Feb 2025 06:34:43 +0000 (-1000) Subject: Merge branch 'for-6.14-fixes' into for-6.15 X-Git-Tag: io_uring-6.15-20250403~149^2~30 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=29ef4a2fcf48a458af2ede543f5755fa95b175a5;p=linux-block.git Merge branch 'for-6.14-fixes' into for-6.15 Pull to receive: - 2fa0fbeb69ed ("sched_ext: Implement auto local dispatching of migration disabled tasks") - 32966821574c ("sched_ext: Fix migration disabled handling in targeted dispatches") as planned for-6.15 changes depend on them (e.g. adding event counter for implicit migration disabled task handling). --- 29ef4a2fcf48a458af2ede543f5755fa95b175a5 diff --cc kernel/sched/ext.c index 5ef90d9bcdd2,e01144340d67..5dfcba6adcda --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@@ -885,7 -896,14 +899,8 @@@ static bool scx_warned_zero_slice static DEFINE_STATIC_KEY_FALSE(scx_ops_enq_last); static DEFINE_STATIC_KEY_FALSE(scx_ops_enq_exiting); + static DEFINE_STATIC_KEY_FALSE(scx_ops_enq_migration_disabled); static DEFINE_STATIC_KEY_FALSE(scx_ops_cpu_preempt); -static DEFINE_STATIC_KEY_FALSE(scx_builtin_idle_enabled); - -#ifdef CONFIG_SMP -static DEFINE_STATIC_KEY_FALSE(scx_selcpu_topo_llc); -static DEFINE_STATIC_KEY_FALSE(scx_selcpu_topo_numa); -#endif static struct static_key_false scx_has_op[SCX_OPI_END] = { [0 ... SCX_OPI_END-1] = STATIC_KEY_FALSE_INIT }; @@@ -2097,11 -2026,14 +2112,16 @@@ static void do_enqueue_task(struct rq * /* see %SCX_OPS_ENQ_EXITING */ if (!static_branch_unlikely(&scx_ops_enq_exiting) && - unlikely(p->flags & PF_EXITING)) + unlikely(p->flags & PF_EXITING)) { + __scx_add_event(SCX_EV_ENQ_SKIP_EXITING, 1); goto local; + } + /* see %SCX_OPS_ENQ_MIGRATION_DISABLED */ + if (!static_branch_unlikely(&scx_ops_enq_migration_disabled) && + is_migration_disabled(p)) + goto local; + if (!SCX_HAS_OP(enqueue)) goto global; @@@ -2685,10 -2619,10 +2713,11 @@@ static void dispatch_to_local_dsq(struc } #ifdef CONFIG_SMP - if (unlikely(!task_can_run_on_remote_rq(p, dst_rq, true))) { + if (src_rq != dst_rq && + unlikely(!task_can_run_on_remote_rq(p, dst_rq, true))) { dispatch_enqueue(find_global_dsq(p), p, enq_flags | SCX_ENQ_CLEAR_OPSS); + __scx_add_event(SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, 1); return; }