Commit Graph

2458 Commits

Author SHA1 Message Date
Bruce Evans
30ca037de1 Use dsname() to get consistent names. 1995-02-22 22:46:48 +00:00
Bruce Evans
268c424b23 Remove the #error that temporarily stopped this from supporting slices and
labels.

Please test the slice/label features:
	cd /dev; sh MAKEDEV svn0
	cd /var/tmp; dd if=/dev/zero of=vnfile bs=8192 count=1024
	vnconfig -c /dev/rvn0 /var/tmp/vnfile
	fdisk /dev/rvn0  # invent a geometry, create one BSD partition
	disklabel -r -w vn0 floppy  # a convenient (bogus) label
	disklabel -e vn0  # edit label to match device
	newfs /dev/rvn0a
	mount /dev/vn0a /mnt
	...
The steps after the fdisk could name the device vn0s1 instead of vn0.
1995-02-22 22:06:20 +00:00
Bruce Evans
ae623967ec Fix initialization of the copy of the label passed to setdisklabel().
Fix the sign of the adjustment after writing a label.

Writing of labels should work now.

Merge adjust_label() into fixlabel().  Detect more errors and don't
write if there is an error.  Adjust sectors/unit and total sectors
to the numbers on the slice.

Add a function dsname() to print slice device names consistently, and
use it.
1995-02-22 21:51:53 +00:00
Bruce Evans
60a411daf4 Add a prototype. 1995-02-22 21:24:21 +00:00
David Greenman
197611452d Added v_interrupt_free_min to cnt struct. 1995-02-22 18:06:49 +00:00
Stefan Eßer
fe5278a5cc Cleanup for compatibility with another OS.
Submitted by:	wolf
1995-02-22 18:04:56 +00:00
Stefan Eßer
d9dc2f74ef New PCI attach code:
PCI BIOS mappings are retained, except if option PCI_REMAP
is specified in the kernel config file.
There is now a list of attach addresses, and the first
address that seems to make some device registers appear
is chosen.

Reviewed by:	se
Submitted by:	wolf
1995-02-22 14:17:15 +00:00
Søren Schmidt
17ee9d00bc Next syscons update (given up on numbering :)
Removed screensavers from syscons, they are now LKM's. This makes it
possible to do some really "interesting" screensavers...
Fixed bug that sometimes caused garbage to appear when leaving
"scroll-lock" history.
Reformattet indentation, it got too deep for a normal 80 pos screen.
Split up in syscons.c & syscons.h for use with the saver-lkm's.
Temporarily removed -s option from vidcontrol, savers should now
be loaded with modload.
1995-02-22 13:48:07 +00:00
David Greenman
187f007190 Changed return value from vnode_pager_addr to be in DEV_BSIZE units so
that 9 bits aren't lost in the conversion. Changed all callers to expect
this. This allows paging on large (>2GB) filesystems.

Submitted by:	John Dyson
1995-02-22 10:34:34 +00:00
David Greenman
6f2b142ed8 vm_page.c:
Use request==VM_ALLOC_NORMAL rather than object!=kmem_object in deciding
if the caller is "important" in vm_page_alloc(). Also established a new
low threshold for non-interrupt allocations via cnt.v_interrupt_free_min.

vm_pageout.c:
Various algorithmic cleanup. Some calculations simplified. Initialize
cnt.v_interrupt_free_min to 2 pages.

Submitted by:	John Dyson
1995-02-22 10:27:24 +00:00
David Greenman
5e716206c0 Just return in the case of a page not on any queue in vm_page_unqueue().
Return VM_PAGE_BITS_ALL even if size > PAGE_SIZE in vm_page_bits().

Submitted by:	John Dyson
1995-02-22 10:16:21 +00:00
David Greenman
26f5e3ab12 Removed object locking code (it was a left over from an abortion that
was done a month or so ago).

Submitted by:	John Dyson
1995-02-22 10:06:43 +00:00
David Greenman
a7ac758ec7 Removed bogus copy object collapse check (the idea is right, but the
spcific check was bogus).
Removed old copy of vm_object_page_clean and took out the #if 1 around
the remaining one.

Submitted by:	John Dyson
1995-02-22 10:00:16 +00:00
David Greenman
a3a8bb29d2 vfs_cluster.c:
Various more tweaks from John Dyson to improve read ahead calculations.

