freebsd-nq/sys/sun4v/include
Alexander Motin a157e42516 Refactor timer management code with priority to one-shot operation mode.
The main goal of this is to generate timer interrupts only when there is
some work to do. When CPU is busy interrupts are generating at full rate
of hz + stathz to fullfill scheduler and timekeeping requirements. But
when CPU is idle, only minimum set of interrupts (down to 8 interrupts per
second per CPU now), needed to handle scheduled callouts is executed.
This allows significantly increase idle CPU sleep time, increasing effect
of static power-saving technologies. Also it should reduce host CPU load
on virtualized systems, when guest system is idle.

There is set of tunables, also available as writable sysctls, allowing to
control wanted event timer subsystem behavior:
  kern.eventtimer.timer - allows to choose event timer hardware to use.
On x86 there is up to 4 different kinds of timers. Depending on whether
chosen timer is per-CPU, behavior of other options slightly differs.
  kern.eventtimer.periodic - allows to choose periodic and one-shot
operation mode. In periodic mode, current timer hardware taken as the only
source of time for time events. This mode is quite alike to previous kernel
behavior. One-shot mode instead uses currently selected time counter
hardware to schedule all needed events one by one and program timer to
generate interrupt exactly in specified time. Default value depends of
chosen timer capabilities, but one-shot mode is preferred, until other is
forced by user or hardware.
  kern.eventtimer.singlemul - in periodic mode specifies how much times
higher timer frequency should be, to not strictly alias hardclock() and
statclock() events. Default values are 2 and 4, but could be reduced to 1
if extra interrupts are unwanted.
  kern.eventtimer.idletick - makes each CPU to receive every timer interrupt
independently of whether they busy or not. By default this options is
disabled. If chosen timer is per-CPU and runs in periodic mode, this option
has no effect - all interrupts are generating.

As soon as this patch modifies cpu_idle() on some platforms, I have also
refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions
(if supported) under high sleep/wakeup rate, as fast alternative to other
methods. It allows SMP scheduler to wake up sleeping CPUs much faster
without using IPI, significantly increasing performance on some highly
task-switching loads.

Tested by:	many (on i386, amd64, sparc64 and powerc)
H/W donated by:	Gheorghe Ardelean
Sponsored by:	iXsystems, Inc.
2010-09-13 07:25:35 +00:00
..
cddl
_align.h
_bus.h
_inttypes.h The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-03 17:55:51 +00:00
_limits.h
_stdint.h
_types.h
asi.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
asm.h
asmacros.h
atomic.h
bus_dma.h
bus_private.h
bus.h KTR_CTx are long time aliased by existing classes so they can't serve 2010-07-21 10:05:07 +00:00
ccr.h
clock.h Adapt sparc64 and sun4v timer code for the new event timers infrastructure. 2010-07-29 12:08:46 +00:00
cmt.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
cpu.h
cpufunc.h
db_machdep.h
elf.h Supply some useful information to the started image using ELF aux vectors. 2010-08-17 08:55:45 +00:00
endian.h
exec.h
fireplane.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
float.h
floatingpoint.h
fp.h
frame.h
fsr.h
gdb_machdep.h
hv_api.h
hv_pcivar.h
hviommu.h
hypervisorvar.h
idprom.h
ieee.h
ieeefp.h
in_cksum.h
instr.h
intr_machdep.h Refactor timer management code with priority to one-shot operation mode. 2010-09-13 07:25:35 +00:00
jbus.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
kdb.h
kerneldump.h
ktr.h
limits.h
lsu.h
md_var.h
mdesc_bus_subr.h
mdesc_bus.h
memdev.h
metadata.h
mmu.h
mutex.h
nexusvar.h
ofw_machdep.h Add OF_getscsinitid(), a helper similar to OF_getetheraddr() but for 2010-04-26 19:13:10 +00:00
ofw_mem.h
ofw_nexus.h
param.h
pcb.h
pcpu.h Adapt sparc64 and sun4v timer code for the new event timers infrastructure. 2010-07-29 12:08:46 +00:00
pmap.h On Alan's advice, rather than do a wholesale conversion on a single 2010-04-30 00:46:43 +00:00
pmc_mdep.h
proc.h Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
profile.h
pstate.h
ptrace.h
reg.h
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h Refactor timer management code with priority to one-shot operation mode. 2010-09-13 07:25:35 +00:00
stack.h
stdarg.h
sun4v_cpufunc.h
sysarch.h
tick.h Adapt sparc64 and sun4v timer code for the new event timers infrastructure. 2010-07-29 12:08:46 +00:00
tlb.h
trap.h
tsb.h
tstate.h
tte_hash.h
tte.h
ucontext.h
upa.h
utrap.h
varargs.h
ver.h
vm.h
vmparam.h Very rough first cut at NUMA support for the physical page allocator. For 2010-07-27 20:33:50 +00:00
watch.h
wstate.h