Commit Graph

13719 Commits

Author SHA1 Message Date
Matthew Dillon
39d0485c23 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:16:15 +00:00
Matthew Dillon
d254af07a1 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 21:50:00 +00:00
Matthew Dillon
598217c491 Fix array index of signed char to cast to unsigned char and then to int.
Also general const cleanup.
1999-01-27 21:36:14 +00:00
Matthew Dillon
a06791bc90 Fix getenv() comparison against '=' ... was *cp = '=' instead of
*cp == '='.
1999-01-27 21:24:50 +00:00
Matthew Dillon
b4e36adf1c Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors,
    temporary.
1999-01-27 20:09:21 +00:00
Matthew Dillon
d7bcbf6358 Add parens to SMBPRI, fixing bug in tsleep() call that OR's SMBPRI with
something else.
1999-01-27 19:58:53 +00:00
Matthew Dillon
a56d629240 Fix PPBPRI #define - it was missing parenthesis which messed up a
call to tsleep() in dev/ppbus/ppbconf.c.  Also fixup initializers.
1999-01-27 19:44:05 +00:00
Matthew Dillon
6a59f7d85f Fix '|' that was supposed to be '||' 1999-01-27 19:35:33 +00:00
Julian Elischer
0a702d0a28 Patch from Soeren to remove inapropriate interrupt messages
also a bit of a BDE patch in there I beleive. Backs out a fix I needed for Cyrix support
early on but it turns out that a later fix in the cyrix support made it un-needed.
1999-01-27 19:32:34 +00:00
Matthew Dillon
b28536d503 Added c_caddr_t: const char * version of the char * caddr_t, for
use in -Wall / -Wcast-qual fixes.
1999-01-27 19:01:44 +00:00
Matthew Dillon
a1c1e16ada Changes to support -Wall, -Wcast-qual. Had to make physical code changes
in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary
    nul-terminate-then-restore-original ) on a const char * string.
1999-01-27 19:00:49 +00:00
Matthew Dillon
cc6e054933 Add missing declarations to fix error with LINT compile 1999-01-27 18:36:49 +00:00
Matthew Dillon
5e24f1a2f6 Remove unintended trigraph sequences in comments for -Wall 1999-01-27 18:19:53 +00:00
Eivind Eklund
8d25715cfb Add ISA PnP support, now that we have the space for it. 1999-01-27 15:34:25 +00:00
KATO Takenori
f274af0063 Clean up LD-BDN reset code(PC-98).
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-01-27 11:05:12 +00:00
Bruce Evans
fea579e94e Don't forget to count context switches in yield(). 1999-01-27 10:14:05 +00:00
Bruce Evans
dc34e67676 Include <sys/select.h> -- don't depend on pollution in <sys/proc.h>. 1999-01-27 10:10:03 +00:00
KATO Takenori
9e0c98036f Sync with sys/i386/isa/sio.c revision 1.225. 1999-01-27 08:26:16 +00:00
KATO Takenori
75929847ae Sync with sys/i386/conf/Makefile.i386 revision 1.138. 1999-01-27 08:25:19 +00:00
KATO Takenori
e7d91a508f Initialize the member atr_buffer.
Pointed out by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-01-27 08:22:08 +00:00
Julian Elischer
b5def701c7 Compile the linux module with the same flags as the kernel.
(oops).

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 21:29:01 +00:00
Bill Paul
d5901891f4 When selecting the correct EEPROM offset to use for probing the station
address, account for cards which report the Texas Instruments PCI vendor ID
in addition to Compaq and Olicom. (I don't actually have a card that
reports the TI vendor/device ID, but it appears that some Racore adapters
work this way, and failing to account for it when we have the ID listed
in the supported devices list is a bug.)
1999-01-26 15:18:26 +00:00
Kazutaka YOKOTA
6dab3d1e54 Oops, one line was accidentally commented out in the previous commit. 1999-01-26 10:00:02 +00:00
Kazutaka YOKOTA
44ad10ea41 Pull down the splash screen when someone is about to read from the
keyboard.  Do this in scread(), rather than in scopen().
1999-01-26 09:58:37 +00:00
Matthew Dillon
56319e3a58 Ok, people didn't like kern.conf_dir. Poof, backed out. 1999-01-26 07:37:11 +00:00
Peter Wemm
5581e43bbf Check if the intpm controller is configured first before stopping
recognition of the 82371AB device.
1999-01-26 04:54:38 +00:00
Steve Price
1427370d8f Add support for the USR3031 PNP modem. Also fix a minor typo since I was
here.
1999-01-26 04:02:54 +00:00
Julian Elischer
2907af2a96 Mostly remove the VM_STACK OPTION.
This changes the definitions of a few items so that structures are the
same whether or not the option itself is enabled. This allows
people to enable and disable the option without recompilng the world.

As the author says:

|I ran into a problem pulling out the VM_STACK option.  I was aware of this
|when I first did the work, but then forgot about it.  The VM_STACK stuff
|has some code changes in the i386 branch.  There need to be corresponding
|changes in the alpha branch before it can come out completely.