vfs_subr.c:
Only wakeup if numoutput is 0 in vwakeup().

Submitted by:	John Dyson
1995-02-22 09:39:22 +00:00
David Greenman
701d45805b Added some code to make sure that buffers associated with directories and
metadata aren't thrashed by regular file I/O.
Added mechanism to limit the amount of outstanding I/O on a given vnode.
Pagedaemon wakeup policy changed to skew priority a little in favor of
file caching.
Slight code reorganization to improve clarity.
Added a few more comments.

Submitted by:	John Dyson
1995-02-22 09:30:13 +00:00
David Greenman
7a53944444 Only do object paging_in_progress wakeups if someone is waiting on this
condition.
Added some comments.

Submitted by:	John Dyson
1995-02-22 09:16:07 +00:00
David Greenman
c0503609a0 Only do object paging_in_progress wakeups if someone is waiting on this
condition.

Submitted by:	John Dyson
1995-02-22 09:15:35 +00:00
David Greenman
50ce2102e1 Rewrote MAP_PRIVATE case of vm_mmap() - all of the COW portion of this
routine was highly convoluted.

Submitted by:	John Dyson
1995-02-22 08:40:54 +00:00
Bruce Evans
6f05a6e836 Fix benign type mismatch. 1995-02-22 07:23:26 +00:00
Andrey A. Chernov
e1a0a1cdfb Increase retry count while reading toc, old one
isn't enough for spin up
1995-02-22 02:12:10 +00:00
Justin T. Gibbs
45e002218d Add a define for the SCSI_QUEUE_FULL sense message 1995-02-22 01:44:21 +00:00
Justin T. Gibbs
6d1dd577f3 Add tagged queueing support. Right now, we only allow two tagged
commands per target.  I could have followed the route of the ncr driver
and gone to great lengths to get the SCSI subsystem to support more, but
I think I'll use the time saved to help Julian and Peter make tagged
queuing a better handled generic feature.  This also includes some comment
and enum clean up and a possible fix for the hanging PCI controllers.
1995-02-22 01:43:25 +00:00
Justin T. Gibbs
7325b76b7d Add tagged queueing support to the aic7xxx sequencer code. 1995-02-22 01:37:52 +00:00
Andrey A. Chernov
39c88daba9 Implement tray closing and tray locking
Fix first open fails bug
1995-02-22 01:11:36 +00:00
Bruce Evans
2d091ecf19 Obtained from: memories of 1.1.5
Fix the sign of the timezone offset again.
1995-02-21 18:41:30 +00:00
Jordan K. Hubbard
9016a6c149 Remove FAT_CURSOR - it's deprecated.
Submitted by:	"Philippe Charnier" <charnier@lirmm.fr>
1995-02-21 13:42:57 +00:00
David Greenman
2c0bc39683 Panic if u_map allocation fails. 1995-02-21 12:06:06 +00:00
Bruce Evans
cf343b5640 Discard junk from partition tables when reading the tables for applications
the same as when initializing the in-core copies.  Adjust checksums in
labels after adjusting labels.  This finishes fudging the on-disk label to
make it coherent with the in-core label.

Handle EIO during initialization better.

Initialize the compatibility slice to the whole disk If there are no real
slices.

Don't warn about adjusting offsets in the label to make the 'c' partition
start at 0.  The 'c' offset is now always absolute on-disk and 0 in-core
so an adjustment is usually required.

Don't confuse LABEL_PART with RAW_PART so much.

