Commit Graph

69137 Commits

Author SHA1 Message Date
thorpej 4aeba6790d Initialize buffer pools with PR_IMMEDRELEASE. Don't use pool_reclaim()
on those pools; it is no longer necessary.
2004-01-09 19:01:01 +00:00
thorpej 7f125220f4 Add a new pool initialization flag, PR_IMMEDRELEASE. This flag causes
idle pool pages to be returned to the system immediately upon becoming
de-fragmented.

Also, in pool_do_put(), don't free back an idle page unless we are over
our minimum page claim.
2004-01-09 19:00:16 +00:00
perry 3682e63056 nuke trailing spaces. 2004-01-09 18:31:25 +00:00
fredb d5fb378200 Back out CVS fallout from last commit. Really make this build again. 2004-01-09 17:00:02 +00:00
chs 3c9eb7a6c4 in ehci_softintr() when looping over the active xfers, save the next pointer
before calling ehci_check_intr(), since that will free the xfer structure
if the xfer is complete.
2004-01-09 09:19:33 +00:00
chs e6d7ceae15 make sure we free the context for the pmap in pmap_destroy().
this usually isn't necessary since we freed it earlier in pmap_remove_all(),
but since uvmspace_free() is now called in the context of the exiting
process, a new context might be allocated if uvm_unmap_detach() decides
to sleep (since cpu_switch() will allocate a new context when it switches
back to the exiting process).
2004-01-09 08:49:42 +00:00
tls e4758a97ae Change BUFCACHE (default hard limit on physmem consumption by metadata
cache) from 30% to 20%.  This seems to significantly smooth the oscillation
between "almost no memory available" and "UVM free target available" caused
by the current sudden, heavy backpressure on the metadata cache.  We should
revisit this again once the backpressure mechanism is better tuned; ideally,
the hard limit should almost never come into play, because the metadata
cache should gradually give back pages as buffers hit the AGE list and as
the page cache demands them, rather than giving back a big slug of pages
all at once when UVM decides it's in a hurry and fires off the page daemon.

Just how well this adjustment works is likely to vary significantly from
machine to machine depending on I/O mix, filesystem frag size, and total
memory.  However, 20% seems to be quite a bit better than 30% on several
systems I've tested and is, coincidentally, more than enough to cache
the entire metadata working set of the AnonCVS server with 100 clients,
which is a useful worst-case stake in the ground...
2004-01-09 06:26:15 +00:00
tls 0d6723b09f Bump default size of vnode cache to 1% of physical memory, instead of
0.5%, based on some quick measurements on a number of workstations and
small fileservers (including my home fileserver running simultaneous
builds of the NetBSD source tree and several NetBSD kernels).  This
brings the hit rate on my machines from below 70% to above 90%.  We
should be able to tune this as we run, by tracking the hit rate and
increasing the size of the cache if memory permits.

Some systems will still require significantly larger cache sizes.  Some
ports -- notably the 64-bit ones -- probably should use more than 1% of
physmem as the default due to the larger size of struct vnode.
2004-01-09 00:04:53 +00:00
tls 28364b01be Add pool_reclaim() on pool to which we just pool_put() a buffer in
buf_mrelease().  Without this, though the pages are returned to the
relevant *pool*, they are never available for any other use in the
system.

Now the backpressure on the physical size of the buffer cache through
the buf_drain() call in the pagedaemon works correctly.  If anything,
it may be a bit more aggressive than intended.  On my 256MB system,
with vm.bufcache set to the default 30% of physmem, a kernel with this
fix can do 5 simultaneous config/makedep/builds of different NetBSD
kernels in 1313 seconds; with the "traditional" buffer cache code it
requires 1320 seconds.  Running "find / -type d -exec ls -l {}" while
the build is going demonstrates that the backpressure is working
correctly: free memory oscillates slowly between close to none and
the UVM target free, and vmstat -m shows a large number of releases
for the buffer pools.