what is done:
|
|1) Pull the VM_STACK option out of the header files it appears in.  This
|really shouldn't affect anything that executes with or without the rest
|of the VM_STACK patches.  The vm_map_entry will then always have one
|extra element (avail_ssize).  It just won't be used if the VM_STACK
|option is not turned on.
|
|I've also pulled the option out of vm_map.c.  This shouldn't harm anything,
|since the routines that are enabled as a result are not called unless
|the VM_STACK option is enabled elsewhere.
|
|2) Add what appears to be appropriate code the the alpha branch, still
|protected behind the VM_STACK switch.  I don't have an alpha machine,
|so we would need to get some testers with alpha machines to try it out.
|
|Once there is some testing, we can consider making the change permanent
|for both i386 and alpha.
|
[..]
|
|Once the alpha code is adequately tested, we can pull VM_STACK out
|everywhere.
|

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:49:52 +00:00
Julian Elischer
88c5ea4574 Enable Linux threads support by default.
This takes the conditionals out of the code that has been tested by
various people for a while.
ps and friends (libkvm) will need a recompile as some proc structure
changes are made.

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:38:12 +00:00
Robert Nordier
ab19eb8230 Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".
1999-01-25 23:07:02 +00:00
Nicolas Souchu
04fb1490a0 Terminate commit for the Intel PIIX4 SMBus support. Already committed files
are sys/pci/intpm*

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-01-25 19:34:27 +00:00
Matthew Dillon
b1cba377b0 Add kern.conf_dir sysctl. This is a R+W string used to specify the
directory containing rc.conf.local and rc.local, and possibly other
    things in the future.

    This sysctl is used by the diskless startup code and new rc.conf.  If
    it cannot be found or is empty, the system should revert to using /etc.
1999-01-25 18:26:09 +00:00
Bill Fenner
527b7a14a5 Port NetBSD's 19990120-accept bug fix. This works around the race condition
where select(2) can return that a listening socket has a connected socket
queued, the connection is broken, and the user calls accept(2), which then
blocks because there are no connections queued.

Reviewed by:	wollman
Obtained from:	NetBSD
(ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/patches/19990120-accept)
1999-01-25 16:58:56 +00:00
Bill Fenner
ec42cbfc24 Don't free the socket address if soaccept() / pru_accept() doesn't
return one.
1999-01-25 16:53:53 +00:00
Torsten Blum
de6f543955 Identify the TI1250 PCMCIA/CardBus bridge. It seems that it's compatible
to the TI1131. At least it works in my Compaq Armada 7800.
1999-01-25 12:59:31 +00:00
KATO Takenori
564da2b0d5 Sync with sys/i386/conf/Makefile.i386 revision 1.137. 1999-01-25 12:12:01 +00:00
Robert Nordier
5ca1fa1ed0 Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed
to the kernel.  In the case of older 2.x kernels, this was causing
garbage to be printed to the video console, followed by an exception.

This should resolve a problem reported on -current by Peter Jeremy
<peter.jeremy@auss2.alcatel.com.au>.
1999-01-25 10:34:35 +00:00
Doug Rabson
149a155c3b Don't try to call SYSUNINIT functions if there was a link error.
Reviewed by: Peter Wemm <peter@netplex.com.au>
1999-01-25 08:42:24 +00:00
Peter Wemm
43482c407d Force the order of the setdefs* so that make -jN doesn't build the
setdefs* multiple times at the same time that it's compiling setdefs[0].c.
I think this was leading to unterminated linker sets etc.
1999-01-25 04:08:28 +00:00
Peter Wemm
97b3f983a5 NO_LKM is no longer an option. LKM support is an option itself. 1999-01-25 03:51:51 +00:00
Nicolas Souchu
7c7545e182 SMBus support for the Intel PIIX4 power management unit. See smbus(4),
iicbus(4) and smb(4).

User programs are available to retrieve SDRAM and sensor info, contact
the author.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Mike Smith <msmith@freebsd.org>
1999-01-24 18:13:31 +00:00
Matthew Dillon
2f586e1b2c Undo last commit - not a bug, just duplicate code. PG_MAPPED and
PG_WRITEABLE are already cleared by vm_page_protect().
1999-01-24 07:06:52 +00:00
Bruce Evans
73a6265d68 Go back to only supporting revoke() for bdevs and cdevs. It is very
buggy for fifos, and no one seems to have investigated its behaviour
on other types of files.  It has been broken since the Lite2 merge
in rev.1.54.

Nagged about by:	Brian Feldman (green@unixhelp.org)
1999-01-24 06:28:37 +00:00
Mike Smith
e9583ef187 From the PR:
I added a FICL_TRACE-conditioned trace facility based on "see".
It is ugly because words' functions are almost all static, and ficlExec,
where the trace has to be located, can't get their pointers. So, #ifdef
this staticization, and add most of see's body into ficlExec. Duplication
of code, uglyness, etc. But it is cleanly #ifdef'ed, and works like a
charm.

	It does not provide "step" facility, though, just trace. It is
tunable at run-time through "trace!". If anyone (most likely me :) ever
wants a step facility, I'll add it. Should be easy.

