Commit Graph

28525 Commits

Author SHA1 Message Date
chs
64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
uch
80d8d09cd7 switch from splvec to ipl_sr_bits. 2001-09-15 19:51:38 +00:00
mrg
002ddf2283 in pci_conf_read() and pci_conf_write(), convert all printf()'s to only
occur if SPDB_CONF (and hence DEBUG).  also convert the panic in
pci_conf_write() to a SPDB_CONF warning and a return.

this cleans up pcictl(8) support.
2001-09-15 19:32:14 +00:00
mrg
9680ade50a add coda (untested; same cdev number as sparc) and pci (tested). 2001-09-15 17:51:02 +00:00
bjh21
91dae8ca83 Add minimal IP-over-Econet support and a load of bug-fixes. I can ping,
unreliably, between my RISC iX and NetBSD boxes with this.  There's a lot
of work to go before it's solid, though.
2001-09-15 17:27:24 +00:00
uch
ba1ef3e899 ANSIfy. 2001-09-15 15:04:45 +00:00
uch
c04a1143f0 remove unneeded #include 2001-09-15 14:08:15 +00:00
uch
58f851eeb5 ANSIfy, KNF, change my copyright. 2001-09-15 12:47:04 +00:00
uch
7148cab49a ANSIfy, KNF. 2001-09-15 11:13:20 +00:00
eeh
1007095edd Only drop into the debuger if SDB_DDB is set. 2001-09-15 07:13:40 +00:00
eeh
984030b0ca Fix locking problem. 2001-09-15 07:12:22 +00:00
eeh
a7283de29c Be a bit more elaborate with UE DMA errors. 2001-09-15 07:10:04 +00:00
eeh
388726b340 Added iommu_extract() for debug purposes.
Anyone caught using it for anything other than debug will be shot.
2001-09-15 06:55:50 +00:00
thorpej
17d975073d Oops, don't need to fill in pcibus_attach_args twice. 2001-09-15 04:50:59 +00:00
thorpej
fe5ada1fcc Add PCI and AGP devices. 2001-09-15 04:40:21 +00:00
thorpej
927debe92b Attach "agp" to the AMD-751 PCI host controller (Alpha UP1000/UP1100). 2001-09-15 04:33:37 +00:00
thorpej
6658cbc629 Only filter out the PCI_ID_REG in irongate_conf_read(). 2001-09-15 04:31:40 +00:00
thorpej
e3d4f375aa Give each AGP controller its own attribute, and let the "agpbus"
device (rather, the device that carries that attribute) also
carry one or more attributes indicating which type of controller
it might be.