Check for partitions being within slices differently.
1995-02-21 08:38:24 +00:00
Bruce Evans
22544eb7a0 Don't generate any errors here other than EIO. An invalid partition
table is not an error, it just causes a smaller slice table.
1995-02-21 08:37:09 +00:00
Poul-Henning Kamp
d66cc71bb5 Speed md5 up around 30% by shorting out a couple of cumbersome
memcpy equivalent functions.
1995-02-21 06:01:49 +00:00
Jordan K. Hubbard
a34565af65 Totally get rid of the snic driver.
Submitted by:	davidg
1995-02-21 04:26:35 +00:00
David Greenman
2df771e5c0 vm_extern.h: removed vm_allocate_with_pager.
Removed vm_user.c...it's now completely deprecated.
1995-02-21 01:32:47 +00:00
David Greenman
92a63cbb92 Removed vm_user.c. 1995-02-21 01:31:14 +00:00
David Greenman
7fb0c17ed2 Deprecated remaining use of vm_deallocate. Deprecated vm_allocate_with_
pager(). Almost completely rewrote vm_mmap(); when John gets done with
the bottom half, it will be a complete rewrite. Deprecated most use of
vm_object_setpager(). Removed side effect of setting object persist
in vm_object_enter and moved this into the pager(s). A few other
cosmetic changes.
1995-02-21 01:22:48 +00:00
David Greenman
d9459480fb Set page alloced for map entries as valid. 1995-02-21 01:13:05 +00:00
David Greenman
5d55f743e7 Added missing extern declaration for 'maxprocperuid'. 1995-02-21 00:37:31 +00:00
David Greenman
ffeec4aefe Removed vm_allocate(), vm_deallocate(), and vm_protect() functions. The
only function remaining in this file is vm_allocate_with_pager(), and this
will be going RSN. The file will be removed when this happens.
1995-02-20 23:58:10 +00:00
David Greenman
91ee94544a Use of vm_allocate and vm_deallocate has been deprecated. 1995-02-20 23:52:39 +00:00
David Greenman
0c1dacbc5c Moved ACT_MAX, ACT_ADVANCE, and ACT_DECLINE to vm_page.h. 1995-02-20 23:35:45 +00:00
David Greenman
68940ac1a0 Use of vm_allocate() and vm_deallocate() has been deprecated. 1995-02-20 22:23:31 +00:00
Bruce Evans
7335113fc2 Fix restoring cpl in the swi_ast_phantom case. The system sometimes
returned to user mode without enabling ASTs.  The problem fixed itself
at the next syscall or non-FPU trap, if any.  It hung the system for
a test process that masked SIGFPE's and divided by zero.  The faulting
division was returned to endlessly and this gave plently of opportunities
for the swi_ast_phantom case to be reached; after it was reached the
system hung because the ASTs for preemption and SIGINT handling were
disabled.
1995-02-20 20:35:24 +00:00
Guido van Rooij
e6373c9ec0 Implement maxprocperuid and maxfilesperproc. They are tunable
via sysctl(8). The initial value of maxprocperuid is maxproc-1,
that of maxfilesperproc is maxfiles (untill maxfile will disappear)

Now it is at least possible to prohibit one user opening maxfiles

-Guido

Submitted by:
Obtained from:
1995-02-20 19:42:42 +00:00
David Greenman
a6e1b30301 vm_inherit function has been deprecated. 1995-02-20 18:08:18 +00:00
David Greenman
a1e5cf9de7 Stop using vm_allocate and vm_deallocate. 1995-02-20 17:36:36 +00:00
David Greenman
ff16eeefb0 VM for the kernel stack and page tables doesn't need to be explicitly
deallocated as it isn't inherited across the fork.
Use vm_map_find not vm_allocate.