PR:		bin/9652
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:06:21 +00:00
Matthew Dillon
7dbf82dc13 Change all manual settings of vm_page_t->dirty = VM_PAGE_BITS_ALL
to use the vm_page_dirty() inline.

    The inline can thus do sanity checks ( or not ) over all cases.
1999-01-24 06:04:52 +00:00
Mike Smith
84ef5a8f66 Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR:		bin/9651
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:03:44 +00:00
Matthew Dillon
68af6d169b vm_map_split() used to dirty the page manually after calling
vm_page_rename(), but never pulled the page off PQ_CACHE if it was on
    PQ_CACHE.  Dirty pages in PQ_CACHE are not allowed and a KASSERT was
    added in -4.x to test for this... and got hit.

    In -4.x, vm_page_rename() automatically dirties the page.  This commit
    also has it deal with the PQ_CACHE case, deactivating the page in that
    case.
1999-01-24 06:00:31 +00:00
Mike Smith
f7f7a5d7ab From the PR:
FICL's TYPE copies the counted string to HERE, as abial has
remarked. Answering to abial's question, this is NOT garanteed to have
enough space.
...
	We have dynamic memory. Even before memory-alloc got in, we
already had dynamic memory. Use it, then! (ficlMalloc is sysdep, so I
suppose that's why it was not used for TYPE; ficl is probably designed
to work without a working ficlFree).

Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 05:58:18 +00:00
Matthew Dillon
161a8f6519 Add vm_page_dirty() inline with PQ_CACHE sanity check 1999-01-24 05:57:50 +00:00
Greg Lehey
ac4cd383ca Correct #include in vinumioctl.c to compile correctly
without VINUMDEBUG

Submitted-by: peter
1999-01-24 05:14:39 +00:00
Matthew Dillon
257aefa704 Addendum: The original code that the last commit 'fixed' actually did
not have a bug in it, but the last commit did make it more readable so
    we are keeping it.
1999-01-24 03:49:58 +00:00
Matthew Dillon
e4542174b0 vm_pager_put_pages() is passed an rcval array to hold per-page return
values.  The 'int' return value for the procedure was never used and
    not well defined in any case when there are mixed errors on pages, so
    it has been removed.  vm_pager_put_pages() and associated vm_pager
    functions now return void.
1999-01-24 02:32:15 +00:00
Matthew Dillon
e1a4feafd0 Clear PG_MAPPED as well as PG_WRITEABLE when a page is moved to the
cache.
1999-01-24 02:29:26 +00:00
Matthew Dillon
d044d7bfb6 Added warning printf ( needs INVARIANTS ) when busy cache page is found
while trying to free memory.
1999-01-24 01:33:22 +00:00
Greg Lehey
be174c7efd Add comment indicating that the vinum pseudo-device is experimental,
and that vinum should be started as a kld.

Tripped-over-by: many people
1999-01-24 01:22:37 +00:00
Matthew Dillon
89600e8663 There was a situation where sendfile() might attempt to initiate I/O
on a PG_BUSY page, due to a bug in its sequencing of a conditional.
1999-01-24 01:15:58 +00:00
Matthew Dillon
aaba53da90 It is possible for a page in the cache to be busy. vm_pageout.c was not
checking for this condition while it tried to free cache pages.  Fixed.
1999-01-24 01:06:31 +00:00
Matthew Dillon
a7039a1d42 Add invariants to vm_page_busy() and vm_page_wakeup() to check for
PG_BUSY stupidity.
1999-01-24 01:05:15 +00:00
Matthew Dillon
c9fa34cf07 Clear PG_WRITEABLE in vm_page_cache(). This may or may not be a bug,
but the bit should definitely be cleared.
1999-01-24 01:04:04 +00:00
Matthew Dillon
8e3ad7c918 Depreciate vm_object_pmap_copy() - nobody uses it. Everyone uses
vm_object_pmap_copt_1() now, apparently.
1999-01-24 01:01:38 +00:00
Matthew Dillon
bc6d84a6a3 Get rid of unused old_m in vm_fault. Add INVARIANTS to test whether
page is still busy after all the hell vm_fault goes through.. it is
    supposed to be, and printf() if it isn't.  don't panic, though.
1999-01-24 00:55:04 +00:00
Matthew Dillon
377f9b28a6 Don't try to calculate B_CACHE for an NFS related bp that has a
> 0 b_validend.  This will screw up small-writes, causing lots of
    little writes out the network.

    We will assume that NFS handles B_CACHE properly.
1999-01-24 00:51:11 +00:00
Mike Smith
1c2587457f Document root_disk_unit 1999-01-24 00:12:17 +00:00
Mike Smith
c679ae39a8 biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
	'num_ide_disks' and makes it possible to explicitly set the
	root device unit number regardless of type considerations.

bootinfo.c
	If we can't calculate a dev_t for the root disk, complain and
	don't proceed to boot with an invalid boot device.
