1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00
freebsd/sys/ia64/include
Alan Cox 7bfda801a8 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
..
pc
_bus.h Break out the definition of bus_space_{tag,handle}_t and a few other types 2005-04-18 21:45:34 +00:00
_inttypes.h
_limits.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
_regset.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
_stdint.h
_types.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
acpica_machdep.h Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
asm.h nit in /*- 2005-01-31 08:16:45 +00:00
atomic.h Add casts to some of the more commonly used pointer-type atomic 2007-07-30 22:07:01 +00:00
bootinfo.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
bus_dma.h Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
bus.h Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
clock.h First part of a little cleanup in the calendar/timezone/RTC handling. 2006-10-02 12:59:59 +00:00
cpu.h Fix braino in previous commit: Don't redefine OID_AUTO to something 2006-05-11 22:49:31 +00:00
cpufunc.h Work around a firmware bug in the HP rx2660, where in ACPI an I/O port 2007-06-10 16:53:01 +00:00
db_machdep.h Implement functions calls from within DDB on ia64. On ia64 a function 2005-07-02 23:52:37 +00:00
dig64.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
efi.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
elf.h PR: 2006-10-04 21:37:10 +00:00
endian.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
exec.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
float.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
floatingpoint.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
fpu.h
frame.h
gdb_machdep.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
ia64_cpu.h In ia64_set_rr(), don't perform data serialization. This allows 2007-08-05 18:19:38 +00:00
ieee.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
ieeefp.h Fixed FP_R*. fp{get_set}round() apparently never worked on ia64, since 2006-07-05 06:10:21 +00:00
in_cksum.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
intr.h Rework the interrupt code and add support for interrupt filtering 2007-07-30 22:29:33 +00:00
intrcnt.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
kdb.h Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
limits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
mca.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
md_var.h Keep interrupts disabled while handling external interrupts. 2007-08-06 05:11:01 +00:00
memdev.h
mutex.h
nexusvar.h
pal.h
param.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
pcb.h
pci_cfgreg.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pcpu.h Rework the PCPU_* (MD) interface: 2007-06-04 21:38:48 +00:00
pmap.h Fix a comment. 2006-11-13 06:26:57 +00:00
pmc_mdep.h MFP4: 2005-06-09 19:45:09 +00:00
proc.h Improve SMP support: 2005-08-06 20:28:19 +00:00
profile.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pte.h
ptrace.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
reg.h
reloc.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
resource.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
runq.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
sal.h
sapicreg.h
sapicvar.h Rework the interrupt code and add support for interrupt filtering 2007-07-30 22:29:33 +00:00
setjmp.h
sf_buf.h
sigframe.h
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
smp.h Improve SMP support: 2005-08-06 20:28:19 +00:00
stdarg.h Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes 2006-09-21 01:37:02 +00:00
sysarch.h
ucontext.h
unwind.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
varargs.h
vmparam.h Change the management of cached pages (PQ_CACHE) in two fundamental 2007-09-25 06:25:06 +00:00