Submitted by:	John Dyson
1995-02-20 17:26:21 +00:00
David Greenman
59a9ecebb5 Make sure process isn't swapped when messing with it.
Added missing newline to log() call.
1995-02-20 15:53:33 +00:00
David Greenman
38aa9fc375 Added missing newlines to calls to log(). 1995-02-20 15:48:46 +00:00
David Greenman
ba8da83911 Panic if object is deallocated too many times.
Slight change to reverse collapsing so that vm_object_deallocate doesn't
have to be called recursively.
Removed half of a previous fix - the renamed page during a collapse doesn't
need to be marked dirty because the pager backing store pointers are copied
- thus preserving the page's data. This assumes that pages without backing
store are always dirty (except perhaps for when they are first zeroed, but
this doesn't matter).
Switch order of two lines of code so that the correct pager is removed
from the hash list. The previous code bogusly passed a NULL pointer to
vm_object_remove(). The call to vm_object_remove() should be unnecessary
if named anonymous objects were being dealt with correctly. They are
currently marked as OBJ_INTERNAL, which really screws up things (such as
this).
1995-02-20 14:21:58 +00:00
David Greenman
d0686727c0 Don't allow act_count to exceed ACT_MAX when bumping it up.
Small optimization to vm_page_bits().

Submitted by:	John Dyson
1995-02-20 14:00:50 +00:00
David Greenman
d89ced81b2 Fully initialize pages returned via vm_page_alloc_contig() so that the
memory can be later freed.
1995-02-20 13:58:14 +00:00
Bruce Evans
a3f4faced6 Don't flush the message buffer when it fills up. 1995-02-19 15:02:26 +00:00
Jordan K. Hubbard
f1f0a0bf8b Remove the SCSI idsn line - it's permanantly dead. 1995-02-19 14:07:28 +00:00
Jordan K. Hubbard
d3a1cd614e remove gnu/scsi/nic5000.c - it's deprecated. 1995-02-19 14:06:29 +00:00
Gary Palmer
43decb5384 Bruces fixes for large filesystems
Submitted by:	Bruce Evans <bde@zeta.org.au>
1995-02-19 10:36:17 +00:00
David Greenman
9219d44e66 Truncate the pte address to a page boundry. This probably won't fix the
panic, but at least it's more correct.
1995-02-19 02:50:31 +00:00
Bruce Evans
bd6edcba54 Keep absolute offsets in on-disk labels for backwards compatibility. This
requires complications to adjust the offsets to relative when a block
containing the label is read and back to absolute when such a block is
written.  The adjustment is not made on the whole disk slice.

Don't allow setting the offset of partition C to nonzero in in-core labels.
This will cause some (nonstandard) disktab entries to fail.  They will
need to be changed to have relative offsets (and no partitions outside
of the slice).

Don't write protect the (nonexistent) label on the whole disk slice.

Writing labels and bootstraps should work right now (except if there is
no DOSpartition table).
1995-02-18 22:10:44 +00:00
Bruce Evans
9d2ccc8e66 New field b_biodone_chain to support nested b_iodone's. 1995-02-18 21:12:33 +00:00
Bill Paul
188291d20f Do away with 'options SWAP_GENERIC' once and for all: I get ill
just thinking about it.

Two changes need to be made to allow 'config kernel swap generic' to
work properly without requiring any compile-time flags:

/usr/src/usr.sbin/config/mkswapconf.c: we need to define a dummy stub
for the setconf() function to replace the one in swapgeneric.c that
isn't available in non-generic configurations.

/usr/src/sys/i386/i386/autoconf.c: the -a boot flag causes setroot()
to be skipped and lets setconf() prompt the user for a root device.
If you skip setroot() in a non-generic kernel, you could get severely
hosed. To avoid this, we silently ignore the -a flag if rootdev != NODEV.
(rootdev is always initialized to NODEV in swapgeneric.c, so if
we find that rootdev is something other than NODEV, we know we're
not using a generic configuration.)
1995-02-18 18:05:35 +00:00
David Greenman
9b4814bba2 1) Added protection against collapsing OBJ_DEAD objects.
2) bump reference counts by 2 instead of 1 so that an object deallocate
   doesn't try to recursively collapse the object.
3) mark pages renamed during the collapse as dirty so that their contents
   are preserved.

Submitted by:	John and me.
1995-02-18 06:48:33 +00:00
David Greenman
0e65588688 Only clear B_VMIO in brelse() - a bunch of special processing is required
whenever this happens, and that wasn't occurring in some cases.
1995-02-18 02:55:09 +00:00
Bruce Evans
390784fbeb Undo the busy latch changes made in the previous revision. They broke
some 386/387 systems.

Don't print the IRQ number twice in the boot diagnostics.
1995-02-17 19:38:13 +00:00
Stefan Eßer
3453c5d5db Improve diagnostics:
Test for correct execution of cache test script by NCR,
and give meaningful error description if it fails.
(A cache problem was reported before.)
Don't wait forever for cache test to complete (to protect
against faulty hardware).

Submitted by:	wolf
1995-02-17 16:45:08 +00:00
Jordan K. Hubbard
f1f041888e Remove the ISDN dialer from LINT until it's working. 1995-02-17 09:33:29 +00:00
Bruce Evans
94a7cbb03e Restore alphabetical order (except gnu is last). 1995-02-17 08:45:59 +00:00
Poul-Henning Kamp
648c711bb4 This is the latest version of the APM stuff from HOSOKAWA, I have looked
briefly over it, and see some serious architectural issues in this stuff.