This will allow systems that might have AGP, but would never have
e.g. an Intel PCI-Host bridge, to trim out code that won't be used.
2001-09-15 01:32:10 +00:00
wdk
7e9d52fd89 Remove unused extern 2001-09-15 01:19:38 +00:00
wdk
d9c3de97f0 Add bus_dma hooks for ISA Bus.
ISA bus option doesn't support DMA on the Magnum 3000 series, but other
models such as the M/120 do support it.
2001-09-15 01:17:47 +00:00
wdk
4fbe1c7977 Add lpt device 2001-09-15 01:11:02 +00:00
thorpej
8f077d92cc Move the AGP device declaration stuff into files.agp. 2001-09-15 01:10:09 +00:00
wdk
919892c3c4 bus_space_mmap support based on -arc implementation 2001-09-15 00:49:53 +00:00
wdk
5b22c13d90 spllpt() for ISA Bus printer support 2001-09-15 00:46:13 +00:00
thorpej
0019ea5ce6 Clean up the AGP match/attach code somewhat. 2001-09-15 00:24:59 +00:00
nathanw
718551d644 Change all instances of "[e]isa* at foo?" to "[e]isa0 at foo?".
This prevents attaching multiple [E]ISA buses, which we don't support
(Is there any such thing to support? I'm skeptical) and avoids the
"panic: isaattach: ISA bus already seen" that occurs on some laptops
with docking stations and EISA boxes. Since there is only one [E]ISA bus,
logically, the ISA device probe will still find devices on the
docking station.

This does not address the problem of inserting or removing the docking station
at runtime.

Relevant PRs: kern/6544, port-i386/10392, kern/11627, kern/13557,
install/13865.
2001-09-14 21:44:21 +00:00
nathanw
958ea7b111 Add the PCI device. 2001-09-14 21:14:08 +00:00
nathanw
32b0166603 Return ~0 for all config space reads on devices < 11 on the primary bus,
rather than returning ~0 for PCI_ID_REG and panicing otherwise.
2001-09-14 21:04:58 +00:00
thorpej
f23828cddd Don't declare intrhand[] here -- that's taken care of in intr.c. 2001-09-14 19:18:13 +00:00
jdolecek
7f5706b514 fix indentation 2001-09-14 18:29:08 +00:00
uch
a902597034 debug printf change. 2001-09-14 17:12:43 +00:00
uch
a970042213 HITACHI PERSONA keyboard support. patch by KIYOHARA Takashi. 2001-09-14 17:11:51 +00:00
msaitoh
9cd1fceecc remove obsolete file 2001-09-14 11:39:39 +00:00
thorpej
b9fffe1967 Allow bus front-end to provide both ioctl and mmap entry points,
and also the wsdisplay type.

Based on changes from Simon Burge <simonb@wasabisystems.com>.
2001-09-14 01:10:11 +00:00
briggs
c477d3ad28 Define __BUS_SPACE_HAS_STREAM_METHODS since the functions are there. Noted
on tech-kern & port-mac68k by "John Ruschmeyer" <jruschme@mac.com>.
2001-09-14 00:58:08 +00:00
chris
5cb5484ce3 Sprinkle some static and inline into a couple of functions. Remove dead entries from pmap.h. 2001-09-13 23:56:01 +00:00
eeh
266e77d773 Define SYSDIR if not already defined. 2001-09-13 23:19:59 +00:00
chris
5695ad388d Update pmap_clearbit to flush the cache if the area is being made readonly. Also only do this and the tlb flush if the pmap is the current pmap. 2001-09-13 22:45:23 +00:00
thorpej
face3e948d Add "pci" at cdev 83. 2001-09-13 22:08:44 +00:00
tshiozak
5341bac833 correct the set/get trigger code for ALi M1543 interrupt router. 2001-09-13 14:00:52 +00:00
pk
0a4ccdfd3c Some sun4c machine (e.g. an IPC) can also have just 7 register windows,
so check for a possible context switch optimization #if SUN4C too.
2001-09-13 13:25:48 +00:00
pk
e85ab176f8 The SAVE macro used in the context switch code wound up being defined
only if MULTIPROCESSOR in rev 1.142, causing spurious register window
corruption on some machines.
2001-09-13 13:12:13 +00:00
manu
dea90b1ed2 Linux emulation is no longer experimental, removed comment 2001-09-12 21:05:37 +00:00
rjs
fcd39c5f2e Add bs_notimpl_bs_mmap to bus space struct. 2001-09-12 12:32:16 +00:00
rearnsha
9358e3ecc3 Fix warning errors for printing size_t types when compiling with
DEBUG_DMA (uses casts due to a.out and ELF having different base
types for size_t).
2001-09-12 09:41:50 +00:00
fvdl
43bbb8500a Apparently some ServerWorks Host-PCI bridges only get their memory space
enabled, even though IO space does work. A few drivers (like ahc)
will only work reliably with IO space, so check for this condition
and correct it.
2001-09-12 08:25:17 +00:00
jmc
9185cf1b34 Add mtrr.h to INCS list to get installed on a make includes 2001-09-12 04:44:21 +00:00
chs
0f63dc99dc replace pmap_enter() with pmap_kenter_pa() where appropriate. 2001-09-11 20:37:12 +00:00
bjh21
5321796010 Add a minimal bus_space_mmap which always fails. The MEMC can only map DRAM
into the user's address space -- I/O devices can only ever be got at by the
kernel.
2001-09-11 11:38:59 +00:00
chs
e5c9089c28 fix typo. 2001-09-11 07:30:51 +00:00