Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe9673a6 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Gerrit - the friendly Code Review server
Browse files

core_ctl: Consider high irq loaded CPU as busy



Currently a CPU is considered as busy if it's utilization in
the last window exceeds busy threshold. A CPU loaded with
hardirqs/softirqs does not necessarily have high utilization.
Isolating such CPUs may hurt performance as it involves waking
up the CPU frequently from deep c-state. Prevent isolating
high irq loaded CPUs by considering them as busy.

Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
[markivx: Fix trace event merge conflicts]
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>

Change-Id: If738f90e5a36cade4046890d0d81482794e7ddea
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 1e393ec6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -876,16 +876,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_ieqload=%d",
		  __entry->cpu, __entry->busy, __entry->old_is_busy,
		  __entry->is_busy)
		  __entry->is_busy, __entry->high_irqload)
);

TRACE_EVENT(core_ctl_set_boost,
+4 −1
Original line number Diff line number Diff line
@@ -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
@@ -557,7 +559,8 @@ static bool eval_need(struct cluster_data *cluster)
		list_for_each_entry(c, &cluster->lru, sib) {
			bool old_is_busy = c->is_busy;

			if (c->busy >= cluster->busy_up_thres[thres_idx])
			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;
+0 −1
Original line number Diff line number Diff line
@@ -2514,7 +2514,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) \