1999-01-24 00:12:04 +00:00
Mike Smith
5d3d992565 Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't
guess this value well in anything other than the simplest of situations.
1999-01-24 00:10:10 +00:00
Archie Cobbs
85abbaa800 Move kernel-only declarations to within #ifdef KERNEL
Prompted by:	gcc warnings when compiling /sbin/ipfw
1999-01-23 23:59:50 +00:00
Nicolas Souchu
7b7bf77e65 Replace DEBUG by PLIP_DEBUG option 1999-01-23 17:07:49 +00:00
Nicolas Souchu
ef8f762601 Add various documented ppbus options 1999-01-23 17:06:01 +00:00
Doug Rabson
8a99777019 Update the alpha port to use the new syscons.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
1999-01-23 16:53:30 +00:00
Robert Nordier
a29a298674 Fix a dot too many in path.
PR:		9445
Noticed by:	Ying-Chieh Liao <ijliao@Terry.Dorm10.NCTU.edu.tw>
1999-01-23 14:50:28 +00:00
Roger Hardiman
2c401a831e Added detection of Hauppauge IR remote control.
and MSP34xx Audio chip. Fixed i2c read error.
Hauppauge supplied details of new Tuner Types.
Added tuner type 0x1a.
Danny Braniss <danny@cs.huji.ac.il> submitted Bt878
AverMedia detection with PCI subsystem vendor id.
1999-01-23 11:32:06 +00:00
Roger Hardiman
d3697a3ac3 Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Updated to support Hauppauge IR Remote Control
1999-01-23 11:28:16 +00:00
Kazutaka YOKOTA
fa18887740 Suppress warnings when compiling LINT. No functional change. 1999-01-23 10:55:16 +00:00
Kazutaka YOKOTA
c619f2ac1e - Remove reference to obsolete options.
- Describe options for the vga driver.
Reviewed by: bde
1999-01-23 10:51:58 +00:00
Matthew Dillon
fae1f2e045 Fix an expression parenthesization typo in a conditional. It should not
have any operational effects other then to make the code in question
     a little faster.  Also added a more involved comment.
1999-01-23 06:36:15 +00:00
Matthew Dillon
7615edaa49 Reenable John Dyson's low-memory VM_WAIT code for page reactivations out
of PQ_CACHE.  Add comments explaining what it accomplishes and its
    limitations.
1999-01-23 06:00:27 +00:00
Peter Wemm
461b36ab54 Update userref handling after discussion with submitter of previous
patch.  lf can't be dereferenced after the unload attempt, in case it
was freed.  Instead, decrement first and back it out if the unload failed.
This should be relatively immune to races caused by the user since the
userref count will be zero for the duration of the actual unloading and
will stop further kldunload attempts.

Submitted by:   Ustimenko Semen <semen@iclub.nsu.ru>
1999-01-23 03:45:22 +00:00
Peter Wemm
2c9b3ec2ff Make the -I paths closer to what happens when compiling as part of the
kernel where #include "filename.h" has been disabled.
1999-01-23 01:32:44 +00:00
Peter Wemm
e5ca2df920 Minor tweak to fix 'pseudo-device vinum'. One of these got lost before,
the other is a new file.
1999-01-23 01:29:05 +00:00
Peter Wemm
8492b0d178 Add vinumdaemon.c; sort vinum entries. 1999-01-23 01:25:59 +00:00
Peter Wemm
d2b5b9779e Oops, got my #ifdef's mixed up. Fix an unused variable warning. 1999-01-23 00:28:56 +00:00
Peter Wemm
013b59f2cb Remove stray Makefile that Greg initially imported. 1999-01-23 00:09:07 +00:00
Mike Smith
6a80a16d7d Add EXCEPTION word set.
Make TIB handling use buffer size to conform with ANS Forth.

Add ANS MEMORY-ALLOC word set.

See the PRs for extensive details.

PR:		kern/9412 kern/9442 kern/9514
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:52:59 +00:00
Mike Smith
b7fd9e91ed bootstrap.h
help.common
interp.c
	Rename the 'source' command to 'include' in order to avoid conflict
	with the ANS Forth command of the same name. (kern/9473)

interp_forth.c:
	Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer
	sizing) and an improved version of kern/9460 (set
	version numbers).

load_aout.c:
	Trim some obsolete #if 0'ed cruft.

pnp.c:
	Tidy the pnpscan output, turn off the module scanning until we
	sort out how to do it right.

PR:		kern/9412 kern/9442 kern/9460 kern/9473
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:50:14 +00:00
Peter Wemm
b7b98418bd Convert ccd to a proper module vs. something started by PSEUDO_SET(). 1999-01-22 22:38:28 +00:00
Nick Hibma
7613dbd346 add LEGSUP to uhci_dumpregs 1999-01-22 21:52:46 +00:00
Robert Nordier
9e4af42e20 Fix extraneous free() on error. 1999-01-22 21:33:52 +00:00
Robert Nordier
d0a4f5ea63 Fix read error not being detected. 1999-01-22 18:32:52 +00:00
Garrett Wollman
92af003dd8 Don't forward unicast packets received via link-layer multicast.
Suggested by: fenner
Original complaint: Shiva Shenoy <Shiva.Shenoy@yagosys.com>
1999-01-22 16:50:45 +00:00
Bill Paul
2008c8087c Multicast code isn't quite correct. The RealTek wants the upper six bits
of the CRC as the multicast hash table bit, not the lower six bits. Plus
we have to flip on all bits in the table for multicast mode.

