freebsd-skq/sys/sun4v/include
alc d1bce06c64 Change the management of cached pages (PQ_CACHE) in two fundamental
ways:

(1) Cached pages are no longer kept in the object's resident page
splay tree and memq.  Instead, they are kept in a separate per-object
splay tree of cached pages.  However, access to this new per-object
splay tree is synchronized by the _free_ page queues lock, not to be
confused with the heavily contended page queues lock.  Consequently, a
cached page can be reclaimed by vm_page_alloc(9) without acquiring the
object's lock or the page queues lock.

This solves a problem independently reported by tegge@ and Isilon.
Specifically, they observed the page daemon consuming a great deal of
CPU time because of pages bouncing back and forth between the cache
queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE).  The source of
this problem turned out to be a deadlock avoidance strategy employed
when selecting a cached page to reclaim in vm_page_select_cache().
However, the root cause was really that reclaiming a cached page
required the acquisition of an object lock while the page queues lock
was already held.  Thus, this change addresses the problem at its
root, by eliminating the need to acquire the object's lock.

Moreover, keeping cached pages in the object's primary splay tree and
memq was, in effect, optimizing for the uncommon case.  Cached pages
are reclaimed far, far more often than they are reactivated.  Instead,
this change makes reclamation cheaper, especially in terms of
synchronization overhead, and reactivation more expensive, because
reactivated pages will have to be reentered into the object's primary
splay tree and memq.

(2) Cached pages are now stored alongside free pages in the physical
memory allocator's buddy queues, increasing the likelihood that large
allocations of contiguous physical memory (i.e., superpages) will
succeed.

Finally, as a result of this change long-standing restrictions on when
and where a cached page can be reclaimed and returned by
vm_page_alloc(9) are eliminated.  Specifically, calls to
vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and
return a formerly cached page.  Consequently, a call to malloc(9)
specifying M_NOWAIT is less likely to fail.

Discussed with: many over the course of the summer, including jeff@,
   Justin Husted @ Isilon, peter@, tegge@
Tested by: an earlier version by kris@
Approved by: re (kensmith)
2007-09-25 06:25:06 +00:00
..
cddl add declaration for new helper function 2006-12-18 07:25:26 +00:00
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
asi.h
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
bus_common.h
bus_dma.h
bus_private.h
bus.h - Rename UPA_BUS_SPACE to NEXUS_BUS_SPACE; besides an UPA bus, nexus(4) 2007-01-18 18:32:26 +00:00
ccr.h
clock.h
cpu.h
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 The relocation definitions are now defined in the machine independent 2006-11-03 23:03:46 +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
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
instr.h
intr_machdep.h o break newbus api: add a new argument of type driver_filter_t to 2007-02-23 12:19:07 +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
metadata.h
mmu.h
mutex.h
nexusvar.h
ofw_bus.h
ofw_machdep.h
ofw_mem.h
ofw_nexus.h
param.h
pcb.h Convert the remainder of the low hanging fruits regarding including 2007-01-19 11:15:34 +00:00
pcpu.h fix cassert failure by adjusting padding 2007-06-12 21:19:12 +00:00
pmap.h Delete the unused/not really used sparc64 (as in sun4u) cache.h, 2007-05-20 13:06:45 +00:00
pmc_mdep.h
proc.h
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 Remove extern struct pcb stoppcbs[] declaration from this file. 2007-04-05 18:34:11 +00:00
stdarg.h
sun4v_cpufunc.h - Comment most of the remaining hypercalls in hcall.S 2006-11-24 05:27:49 +00:00
sysarch.h
tick.h
tlb.h
trap.h - Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by 2007-06-16 22:30:38 +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
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
vmparam.h Change the management of cached pages (PQ_CACHE) in two fundamental 2007-09-25 06:25:06 +00:00
watch.h
wstate.h