For future work: how is "bufpl" memory returned to the system?  This
is not obvious to me (I must be looking in the wrong place).  Also,
buf_mrelease() is also called from brelse() in some cases.  Would it
be better to add a pool flag causing automatic release of full pages
as they become available (not fragmented)?  Jason Thorpe proposed this
and it seems more elegant than cleaning the _entire_ pool only upon
memory pressure.

Greg Oster did a lot of the work of figuring this out.  Jason proposed
the use of pool_reclaim as a way to fix it.
2004-01-08 23:41:14 +00:00
cube 3bf5e4c13b If ksyms have not been initialized, return ENXIO in ksymsopen instead of
ksymsread, because ksyms client test availability with open() and not
read().
2004-01-08 22:48:26 +00:00
nonaka bf6adc04cc implement bus_space_set_region_[124], bus_space_copy_region_[124]. 2004-01-08 15:29:20 +00:00
martin 10e9430c36 Minor cleanup 2004-01-08 13:34:04 +00:00
minoura 8f5ee5571c Include compat/hpux/files.hpux.
Untested.
2004-01-08 12:32:03 +00:00
thorpej 778161fb7f Initialize some importantant members of the drive info structure. (I have
no idea how this worked for me before, but I swear that it did...)

kern/24015.
2004-01-07 22:06:57 +00:00
thorpej cb9ba8776e Add a comment about some code that should be cleaned up. 2004-01-07 22:03:56 +00:00
bjh21 a33e671568 Regen. 2004-01-07 22:02:23 +00:00
bjh21 38cb9d0fe2 It looks like the isc PC netslot version of the Nexus interface uses the
same podule ID as the A3020/A4000 netslot version.  Update list to reflect
this.
2004-01-07 22:00:51 +00:00
atatat 0f4c4fc955 Add brief comments to the sysctlnode members that describe what they
are.

Cut SYSCTL_DEFSIZE in half, which results in roughly a 40% improvement
in memory usage by sysctlnodes (on my laptop), along with a dozen
extra calls to sysctl_realloc() during kernel bootstrap (which no one
should notice anyway).
2004-01-07 21:17:01 +00:00
martin b86d7b2c57 A __insn_barrier() is now available for all archs, remove the MD version
here. Suggested by Jason Thorpe.
2004-01-07 20:02:28 +00:00
martin 9532645db7 Add a __insn_barrier() macro to stop the optimizer from moving code
accross the barrier or assume liveness of register values.
Suggested by Jason Thorpe and Steve Woodford.
2004-01-07 19:38:10 +00:00
matt 9196bdd1f8 When accepting a peer's MSS, never let it drop below 256 (SLIP + TCP will
be the lowest MSS we should ever enounter).
2004-01-07 19:15:43 +00:00
thorpej d76fa360ef Back out >2 PT_LOAD changes from rev 1.96. They cause older GCC3-compiled
PowerPC binaries to fail.  The compiler has since been fixed, but
compatibility with older binaries needs to be maintained.

PR kern/23758.
2004-01-07 16:42:53 +00:00
cdi ceb721fd0b Pass some info from the boot loader to the kernel:
- Kernel image name
 - Symbol table
 - A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.
2004-01-07 12:43:43 +00:00
yamt 4b651870d9 #if 0 out unused ubc_flush(). 2004-01-07 12:18:16 +00:00
yamt 59afac32fe - get pages to loan out in uvm_loanuobjpages() rather than
having caller (nfsd, in this case) do so.
- tweak locking so that nfs loaned READ works on layered filesystems.
2004-01-07 12:17:10 +00:00
jdolecek 26767eb2ae fix F_MAXFD fcntl - it returned the value as errno instead
of return value from the syscall
from mouss <usebsd at free dot fr>
2004-01-07 09:26:29 +00:00
jdolecek 6c869ee3b7 add list of known issues, from Lennart Augustsson and Michael van Elst 2004-01-07 09:17:47 +00:00
martin 1cfee605ee Implement restartable atomic sequences (RAS) for sparc64. 2004-01-06 21:35:18 +00:00
petrov d63b2431fa Some cleanup and move ddb_regs declaration to db_interface.c 2004-01-06 20:41:23 +00:00
matt 82c993fb44 Regen. 2004-01-06 19:44:38 +00:00
matt 5e5b78644d Add HP Tachyon TL and TS device IDs. 2004-01-06 19:44:17 +00:00
tsutsui 74ba66664f MD cpu_lwp_free() should have the second arg. 2004-01-06 19:30:38 +00:00
he 38d0807d97 Make these compile again after the latest adjustments. 2004-01-06 18:46:07 +00:00
briggs ad7a849c27 Change CPPFLAGS to -D${MACHINE}=${MACHINE} instead of just -D${MACHINE}
This makes it possible to define header files on the command line that
might include ${MACHINE} somewhere in the path.  This might be used in
evbppc, for example, when defining PPC_PCI_MACHDEP_IMPL as, for example:

PPC_PCI_MACHDEP_IMPL="<arch/evbppc/sandpoint/pci_machdep.h>"

which will be included as

#include PPC_PCI_MACHDEP_IMPL

Prior to this change, the compile would fail trying to include
<arch/evbppc/1/pci_machdep.h>
2004-01-06 18:44:57 +00:00
tsutsui 47c4c87d2c Fix bus error trap on X68030/25MHz on-board SPC, which may have some quirk.
Problem reported by Yasushi Oshima.
2004-01-06 18:07:17 +00:00
matt ecdec9d579 Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;
see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
2004-01-06 17:01:48 +00:00
chuck e5aceb8c63 the IBM thinkpad T40p's built-in wireless ath0 interface attaches
to pci, so add an entry for it so that the GENERIC_LAPTOP kernel
can use it.
2004-01-06 16:24:14 +00:00
chs 7662f44874 fix lock initialization in uvm_anon_add(). from PR 23831. 2004-01-06 15:56:49 +00:00
martin 4a0ea0eafd Cosmetics 2004-01-06 14:13:33 +00:00
atatat 5efc584023 Expose the buf_map symbol so that pmap(1) can find it.
Split the sysctl setup routine into two routines, one for each
"subtree".  Perhaps it's a little pedantic, but it's cleaner.  Also,
assert that the "kern" and "vm" nodes exist.
2004-01-06 13:51:09 +00:00
christos 6774ae7407 PR/23997: Love: <sys/siginfo.h> pollutes userland namespace with <sys/queue.h> 2004-01-06 12:41:43 +00:00
petrov e459d2a294 Spinup secondary cpus. Based on codes sent to me by Dennis Chernoivanov
and Chuck Silvers.
2004-01-06 09:38:19 +00:00
gson e11055d090 Abort the USB transfer on an endpoint when the last midi device
referencing it is closed.  Fixes kern/23987.
2004-01-06 05:42:47 +00:00
oster d9ff8342a0 Clean up a few comments, and improve code formatting somewhat.
Makes things a bit more readable.

No functional changes.
2004-01-06 03:27:13 +00:00
nathanw 97a491c111 Add a missing { to cpu_exit() so that it compiles.
(Alpha still doesn't boot with the new-reaper changes, though. First
process to exit kills the system).
2004-01-05 23:51:19 +00:00
hannken 39ce18659d Mapping of console device goes into the reserved tlb's.
Max. memory is 32M for console at fb and 48M for console on com.

If this becomes a problem TLB_NRESERVED needs to become variable.
2004-01-05 19:55:27 +00:00
matt 724f5b2c53 Regen. 2004-01-05 19:31:08 +00:00
matt f89c0bcfa9 Add Agilent Technologies vendor ID
Add Agilent Tachyon_DX2 product ID
Add HP Tachyon_XL2 product ID
2004-01-05 19:30:51 +00:00
hannken 036559b798 Implement fb_mmap(). From David P. Reese Jr. with PR #23985. 2004-01-05 16:05:14 +00:00
nonaka d382cc6c5a Use memset() for "Clear all of BSS".
If (edata-address & 3) != (end-address & 3), my own code cause infinity loop.
Fixed it.
2004-01-05 15:31:03 +00:00