Pointed out by: Kazushi SUGYO <k-sugyou@nwsl.mesh.ad.jp>
1999-01-22 15:25:04 +00:00
Robert Nordier
d7478bf0df Push version numbers up to 1.00. This is just intended to reflect
that the BTX code can be regarded as stable: there are no associated
code changes.

Suggested by: obrien
1999-01-22 13:07:17 +00:00
David Greenman
8ab2fa0073 Gutted softdep_deallocate_dependencies and replaced it with a panic. It
turns out to not be useful to unwind the dependencies and continue in
the face of a fatal error.
Also changed the log() to a printf() in softdep_error() so that it will
be output in the case of a impending panic.
Submitted by:	Kirk McKusick <mckusick@mckusick.com>
1999-01-22 09:07:32 +00:00
David Greenman
33ce4218c6 Don't throw away the buffer contents on a fatal write error; just mark
the buffer as still being dirty. This isn't a perfect solution, but
throwing away the buffer contents will often result in filesystem
corruption and this solution will at least correctly deal with transient
errors.
Submitted by:	Kirk McKusick <mckusick@mckusick.com>
1999-01-22 08:59:05 +00:00
Eivind Eklund
48b4c7d553 __FreeBSD_version -> 400000
Forgotten by:	Some anonymous release engineer
Reminded by:	bde
1999-01-22 08:39:58 +00:00
Nick Hibma
1f7b3fe5be forgotten in previous commit: Lowered default debug level 1999-01-22 01:02:24 +00:00
Nick Hibma
ab521a755e Fixed disconnect for umouse 1999-01-22 00:59:52 +00:00
Nick Hibma
066f67b1ac Make uhub mandatory in usb config (msmith) 1999-01-22 00:57:47 +00:00
Nick Hibma
235dddd4ea Textual changes 1999-01-22 00:51:12 +00:00
Nick Hibma
5602b5091c Fixed bug in disconnect handling in uhub.c 1999-01-22 00:44:31 +00:00
Nick Hibma
a2a2fd2ce4 Added OPTi FireLink and NEC (Toshiba and others) to OHCI ID's 1999-01-22 00:36:46 +00:00
Nick Hibma
cf4e36da61 Fixed bug that made UHCI controllers fail to start. 1999-01-21 23:31:58 +00:00
Nick Hibma
88a610db55 Cleaning up, improving _detach, removing ominous warning (msmith) 1999-01-21 23:06:02 +00:00
Nick Hibma
f8c31e6fac Added ioctl interface 1999-01-21 22:56:10 +00:00
Mike Smith
4291c3b7ad Add 'set tunables' help, list the kernel tunable values that can currently
be overridden.
1999-01-21 22:03:16 +00:00
Mike Smith
8de6e8e102 Allow VM_KMEM_SIZE to be tuned from the kernel environment. This tuning
value *completely* overrides any value precalculated by the kernel.
1999-01-21 21:54:32 +00:00
Kazutaka YOKOTA
325fca905e Add VESA mode support. If the VESA support is compiled into the kernel
or the VESA KLD is preloaded by the boot loader, you can load a 256 color
BMP file larger than 320x200.
1999-01-21 18:29:33 +00:00
Peter Wemm
17cdafdef8 Oops, I accidently had devfs enabled in the vn module.. 1999-01-21 17:23:30 +00:00
Peter Wemm
7ed6908ffd Add vn module to build list. 1999-01-21 17:19:56 +00:00
Peter Wemm
ff598d17ce Build a vn module. I've lost count of the number of times I could have
used vn but didn't have it compiled in.
1999-01-21 17:18:34 +00:00
Peter Wemm
b453f58fcc Convert vn.c into a module (loadable and static). 1999-01-21 17:17:02 +00:00
Peter Wemm
334fab0d48 Typo: s/mdev/bdev/, added in rev 1.47 (must fix in RELENG_3 too) 1999-01-21 16:15:53 +00:00
Peter Wemm
a102abb259 Typo: s/bpreassignbuf/pbreassignbuf/ so the prototype matches it's function 1999-01-21 13:41:12 +00:00
Matthew Dillon
04d986a5fc Mainly changes to support the new swapper. The big adjustment is that
swap blocks are now in PAGE_SIZE'd increments instead of DEV_BSIZE'd
    increments.  We still convert to DEV_BSIZE'd increments for the
    backing store I/O, but everything else is in PAGE_SIZE increments.
1999-01-21 10:17:12 +00:00
Matthew Dillon
aa91dfc69b Move many of the vm_pager_*() functions from vm_pager.c to inlines in
vm_pager.h
1999-01-21 10:15:47 +00:00
Matthew Dillon
f85f2fa903 Move many of the vm_pager_*() functions from vm_pager.c to inlines in
vm_pager.h

     Added argument to getpbuf() and relpbuf() to allow each subsystem to
     specify a different hard limit on the number of simultanious physical
     bufferes that said subsystem may allocate.  Without this feature, one
     subsystem ( e.g. the vfs clustering code ) could hog *ALL* the pbufs,
     causing a deadlock in the pager in a low memory situation.

     Same for trypbuf().
