mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ANDROID: sched: add cpumask parameter to cpu capacity vendor hook
Different cpu type will have different suppression ratio. So we add cpumask parameter to cpu capacity vendor hook. Bug: 167126223 Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com> Change-Id: I983a3aca2195f7c37c43d31fa588c999a825ee49
This commit is contained in:
parent
1f16d824a8
commit
07f80e7c1e
|
|
@ -44,7 +44,7 @@ void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq,
|
||||||
|
|
||||||
scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq;
|
scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq;
|
||||||
|
|
||||||
trace_android_vh_arch_set_freq_scale(cur_freq, max_freq, &scale);
|
trace_android_vh_arch_set_freq_scale(cpus, cur_freq, max_freq, &scale);
|
||||||
|
|
||||||
for_each_cpu(i, cpus)
|
for_each_cpu(i, cpus)
|
||||||
per_cpu(freq_scale, i) = scale;
|
per_cpu(freq_scale, i) = scale;
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,18 @@
|
||||||
|
|
||||||
#include <linux/tracepoint.h>
|
#include <linux/tracepoint.h>
|
||||||
#include <trace/hooks/vendor_hooks.h>
|
#include <trace/hooks/vendor_hooks.h>
|
||||||
|
#include <linux/cpumask.h>
|
||||||
|
|
||||||
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
|
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
|
||||||
|
|
||||||
DECLARE_HOOK(android_vh_arch_set_freq_scale,
|
DECLARE_HOOK(android_vh_arch_set_freq_scale,
|
||||||
TP_PROTO(unsigned long freq, unsigned long max, unsigned long *scale),
|
TP_PROTO(struct cpumask *cpus, unsigned long freq, unsigned long max,
|
||||||
TP_ARGS(freq, max, scale));
|
unsigned long *scale),
|
||||||
|
TP_ARGS(cpus, freq, max, scale));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define trace_android_vh_arch_set_freq_scale(freq, max, scale)
|
#define trace_android_vh_arch_set_freq_scale(cpus, freq, max, scale)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user