- 论坛徽章:
- 8
|
本帖最后由 firocu 于 2015-06-22 12:35 编辑
我靠内核什么时候变得这么恶心了, 尽然直接删注释了.
好吧,可能是代码的涵义变了... 当时看得不深刻, 现在全忘了.
楼主,看下原始commit的- + /*
- + * ideal_runtime is compared against sum_exec_runtime, which is
- + * walltime, hence do not scale.
- + */
- + ideal_runtime = max(sysctl_sched_latency / cfs_rq->nr_running,
- + (unsigned long)sysctl_sched_min_granularity);
- +
- + /*
- + * If we executed more than what the latency constraint suggests,
- + * reduce the rescheduling granularity. This way the total latency
- + * of how much a task is not scheduled converges to
- + * sysctl_sched_latency:
- + */
- + delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
- + if (delta_exec > ideal_runtime)
- + granularity = 0;
复制代码 回复 1# 九阳神功爱喝茶
|
|