1999-01-21 10:15:24 +00:00
Matthew Dillon
a489f7614b Reorganized some of the low memory testing code to make it more useful.
Removed call to vm_object_collapse(), which can block.  This was being
    called without the pageout code holding any sort of reference on the
    vm_object or vm_page_t structures being manipulated.  Since this code
    can block, it was possible for other kernel code to shred the state
    the pageout code was assuming remained intact.

    Fixed potential blocking condition in vm_pageout_page_free() ( which
    could cause a deadlock in a low-memory situation ).

    Currently there is a hack in-place to deal with clean filesystem meta-data
    polluting the inactive page queue.  John doesn't like the hack, and neither
    do I.

    Revamped and commented a portion of the pageout loop.

    Added protection against potential memory deadlocks with OBJT_VNODE
    when using VOP_ISLOCKED().  The problem is that vp->v_data can be NULL
    which causes VOP_ISLOCKED() to return a less informed answer.

    remove vm_pager_sync() -- none of the pagers use it any more ( the old
    swapper used to.  The new one does not ).
1999-01-21 10:12:54 +00:00
Matthew Dillon
41dbefba28 The TAILQ hashq has been turned into a singly-linked=list link,
reducing the size of vm_page_t.

    SWAPBLK_NONE and SWAPBLK_MASK are defined here.  These actually are
    more generalized then their names imply, but their placement is somewhat
    of a legacy issue from a prior test version of this code that put
    the swapblk in the vm_page_t structure.  That test code was eventually
    thrown away.  The legacy remains.

    Added vm_page_flash() inline.  Similar to vm_page_wakeup() except that
    it does not clear PG_BUSY ( one assumes that PG_BUSY is already clear ).
    Used by a number of routines to wakeup waiters.

    Collapsed some of the code in inline calls to make other inline calls.
    GCC will optimize this well and it reduces duplication.

    vm_page_free() and vm_page_free_zero() inlines added to convert to
    the proper vm_page_free_toq() call.

    vm_page_sleep_busy() inline added, replacing vm_page_sleep() ( which has
    been removed ).  This implements a much more optimizable page-waiting
    function.
1999-01-21 10:06:24 +00:00
Matthew Dillon
060282de8a The hash table used to be a table of doubly-link list headers ( two
pointers per entry ).  The table has been changed to a singly linked
    list of vm_page_t pointers.  The table has been doubled in size, but
    the entries only take half the space so a net-zero change in memory use.

    The hash function has been changed, hopefully for the better.  The
    combination of the larger hash table size of changed function should
    keep the chain length down to a reasonable number (0-3, average 1).

    vm_object->page_hint has been removed.  This 'optimization' was not
    only never needed, but costs as much as a hash chain link to implement.
    While having page_hint in vm_object might result in better locality
    of reference, the cost is not worth the space in vm_object or the
    extra instructions in my view.

    vm_page_alloc*() functions have been inlined and call a generalized
    non-inlined vm_page_alloc_toq() which combines the standard alloc
    and zero-page alloc functions together, reducing code size and the L1
    cache footprint.  Some reordering has been done... not much.  The
    delinking code should be faster ( because unlinking a doubly-linked list
    requires four memory ops and unlinking a singly linked list only requires
    two ), and we get a hash consistancy check for free.

    vm_page_rename() now automatically sets the page's dirty bits.

    vm_page_alloc() does not try to manually inline freeing a cache page.
    Instead, it now properly calls vm_page_free(m) ... vm_page_free() is
    really too complex to manually inline.

    vm_await(), supporting asleep(), has been added.
1999-01-21 10:01:49 +00:00
Matthew Dillon
48f1335479 The vm_object structure is now somewhat smaller due to the removal
of most of the swap-pager-specific fields, the removal of the id,
    and the removal of paging_offset.

    A new inline, vm_object_pip_wakeupn() has been added to subtract an
    arbitrary number n from the paging_in_progress count and then wakeup
    waiters as necessary.  n may be 0, resulting in a 'flash'.
1999-01-21 09:51:21 +00:00
Matthew Dillon
7bc9e80ecc object->id was badly implemented. It has simply been removed.
object->paging_offset has been removed - it was used to optimize a
    single OBJT_SWAP collapse case yet introduced massive confusion throughout
    vm_object.c.  The optimization was inconsequential except for the
    claim that it didn't have to allocate any memory.  The optimization
    has been removed.

    madvise() has been fixed.  The old madvise() could be made to operate
    on shared objects which is a big no-no.  The new one is much more careful
    in what it modifies.  MADV_FREE was totally broken and has now been fixed.

    vm_page_rename() now automatically dirties a page, so explicit dirtying
    of the page prior to calling vm_page_rename() has been removed.
1999-01-21 09:46:55 +00:00
Matthew Dillon
e4ba1db60a Objects associated with raw devices are no longer counted in the VM stats
total because they may contain absurd numbers ( like the size of all
    of physical memory if you mmap() /dev/mem ).
