Loading include/trace/events/sched.h +4 −2 Original line number Diff line number Diff line Loading @@ -1775,16 +1775,18 @@ TRACE_EVENT(core_ctl_set_busy, __field(u32, busy) __field(u32, old_is_busy) __field(u32, is_busy) __field(bool, high_irqload) ), TP_fast_assign( __entry->cpu = cpu; __entry->busy = busy; __entry->old_is_busy = old_is_busy; __entry->is_busy = is_busy; __entry->high_irqload = sched_cpu_high_irqload(cpu); ), TP_printk("cpu=%u, busy=%u, old_is_busy=%u, new_is_busy=%u", TP_printk("cpu=%u, busy=%u, old_is_busy=%u, new_is_busy=%u high_irqload=%d", __entry->cpu, __entry->busy, __entry->old_is_busy, __entry->is_busy) __entry->is_busy, __entry->high_irqload) ); TRACE_EVENT(core_ctl_set_boost, Loading kernel/sched/core_ctl.c +10 −15 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <linux/syscore_ops.h> #include <trace/events/sched.h> #include "sched.h" #include "walt.h" #define MAX_CPUS_PER_CLUSTER 6 #define MAX_CLUSTERS 2 Loading Loading @@ -555,10 +557,16 @@ static bool eval_need(struct cluster_data *cluster) cluster->active_cpus = get_active_cpu_count(cluster); thres_idx = cluster->active_cpus ? cluster->active_cpus - 1 : 0; list_for_each_entry(c, &cluster->lru, sib) { if (c->busy >= cluster->busy_up_thres[thres_idx]) bool old_is_busy = c->is_busy; if (c->busy >= cluster->busy_up_thres[thres_idx] || sched_cpu_high_irqload(c->cpu)) c->is_busy = true; else if (c->busy < cluster->busy_down_thres[thres_idx]) c->is_busy = false; trace_core_ctl_set_busy(c->cpu, c->busy, old_is_busy, c->is_busy); need_cpus += c->is_busy; } need_cpus = apply_task_need(cluster, need_cpus); Loading Loading @@ -599,17 +607,6 @@ static void apply_need(struct cluster_data *cluster) wake_up_core_ctl_thread(cluster); } static void core_ctl_set_busy(struct cpu_data *c, unsigned int busy) { unsigned int old_is_busy = c->is_busy; if (c->busy == busy) return; c->busy = busy; trace_core_ctl_set_busy(c->cpu, busy, old_is_busy, c->is_busy); } /* ========================= core count enforcement ==================== */ static void wake_up_core_ctl_thread(struct cluster_data *cluster) Loading Loading @@ -668,7 +665,6 @@ EXPORT_SYMBOL(core_ctl_set_boost); void core_ctl_check(u64 window_start) { int cpu; unsigned int busy; struct cpu_data *c; struct cluster_data *cluster; unsigned int index = 0; Loading @@ -689,8 +685,7 @@ void core_ctl_check(u64 window_start) if (!cluster || !cluster->inited) continue; busy = sched_get_cpu_util(cpu); core_ctl_set_busy(c, busy); c->busy = sched_get_cpu_util(cpu); } update_running_avg(); Loading kernel/sched/sched.h +0 −1 Original line number Diff line number Diff line Loading @@ -2349,7 +2349,6 @@ struct related_thread_group { }; extern struct list_head cluster_head; extern int num_clusters; extern struct sched_cluster *sched_cluster[NR_CPUS]; #define for_each_sched_cluster(cluster) \ Loading Loading
include/trace/events/sched.h +4 −2 Original line number Diff line number Diff line Loading @@ -1775,16 +1775,18 @@ TRACE_EVENT(core_ctl_set_busy, __field(u32, busy) __field(u32, old_is_busy) __field(u32, is_busy) __field(bool, high_irqload) ), TP_fast_assign( __entry->cpu = cpu; __entry->busy = busy; __entry->old_is_busy = old_is_busy; __entry->is_busy = is_busy; __entry->high_irqload = sched_cpu_high_irqload(cpu); ), TP_printk("cpu=%u, busy=%u, old_is_busy=%u, new_is_busy=%u", TP_printk("cpu=%u, busy=%u, old_is_busy=%u, new_is_busy=%u high_irqload=%d", __entry->cpu, __entry->busy, __entry->old_is_busy, __entry->is_busy) __entry->is_busy, __entry->high_irqload) ); TRACE_EVENT(core_ctl_set_boost, Loading
kernel/sched/core_ctl.c +10 −15 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include <linux/syscore_ops.h> #include <trace/events/sched.h> #include "sched.h" #include "walt.h" #define MAX_CPUS_PER_CLUSTER 6 #define MAX_CLUSTERS 2 Loading Loading @@ -555,10 +557,16 @@ static bool eval_need(struct cluster_data *cluster) cluster->active_cpus = get_active_cpu_count(cluster); thres_idx = cluster->active_cpus ? cluster->active_cpus - 1 : 0; list_for_each_entry(c, &cluster->lru, sib) { if (c->busy >= cluster->busy_up_thres[thres_idx]) bool old_is_busy = c->is_busy; if (c->busy >= cluster->busy_up_thres[thres_idx] || sched_cpu_high_irqload(c->cpu)) c->is_busy = true; else if (c->busy < cluster->busy_down_thres[thres_idx]) c->is_busy = false; trace_core_ctl_set_busy(c->cpu, c->busy, old_is_busy, c->is_busy); need_cpus += c->is_busy; } need_cpus = apply_task_need(cluster, need_cpus); Loading Loading @@ -599,17 +607,6 @@ static void apply_need(struct cluster_data *cluster) wake_up_core_ctl_thread(cluster); } static void core_ctl_set_busy(struct cpu_data *c, unsigned int busy) { unsigned int old_is_busy = c->is_busy; if (c->busy == busy) return; c->busy = busy; trace_core_ctl_set_busy(c->cpu, busy, old_is_busy, c->is_busy); } /* ========================= core count enforcement ==================== */ static void wake_up_core_ctl_thread(struct cluster_data *cluster) Loading Loading @@ -668,7 +665,6 @@ EXPORT_SYMBOL(core_ctl_set_boost); void core_ctl_check(u64 window_start) { int cpu; unsigned int busy; struct cpu_data *c; struct cluster_data *cluster; unsigned int index = 0; Loading @@ -689,8 +685,7 @@ void core_ctl_check(u64 window_start) if (!cluster || !cluster->inited) continue; busy = sched_get_cpu_util(cpu); core_ctl_set_busy(c, busy); c->busy = sched_get_cpu_util(cpu); } update_running_avg(); Loading
kernel/sched/sched.h +0 −1 Original line number Diff line number Diff line Loading @@ -2349,7 +2349,6 @@ struct related_thread_group { }; extern struct list_head cluster_head; extern int num_clusters; extern struct sched_cluster *sched_cluster[NR_CPUS]; #define for_each_sched_cluster(cluster) \ Loading