Getting maximum mileage out of tickles
2007
的论文:
主要内容是在已有tickless kernel(2.6.21)的基础上进一步优化
section 3 Keeping
Kernel Quiet
1 将参差不齐且要求不高的定时器 round up to second 级别, 这样可以同时触发, 减少触发次数
a
new API __round_jiffies() is introduced in the kernel.
2
Deferrable timer
有些定时器在idle的时候不重要,可以延迟唤醒.
section
4 Platform Timer Event Sources
LAPCI在某些idle 不能工作,
只能使用PIT或hpet作为broadcast timer.
Dynticks depends on having a per-CPU
timer event source. On x86, LAPIC timer can be used as a de-pendable
timer event source. But, when the platform supports low power processor
idle states (ACPI C2, C3 states), on most current platforms LAPIC
timer stops ticking while CPU is in one of the low power idle states.
Dynticks
uses a nice workaround to address this issue, with the concept of
broadcast timer.
更激进的工作 HPET as a per-CPU timer
Linux kernel
uses “legacy replacement” mode of HPET timer today to generate timer
events. In this mode,HPET appears like legacy PIT and RTC to OS
gener-ating interrupts on IRQ0 and IRQ8 for HPET channel 0 and
channel 1 timer respectively.
Different channels of HPET can be
used to program timer for each CPU, thereby avoiding the need for
broadcast
timer altogether and eliminating the LAPIC timers as well.
section
5 Idle Process Load balancing
idle 太长时间 将导致性能退化, 本文提出一个idle cpus
owner 保持周期唤醒, 以便发现load不均衡时唤醒其他idle cpu, 该patch是否纳入内核未知.
This paper
proposes a third route which nominates an
owner among the idle CPUs,
which does the idle load
balancing (ILB) on behalf of the other idle
CPUs in the
system. This ILB owner will have the periodic tick ac-
section
6 Keeping Userspace Quiet
还需要用户态程序的合作.
Instead of polling
periodically for checking status changes, applications and deamons
should use
some sort of event notification where ever possible and
perform the actions based on the triggered event.
类似section 3,
尽量让用户态timer成批触发, 例如gnome的 g_timeout_add_seconds()
Dave Jones. Why
userspace sucks ols 2006.
阅读(1072) | 评论(0) | 转发(0) |