1999-01-21 09:41:52 +00:00
Matthew Dillon
81522c62fa General cleanup related to the new pager. We no longer have to worry
about conversions of objects to OBJT_SWAP, it is done automatically
    now.

    Replaced manually inserted code with inline calls for busy waiting on
    pages, which also incidently fixes a potential PG_BUSY race due to
    the code not running at splvm().

    vm_objects no longer have a paging_offset field ( see vm/vm_object.c )
1999-01-21 09:40:48 +00:00
Matthew Dillon
1d58b2bc7d Potential bug fix, do not just clear PG_BUSY... call vm_page_wakeup()
instead to properly handle any waiters.

    Added comments, added support for M_ASLEEP.  Generally treat M_ flags
    as flags instead of constants to compare against.
1999-01-21 09:38:20 +00:00
Matthew Dillon
6de6079300 Removed low-memory blockages at fork. This is the wrong place to put
this sort of test.  We need to fix the low-memory handling in general.
1999-01-21 09:36:23 +00:00
Matthew Dillon
4c23ae0916 Mainly cleanup. Removed some inappropriate low-memory handling code
and added lots of comments.  Add tie-in to vm_pager ( and thus the
    new swapper ) to deallocate backing swap for dirtied pages on the fly.
1999-01-21 09:35:38 +00:00
Matthew Dillon
9f6fed9017 The default_pager's interaction with the swap_pager has been reorganized,
and the swap_pager has been completely replaced.

    The new swap pager uses the new blist radix-tree based bitmap allocator
    for low level swap allocation and deallocation.   The new allocator
    is effectively O(5) while the old one was O(N), and the new allocator
    allocates all required memory at init time rather then at allocate
    memory on the fly at run time.

    Swap metadata is allocated in clusters and stored in a hash table,
    eliminating linearly allocated structures.

    Many, many features have been rewritten or added.  Swap space is now
    reallocated on the fly providing a poor-mans auto defragmentation of
    swap space.  Swap space that is no longer needed is freed on a timely
    basis so no garbage collection is necessary.

    Swap I/O is marked B_ASYNC and NFS has been fixed to do the right
    thing with it, so NFS-based paging now has around 10x the performance
    as it did before ( previously NFS enforced synchronous I/O for paging ).
1999-01-21 09:33:07 +00:00
Matthew Dillon
50c7d0d513 Added support for VOP_FREEBLKS(), reducing MFS's impact on swap and
increasing performance by deallocating at least some of the backing
    store when files are removed.

    Protect mfsp->buf_queue access at splbio().
1999-01-21 09:27:03 +00:00
Matthew Dillon
3fe2487dfc Access to mfsp->buf_queue must be protected at splbio(). Other minor
adjustments also made, such as passing mfsp to mfs_doio() directly.
1999-01-21 09:24:46 +00:00
Eivind Eklund
053a2b61f7 Move EXT2FS to be more visible, and give it a description. Also make
the text from my last commit somewhat better.
1999-01-21 09:24:28 +00:00
Matthew Dillon
fa70685a6c Renamed M_KERNEL to a more appropriate M_USE_RESERVE. 1999-01-21 09:23:21 +00:00
Matthew Dillon
8618c644e4 The main operational changes are in getblk()'s handling of the
B_DELWRI and B_CACHE flags, fixing a bug that showed up with NFS.
    Also, a number of cases where manually inserted code has been removed
    and replaced with an inline function call giving us better functional
    isolation in the source.
1999-01-21 09:19:33 +00:00
Matthew Dillon
39ebd17269 The code that reclaims descriptors from in-transit unix domain
descriptor-passing messages was calling sorflush() without checking
    to see if the descriptor was actually a socket.  This can cause a
    crash by exiting programs that use the mechanism under certain
    circumstances.
1999-01-21 09:02:18 +00:00
Matthew Dillon
0069f505eb Fixed a potential bug ( but maybe not ), where sendfile() clears PG_BUSY
on a page without testing for waiters.  Also collapsed busy wait into
    new vm_page_sleep_busy() inline ( see vm/vm_page.h )
1999-01-21 09:00:26 +00:00
Matthew Dillon
3701b35988 This module was used only by the old swapper and has been #if'd out,
and will be eventually removed if no other use is found for it.
1999-01-21 08:58:41 +00:00
Matthew Dillon
1c7c3c6a86 This is a rather large commit that encompasses the new swapper,
changes to the VM system to support the new swapper, VM bug
    fixes, several VM optimizations, and some additional revamping of the
    VM code.  The specific bug fixes will be documented with additional
    forced commits.  This commit is somewhat rough in regards to code
    cleanup issues.

Reviewed by:	"John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
1999-01-21 08:29:12 +00:00
Matthew Dillon
7090df5aed Add new blist module - radix tree based bitmap allocator with
size hinting.  Will be used by the new swapper.
1999-01-21 08:11:06 +00:00
Jordan K. Hubbard
391a151a77 This is now 4.0-current 1999-01-21 03:07:33 +00:00
Greg Lehey
33953e5e97 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Add field plexsdno to sd struct

