2009-10-20から1日間の記事一覧

CFSの話 - __sched_period()で算出されるperiodの値

/* * The idea is to set a period in which each task runs once. * * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch * this period because otherwise the slices get too small. * * p = (nr <= nl) ? l : l*nr/nl */ sta…

CFSの話 - sched_slice()で行われるタイムスライスの計算がさぱーり分からない

/* * Preempt the current task with a newly woken task if needed: */ static void check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) { unsigned long ideal_runtime, delta_exec; ideal_runtime = sched_slice(cfs_rq, curr); delt…