freebsd-skq/sys/sun4v/include
mav eb4931dc6c 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 add declaration for new helper function 2006-12-18 07:25:26 +00:00
_align.h Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an 2009-09-08 20:45:40 +00:00
_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 In contrast to the non-obvious and flexible nature of the optimized bcopy in t1_copy.S (which 2006-11-23 02:25:16 +00:00
asmacros.h add trap tracing to cpu mondo handler and tsb miss handler 2006-11-15 03:16:30 +00:00
atomic.h - bump __FreeBSD version to reflect added buf_ring, memory barriers, 2008-11-22 05:55:56 +00:00
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 Remove old sysctl stuff which is long gone in other arch's. 2008-03-26 13:03:51 +00:00
cpufunc.h MUTEX_PROFILING has been generalized to LOCK_PROFILING. We now profile 2006-11-11 03:18:07 +00:00
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 In the replacement text of the __bswapN_const() macros encapsulate the 2006-10-30 21:50:11 +00:00
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 Convert the remainder of the low hanging fruits regarding including 2007-01-19 11:15:34 +00:00
fsr.h Convert the remainder of the low hanging fruits regarding including 2007-01-19 11:15:34 +00:00
gdb_machdep.h
hv_api.h Declare hypervisor system initiated reset function 2006-11-26 22:47:52 +00:00
hv_pcivar.h
hviommu.h
hypervisorvar.h add interrupt cookie hypervisor functions 2006-11-26 04:37:49 +00:00
idprom.h
ieee.h
ieeefp.h
in_cksum.h Given that sun4u uses sparc64/sparc64/in_cksum.c, use the sparc64 2008-06-25 21:03:26 +00:00
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 Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
kerneldump.h
ktr.h
limits.h
lsu.h
md_var.h
mdesc_bus_subr.h
mdesc_bus.h
memdev.h Remove the unused major/minor numbers from iodev and memdev. 2008-06-25 07:45:31 +00:00
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 Add a new sysctl for reporting all of the supported page sizes. 2009-09-18 17:04:57 +00:00
pcb.h Convert the remainder of the low hanging fruits regarding including 2007-01-19 11:15:34 +00:00
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 Add stubs to unbreak LINT. 2007-12-07 13:45:47 +00:00
proc.h Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
profile.h - Add bits for userland profiling. For sun4u this is compile-tested only. 2007-05-11 23:43:55 +00:00
pstate.h
ptrace.h
reg.h
reloc.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
resource.h
runq.h
sc_machdep.h
setjmp.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
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 Break out stack(9) from ddb(4): 2007-12-02 20:40:35 +00:00
stdarg.h __builtin_stdarg_start was renamed to __builtin_va_start a long 2007-11-19 07:34:57 +00:00
sun4v_cpufunc.h - Comment most of the remaining hypercalls in hcall.S 2006-11-24 05:27:49 +00:00
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 - There's no need to wrap kdb_active and kdb_trap() in #ifdef KDB as 2009-03-19 20:46:51 +00:00
tsb.h - separate out rounding memory ranges to 4M boundaries from OFW memory allocation bug workaround 2006-12-04 19:35:40 +00:00
tstate.h
tte_hash.h add support for resizing the the tte_hash of multi-threaded processes 2006-11-22 04:33:34 +00:00
tte.h - Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There's 2008-08-07 22:46:25 +00:00
ucontext.h
upa.h Given that these sparc64 (as in sun4u) specific headers only exist 2007-05-20 13:19:32 +00:00
utrap.h Convert the remainder of the low hanging fruits regarding including 2007-01-19 11:15:34 +00:00
varargs.h
ver.h Given that these sparc64 (as in sun4u) specific headers only exist 2007-05-20 13:19:32 +00:00
vm.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
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