On the other hand, I doubt that we will have any solution to these issues
before 2.1, so we might as well leave this in.

Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much
in the normal case.

Reviewed by:	phk
Submitted by:	HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
1995-02-17 02:22:57 +00:00
Garrett Wollman
c7a82f9016 Include missing <sys/kernel.h> for `hz'.
Submitted by:  David Greenman, Rod Grimes, Christoph Kukulies
1995-02-17 00:29:42 +00:00
Bruce Evans
7a867ed547 Add compatibility cruft.
Slice 0 is now for the first BSD slice.  The first BSD slice is
the first DOSpartition with id 0xa5 or the whole disk if their
are no DOSpartitions (except the latter is not yet implemented).
Existing partitions on it work the same as in 2.0 except the
'd' partition is no longer special and partitions are relative
to the skice.

Slice 1 is now for the whole disk and gets a read-only label
describing the disk.  Previously, slice 0 was for the whole disk
and there was no label on it.

Slices 2-31 are for DOSpartitions.  Slice 0 is an alias for one
of these if there is a BSD slice.  Previously, slices 1-31 were
for DOSpartitions.

diskslice_machdep.c:
Expand whole disk slice to include all DOSpartitions.  More work
is required for >1024 cylinders and to rewrite the label iff the
driver is unsure about the geometry.

subr_diskslice.c:
New function dsisopen() to help handle media changes.
1995-02-16 15:19:19 +00:00
Bruce Evans
2987d72f4a Adjust for rearranged slice numbers. 1995-02-16 15:06:09 +00:00
Bruce Evans
de13c90ff2 Adjust slice names in diskerr() for the rearranged slice numbers. The
mapping from numbers to names is messy for backwards compatibility.
E.g., for driver "sd", unit "0":

slice 0: omit the slice number for compatibility; names are sd0[a-h].
slice 1: omit the partition letter 'c' because the whole disk device
         shouldn't have anything to do with partitions; sd0 is the
         only name.
slices 2-31: subtract 1 from slice number to compensate for the
         compatibility slice 0; names are sd0s[1-30][a-h].
1995-02-16 14:47:38 +00:00
Bruce Evans
b10eec80c5 Rearrange slice numbers for compatibility. 1995-02-16 13:35:21 +00:00
Bruce Evans
ceb91b3e4a Fix syntax errors in #ifdefed out code. 1995-02-16 13:21:47 +00:00
Bruce Evans
59c0a09db6 Temporarily stop this compiling if the option TEST_LABELLING is defined
so that new slice support code can be installed without risk of
corrupting vn devices (if any).
1995-02-16 13:09:39 +00:00
Jordan K. Hubbard
6129798f6a Update this a little, though we probably need to either nuke or rename it! 1995-02-16 12:02:08 +00:00
Joerg Wunsch
3ab1adc555 Alow overriding of the various SHM* options.
Submitted by:	Heikki Suonsivu <hsu@fx7.cs.hut.fi>
1995-02-16 11:29:19 +00:00
Jordan K. Hubbard
1d5f5f9312 Fix a few bogons introduced when config lost the 3 char limitation. 1995-02-16 08:06:28 +00:00
Bill Paul
fbf23e9a0b Minor changes and additions to the serial README file. 1995-02-16 07:37:35 +00:00
Garrett Wollman
cb04d5c55b Don't need to retransmit FIN bit in CLOSING state.
Obtained from: Stevens, vol. 2, exercise 29.5 (solution p. 1090)
1995-02-16 01:53:31 +00:00
Garrett Wollman
1c09f77422 spl back down in unusual out-of-memory condition in udp_output().
Obtained from: Stevens, vol. 2, exercise 23.4 (solution p. 1083)
1995-02-16 01:47:36 +00:00
Garrett Wollman
1fdbc7ae46 Correctly initialize so_linger in ticks (not seconds).
Obtained from: Stevens, vol. 2, p. 1010
1995-02-16 01:42:45 +00:00
Garrett Wollman
dac2030182 Avoid deadlock situation described by Stevens using his suggested replacement
code.

Obtained from: Stevens, vol. 2, pp. 959-960
1995-02-16 01:39:19 +00:00
Garrett Wollman
9bb8795d71 Don't add back in the IP header length to ip_len; icmp_error will do it
for us.

Obtained from: Stevens, vol. 2, p. 774
1995-02-16 01:25:06 +00:00
Garrett Wollman
39052a0eeb Attempting to bind() or connect() a routing socket, while meaningless,
shouldn't cause a panic.

Obtained from: Stevens, vol. 2, p. 667
1995-02-16 01:11:38 +00:00
Garrett Wollman
5f540404a8 getsockopt(s, SOL_SOCKET, SO_SNDTIMEO, ...) would construct the returned
timeval incorrectly, truncating the usec part.

Obtained from: Stevens vol. 2 p. 548
1995-02-16 01:07:43 +00:00
Garrett Wollman
41f82abe5a Transaction TCP support now standard. Hack away! 1995-02-16 00:55:44 +00:00
David Greenman
eb2463e1fc Fixed botched previous change - use 'pageno' not initialized to NULL 'kva'.
Submitted by:	Lars Fredriksen
1995-02-16 00:41:16 +00:00
Garrett Wollman
f2ea20e676 Add lots of useful MIB variables and a few not-so-useful ones for
completeness.
1995-02-16 00:27:47 +00:00
Andrey A. Chernov
93a56d1fd1 Restore deleted in second time my & bde fixes.
UGEN STOP IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1995-02-15 22:25:51 +00:00
Joerg Wunsch
c851c2f0ea Include three lines about the pcvt console driver, so we don't ever need
a different config file for it.
1995-02-15 20:38:36 +00:00
Stefan Eßer
6977dc165f For the sake of people, who like to move pci_configure()
before isa_configure() in autoconf.c:

ncr_intr() protected by splbio()/splx()

Submitted by:	wolf
1995-02-15 20:06:38 +00:00
Ugen J.S. Antsilevich
964587caee More changes to support user calls.
It's 22:00  here,utility still to come(hopefully tomorrow
morning..)
1995-02-15 18:41:57 +00:00
Bruce Evans
ae5e131ac8 Avoid duplicating ttselect() so that we don't have to change cyselect()
when ttselect() is improved.  This requires using an array of tty structs
and not using ttymalloc().

Fix an off by 1 error.  Some caclulations seem to be off by a factor
of NCY.  NCY defaults to 16, which gives 256 tty structs occupying
0xd000 bytes.  The minor number encoding only allows 16 ttys.

Update the types of timeout functions to 2.0.
1995-02-15 18:41:41 +00:00
Ugen J.S. Antsilevich
73bac2c219 More changes to support user calls. 1995-02-15 18:41:21 +00:00
Ugen J.S. Antsilevich
019b4d63ae Fix couple of nasty bugs..
- Overflow now calculated right
- Close works ok,does not looses tty
- Better overflow handling now the snooping stops
   on overflow,but programm notified and can reconnect if
   it want to..Default maximal buffer set to 664 K and this
   is probably too much..:)))
Utility still to come
1995-02-15 16:35:38 +00:00
Ugen J.S. Antsilevich
1bf407a7a5 Add more flags to snoop device 1995-02-15 16:33:16 +00:00
Bruce Evans
23564ff8c3 Remove duplicated code from ttymalloc(). Disable ttyfree().
Restore fixes to flushing that were lost in the previous commit.

Clean up snoop changes.

Add my TODO list from 1.1.5.  The improvements in 1.1.5 should be "obtained"
first.
1995-02-15 16:00:56 +00:00
David Greenman
919364ea6a Use proc0's proc struct rather than curproc's when calling sync. 1995-02-15 12:27:01 +00:00
Jordan K. Hubbard
8c324d5fb8 Whap a few things not used in the Cyclades driver, at least not for now. 1995-02-15 12:01:24 +00:00
Jordan K. Hubbard
7b2e66b08b Fix a few more nits. Should compile better now! :_) 1995-02-15 11:59:41 +00:00
David Greenman
402cc72db6 Fixed bug caused by attempting a connect with a null 'nam'. 1995-02-15 11:30:35 +00:00
David Greenman
ca40da7417 Don't bother calling pmap_create() when creating the temporary map.
The whole COW section of vm_mmap() should be rewritten; the current
implementation is highly convoluted.
1995-02-15 09:22:17 +00:00