自研sched 导致任务均衡到小核

调度event

微信运行在cpu 

ActivityPause 调用完再唤醒微信,调度延迟

将trace 转换成文本内容后,从perfetto 显示的Start time 为该文本开始的偏移

 唤醒微信:

选核cpu 6

sched_task_util: pid=5772 comm=com.tencent.mm util=90 prev_cpu=3 candidates=0x40 best_energy_cpu=6 sync=1 need_idle=0 fastpath=4  placement_boost=1 latency=3854 stune_boosted=0 is_rtg=1 rtg_skip_min=0 start_cpu=4 unfilter=0 affinity=ff task_boost=0 low_latency=0 iowaited=0

sched_wakeup: comm=com.tencent.mm pid=5772 prio=110 target_cpu=006

调度延迟:

这个时候才轮到运行

1、微信ActivityResume 时,运行cpu6上,binder 调用到system_server 进入阻塞;待binder 返回,唤醒微信,之前在6核,现在选0核,是由于 fastpath=4 ;

 

DefaultDispatch 9255-9255    (   8083) [000] d..2 180384.400135: sched_switch: prev_comm=DefaultDispatch prev_pid=9255 prev_prio=120 prev_state=R+ ==> next_comm=com.tencent.mm next_pid=5772 next_prio=110

walt_find_energy_efficient_cpu 选核,调用walt_find_best_target  调用自研sched ,候选cpu不为空,设置 fbt_env.fastpath == NR_WAKEUP_SELECT;根据 fbt_env.fastpath == NR_WAKEUP_SELECT 设置最好能效cpu为候选第一个cpu,而候选cpu 刚好是 cpu 0。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值