mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
sched_domain: enable BALANCE_WAKE and disable WAKE_AFFINE [1/1]
PD#SWPL-147985 Problem: need modify sched_domain flags for GKI20 Solution: modify Verify: sc2 Change-Id: I72d8e5abbdea501a001490402c8cd725c629b73a Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
4a22c40987
commit
db7f298200
@@ -23,6 +23,7 @@
|
||||
#include <linux/time.h>
|
||||
#include <linux/delay.h>
|
||||
#include <sched.h>
|
||||
#include <linux/sched/topology.h>
|
||||
|
||||
#include <trace/hooks/sched.h>
|
||||
#include <trace/hooks/dtask.h>
|
||||
@@ -591,6 +592,9 @@ static void tick_entry_hook(void *data, struct rq *rq)
|
||||
|
||||
int aml_sched_init(void)
|
||||
{
|
||||
int cpu, old_flags;
|
||||
struct sched_domain *sd;
|
||||
|
||||
#if defined(CONFIG_ANDROID_VENDOR_HOOKS) && defined(CONFIG_FAIR_GROUP_SCHED)
|
||||
register_trace_android_rvh_select_task_rq_rt(aml_select_rt_nice, NULL);
|
||||
register_trace_android_rvh_check_preempt_wakeup(aml_check_preempt_wakeup, NULL);
|
||||
@@ -606,5 +610,14 @@ int aml_sched_init(void)
|
||||
register_trace_android_vh_sched_show_task(sched_show_task_hook, NULL);
|
||||
#endif
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
for_each_domain(cpu, sd) {
|
||||
old_flags = sd->flags;
|
||||
sd->flags &= ~SD_WAKE_AFFINE;
|
||||
sd->flags |= (SD_BALANCE_WAKE | SD_BALANCE_NEWIDLE);
|
||||
pr_info("cpu:%d sd:%px flags:%x->%x\n", cpu, sd, old_flags, sd->flags);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user