freebsd-dev/sys
Stephan Uphoff 224409590d When the VM needs to allocated physical memory pages (for non interrupt use)
and it has not plenty of free pages it tries to free pages in the cache queue.
Unfortunately freeing a cached page requires the locking of the object that
owns the page. However in the context of allocating pages we may not be able
to lock the object and thus can only TRY to lock the object. If the locking try
fails the cache page can not be freed and is activated to move it out of the way
so that we may try to free other cache pages.

If all pages in the cache belong to objects that are currently locked the
cache queue can be emptied without freeing a single page. This scenario caused
two problems:

    1)  vm_page_alloc always failed allocation when it tried freeing pages from
        the cache queue and failed to do so. However if there are more than
        cnt.v_interrupt_free_min pages on the free list it should return pages
        when requested with priority VM_ALLOC_SYSTEM. Failure to do so can cause
        resource exhaustion deadlocks.

    2)  Threads than need to allocate pages spend a lot of time cleaning up the
        page queue without really getting anything done while the pagedaemon
         needs to work overtime to refill the cache.

This change fixes the first problem. (1)

Reviewed by:	tegge@
2006-02-15 22:29:53 +00:00
..
alpha Fix the hw.realmem sysctl. The global realmem variable is a count of 2006-02-14 14:50:11 +00:00
amd64 It seems bit 5 of cpu_feature2 is the VMX (Virtual Machine Extensions) 2006-02-15 14:48:59 +00:00
arm Use the correct address for the ohci device. 2006-02-11 03:58:07 +00:00
boot Remove ELF dynamic tag definitions that aren't used. Ideally, 2006-01-18 18:49:25 +00:00
bsm Merge OpenBSM 1.0 alpha 3 include file changes from contrib/openbsm/bsm 2006-02-06 01:12:46 +00:00
cam - Add a scsi_da.c and a umass.c quirk for Genesys 6-in-1 Card Reader. 2006-01-30 20:27:44 +00:00
coda - Reorder calls to vrele() after calls to vput() when the vrele is a 2006-02-01 00:25:26 +00:00
compat - Always call exec_free_args() in kern_execve() instead of doing it in all 2006-02-06 22:06:54 +00:00
conf Tie the ipmi driver into the i386/amd64 builds. 2006-02-13 17:56:24 +00:00
contrib resolve merge conflicts 2006-02-10 19:01:02 +00:00
crypto
ddb Fix -Wundef. 2005-12-04 02:12:43 +00:00
dev drop softc lock around copyin/copyout 2006-02-15 18:36:52 +00:00
doc
fs Correctly set MNTK_MPSAFE flag from the lower vnode's mount rather than 2006-02-10 18:06:49 +00:00
gdb
geom On component state change to ACTIVE don't forget to update metadata. 2006-02-12 17:38:09 +00:00
gnu Add marker vnodes to ensure that all vnodes associated with the mount point are 2006-01-09 20:42:19 +00:00
i4b Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
i386 It seems bit 5 of cpu_feature2 is the VMX (Virtual Machine Extensions) 2006-02-15 14:48:59 +00:00
ia64 Fix the hw.realmem sysctl. The global realmem variable is a count of 2006-02-14 14:50:11 +00:00
isa Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
isofs/cd9660 I ran into an nfs client panic a couple of times in a row over the 2006-01-17 17:29:03 +00:00
kern Audit the arguments to the ptrace(2) system call. 2006-02-14 01:18:31 +00:00
libkern Convert function declarations to ANSI C. 2006-01-22 00:46:40 +00:00
modules Disable the ipmi driver on pc98. 2006-02-14 12:55:07 +00:00
net Fix build. 2006-02-15 08:25:40 +00:00
net80211 o make driver override of net80211 parameter state consistent 2006-02-14 17:48:56 +00:00
netatalk - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
netatm Convert to ANSI C function declarations. 2006-01-22 01:07:11 +00:00
netgraph Unbreak this. 2006-02-14 15:22:24 +00:00
netinet When sending a packet from dummynet, indicate that we're forwarding 2006-02-14 06:36:39 +00:00
netinet6 avoided the use of purged address structure when an address became 2006-02-12 15:37:08 +00:00
netipsec Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
netipx In spx_attach() and spx_detach(), there is no need to check whether the 2006-01-14 00:05:44 +00:00
netkey Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
netnatm Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
netncp In ncp_sysctl_connstat(), the SLIST_FOREACH() logic to check 'error' 2006-01-14 11:40:32 +00:00
netsmb Although we check the return value of copyin(9) while determaining how 2006-01-16 17:03:21 +00:00
nfs
nfs4client Use nfs4_disconnect for connections opened with nfs4_connect. 2006-01-19 22:48:31 +00:00
nfsclient Don't log an error on tcp connection reset, even if we don't get ECONNRESET. 2006-01-20 15:07:18 +00:00
nfsserver - Reorder calls to vrele() after calls to vput() when the vrele is a 2006-02-01 00:25:26 +00:00
opencrypto
pc98 MFi386: revision 1.622. 2006-02-09 11:50:22 +00:00
pccard I don't believe these are used at all, and can be safely removed 2006-01-15 06:49:28 +00:00
pci Do not touch ifp->if_baudrate in miibus aware drivers. 2006-02-14 12:44:56 +00:00
posix4 mqueue.h has been superceded by sys/mqueue.h thanks to David Xu's work. 2005-11-28 02:58:30 +00:00
powerpc Simplify system time accounting for profiling. 2006-02-08 08:09:17 +00:00
rpc Fix up some cut-n-paste damage and some out-of-date comments. 2006-01-20 15:20:41 +00:00
security Add stub AUE_EACCESS entry. 2006-02-11 23:55:08 +00:00
sparc64 For E250 and E450 enable the watchdog part of the MK48Txx as it just 2006-02-15 16:56:38 +00:00
sys CPU time accounting speedup (step 2) 2006-02-11 09:33:07 +00:00
tools Fix a leftover "iwi_boot" string. 2006-01-30 16:32:08 +00:00
ufs In quotaoff(), lock the vnode instead of asserting it when manipulating 2006-02-12 13:20:06 +00:00
vm When the VM needs to allocated physical memory pages (for non interrupt use) 2006-02-15 22:29:53 +00:00
Makefile add nfsclient/, nfs4client/, and rpc/ directories to the 2006-01-10 20:58:27 +00:00