随笔分类 -  Linux 进程

摘要:dup_task_struct sched_fork copy_mm copy_thread_tls 阅读全文
posted @ 2024-12-25 00:40 _xingxing 阅读(50) 评论(0) 推荐(0)
摘要:为什么需要PELT? 之前CFS以每个运行队列为单位跟踪负载;存在几个问题: 一个运行队列存在很多个调度实体,所以无法存在当前的负载来源; 即使工作负载相对稳定的情况下,在rq级别跟踪负载,其值也会产生很大变化。(为什么?) 为了解决以上问题:提出了PETL算法,PELT算法跟踪每个调度实体; 如何 阅读全文
posted @ 2024-12-25 00:38 _xingxing 阅读(141) 评论(0) 推荐(0)
摘要:last保存的是什么? last = cpu_switch_to(prev, next) cpu_switch_to函数是一段汇编,根据arm64函数的调用规则来看,x0保存的是函数返回值,也就是prev进程; 比如A进程切换到B进程,那么last 就是进程 A; 为什么需要保存last? 有这么一 阅读全文
posted @ 2024-12-23 11:15 _xingxing 阅读(102) 评论(0) 推荐(0)
摘要:copy_process wake_up_new_task scheduler_tick __schedule 什么是调度类 struct sched_class, 目的是将调度器模块化; Linux 有哪些调度类 dl_sched_class: rt_sched_class: fair_sched 阅读全文
posted @ 2024-12-14 18:58 _xingxing 阅读(70) 评论(0) 推荐(0)