Add flag VF_NEWBORN to drive, sd, plex and volume structs, indicating
that the object has just been created.

Add object types for raw (unattached) plexes and subdisks

Remove definitions of VOLNO, PLEXNO and SDNO (now functions Volno,
Plexno and Sdno)

Move revive parameters from struct plex to struct sd.

struct plex:
  maintain a count of the number of inaccessible subdisks.
  remove defective and unmapped regions.

Debug flags: make an enum (previously #define)

Set default revive block size to 64kB (was 32 kB)
1999-01-21 00:41:58 +00:00
Greg Lehey
5d6f3129b1 Retain some of the RAID5 texts even in the non-RAID5 versions.
Previously, accidentally starting the wrong version could corrupt
  the RAID5 configuration.

  Add functions Volno, Plexno and Sdno to replace the old defines
  VOLNO, PLEXNO and SDNO.
1999-01-21 00:41:31 +00:00
Greg Lehey
8a2cba6003 Remove states:
plex_reviving (now we revive subdisks)
  drive_coming_up (never happened)

Add state sd_reviving.
1999-01-21 00:40:50 +00:00
Greg Lehey
6d930639c3 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Serious rewrite.  No longer call set_<foo>_state to set the state
based only on other objects; instead, add functions
update_<foo>_state, which determine what the state should be by
themselves.  This allows the set_<foo>_state functions to shrink
enough to be almost intelligible.

Remove flags setstate_recurse and setstate_recursing.

Remove plex defective regions and unmapped regions, which were
maintained but not used.

Change code to allow daemon to perform operations formerly kludged
into an interrupt context.  Remove the DIRTYCONFIG kludge.
1999-01-21 00:40:32 +00:00
Greg Lehey
2178c45997 Change the style of revive: revive subdisks instead of plexes. This
makes it easier to keep track of which parts of a plex need reviving.

Use sdio, not vinumstrategy, to write to the subdisk.
1999-01-21 00:40:03 +00:00
Greg Lehey
7d077233f8 Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Remove #ifdefs for FreeBSD 2.c

vinumstrategy:
  Support anonymous (`raw') subdisks and plexes.
  Change code to allow daemon to perform operations formerly kludged
  into an interrupt context.  Remove the DIRTYCONFIG kludge.

No longer set B_ORDERED for reviving subdisks.  I suspect this
wouldn't work correctly, and it should be done in a different manner
in vinumrevive.c

sdio: set subdisk state correctly on error
      start to remove code that doesn't make any sense any more.
1999-01-21 00:39:36 +00:00
Greg Lehey
09c265ba75 Add keywords help, makedev, quit and setdaemon 1999-01-21 00:39:01 +00:00
Greg Lehey
cb4547a333 MMalloc: remove directory part of name correctly 1999-01-21 00:37:56 +00:00
Greg Lehey
ba40e00009 Create functions lockdrive and unlockdrive to handle drive locking 1999-01-21 00:37:38 +00:00
Greg Lehey
216e9f2046 Add keywords makedev, setdaemon and help. 1999-01-21 00:37:18 +00:00
Greg Lehey
2f4e1ffa11 Remove ioctls VINUM_GETUNMAPPED and VINUM_GETDEFECTIVE (we no longer
have regions).

Add definitions for VINUM_DAEMON, VINUM_FINDDAEMON and VINUM_DAEMON
1999-01-21 00:36:21 +00:00
Greg Lehey
c3dff4f036 Include Peter Wemm's renaming and restructuring
Remove #ifdefs for FreeBSD 2.c

Change from lkm to kld

correct type of `flags' in calls to set_drive_state.

set_drive_parms: handle anonymous drives correctly (remove them)

drive VOP functions: use the PID of the original opener to fool the
lock manager.

open_drive: be quiet about failures (they're normal when scanning the
partitions).

close_drive: lock drive before closing.

remove_drive: lock drive before deallocating.

read_drive_label: set drive up when all is OK

check_drive:
  Complete rewrite.  Offload most of the code to the new
  vinum_scandisk

format_config:
  use snprintf and %qd options to make much less emetic.
  Remove old supporting functions.

vinum_scandisk:
  Moved here from vinum.c
  Almost complete rewrite, incorporating much of what was check_drive.
  We still don't have a general way to find the drives on a system, so
  get the user to supply the names via the `read' command.  For each
  device, try each possible compatibility slice name (there's a danger
  of finding both /dev/da1h and /dev/da0s1h otherwise).  Sort the
  partitions found in reverse order of last update time and read them
  in, setting the `update' parameter to parse_config and descendents.

save_config: rename to daemon_save_config, since the function is now
called by the daemon.  Create a new function save_config which queues
the request with the daemon.

daemon_save_config:  some mods to allow for the unfamiliar
environment.
1999-01-21 00:35:35 +00:00
Greg Lehey
a01fbbe4ac Include Peter Wemm's renaming and restructuring
Change from lkm to kld

Recover from I/O errors by passing the request to the daemon, except
for plex I/O, which is not fault tolerant.
1999-01-21 00:34:14 +00:00