Commit Graph

5543 Commits

Author SHA1 Message Date
John Dyson
b182ec9eb4 After careful review by David Greenman and myself, David had found a
case where blocking can occur, thereby giving other process's a chance
to modify the queue where a page resides.  This could cause numerous
process and system failures.
1996-05-29 05:15:33 +00:00
John Dyson
a5b6fd29a3 Make sure that pageout deadlocks cannot occur. There is a problem
that the datastructures needed to support the swap pager can take
enough space to fully deplete system memory, and cause a deadlock.
This change keeps large objects from being filled with dirty pages
without the appropriate swap pager datastructures.  Right now,
default objects greater than 1/4 the size of available system memory
are converted to swap objects, thereby eliminating the risk of deadlock.
1996-05-29 05:12:23 +00:00
John Dyson
256951297d The wrong address (pindex) was being used for the page table directory. No
negative side effects right now, but just a clean-up.
1996-05-29 05:09:07 +00:00
Justin T. Gibbs
070d32b1a9 Fix a race condition in p_mesgout* and inb* code that could allow a
phasemiss to sneak by without detection.  This should fix the
Wide/Narrow boot problems that have been reported since this bug
caused the driver ignore a narrow target rejecting wide negotiation.
1996-05-27 23:16:55 +00:00
Gary Palmer
d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Poul-Henning Kamp
b13f884281 Cleanup the last of the assembly time "-KERNBASE" relocations. 1996-05-27 06:51:46 +00:00
Peter Wemm
d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00
Marc G. Fournier
51d976f16a added missing semicolon
Submitted by:	 Jeffrey Hsu <hsu@freefall.freebsd.org>
1996-05-26 22:05:36 +00:00
Poul-Henning Kamp
d0aa157d5b If tunnel is busy we return EBUSY, not ENXIO. 1996-05-26 17:04:48 +00:00
John Dyson
85a376eb93 Fix a couple of problems in the pageout_scan routine. First, there is
a condition when blocking can occur, and the daemon did not check properly
for a page remaining on the expected queue.  Additionally, the inactive
target was being set much too large for small memory machines.  It is now
being calculated based upon the amount of user memory available on every
pageout daemon run.  Another problem was that if memory was very low, the
pageout daemon could fail repeatedly to traverse the inactive queue.
1996-05-26 07:52:09 +00:00
John Dyson
0ed4376231 I think this covers (fixes) the last batch of freeing active/held/busy page
problem.  BY MISTAKE, the vm_page_unqueue (or equiv) was removed from the
vm_fault code.  Really bad things appear to happen if a page is on a queue
while it is being faulted.
1996-05-26 05:30:33 +00:00
Wolfram Schneider
53996faddb Add some comments for variables and targets. 1996-05-25 23:09:49 +00:00
Peter Wemm
472fe5e4db Dont allow directories to be link()ed or unlink()ed, even for root
(returns EPERM always, the errno is specified by POSIX).

If you really have a desperate need to link or unlink a directory, you
can use fsdb. :-)

This should stop any chance of ftpd, rdist, "rm -rf", etc from
bugging out and damaging the filesystem structure or loosing races
with malicious users.

Reviewed by: davidg, bde
1996-05-24 16:19:23 +00:00
Justin T. Gibbs
c6841cd18f Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.

Closes PR:i386/1243
Submitted by:	flash@eru.tubank.msk.su
1996-05-24 15:22:36 +00:00
John Dyson
301051a01e Make sure that we don't place a busy or held page onto the PQ_CACHE queue. 1996-05-24 05:21:58 +00:00
John Dyson
f777ab7b8b Add an assert to vm_page_cache. We should never cache a dirty page. 1996-05-24 05:20:15 +00:00
John Dyson
1eeaa1e31f Add apparently needed splvm protection to the active queue, and eliminate
an unnecessary test for dirty pages if it is already known to be dirty.
1996-05-24 05:19:15 +00:00
John Dyson
3077a9c2f4 Eliminate inefficient check for dirty pages for pages in the PQ_CACHE
queue.  Also, modify the MADV_FREE policy (it probably still isn't the final
version.)
1996-05-24 05:17:21 +00:00
John Dyson
a9d4727439 Make the conversion from the default pager to swap pager more robust
in the face of low memory conditions.
1996-05-24 05:14:44 +00:00
John Dyson
c51bd6784e Change the *evil* allocation of memory from kmem_map to the kernel_map.
This will mess things up especially recently.
1996-05-24 01:39:50 +00:00
Julian Elischer
655929bfba Obtained from: netatalk distribution netatalk@itd.umich.edu
Kernel Appletalk protocol support
both CAP and netatalk can make use of this..
still needs some owrk but  it seemd the right tiime to commit it
so other can experiment.
1996-05-24 01:35:45 +00:00
Garrett Wollman
f66e235a13 Add an incremental checksum update routine. Perhaps some i386 assembly
guru out there can find a way to take advantage of little-endianness to
make this computation more efficient.  (I am certain that it can be done,
but haven't managed to make it work myself.)
1996-05-23 20:11:48 +00:00
Justin T. Gibbs
087b79e649 Correct a botched commit from yesturday. It helps to bring over the
right patch file.<sigh>
1996-05-23 15:02:18 +00:00
John Dyson
99ea1af0a6 Eliminate a vm_page_free, busy panic, in kern_malloc. 1996-05-23 02:24:55 +00:00
John Dyson
0a47b48b9f Initial support for MADV_FREE, support for pages that we don't care
about the contents anymore.  This gives us alot of the advantage of
freeing individual pages through munmap, but with almost none of the
overhead.
1996-05-23 00:45:58 +00:00
Garrett Wollman
f9493383fc Conditionalize calls to IPFW code on COMPAT_IPFW. This is done slightly
unconventionally:
	If COMPAT_IPFW is not defined, or if it is defined to 1, enable;
otherwise, disable.

This means that these changes actually have no effect on anyone at the
moment.  (It just makes it easier for me to keep my code in sync.)
In the future, the `not defined' part of the hack should be eliminated,
but doing this now would require everyone to change their config files.

The same conditionals need to be made in ip_input.c as well for this to
ave any useful effect, but I'm not ready to do that right now.
1996-05-22 17:23:09 +00:00
Peter Wemm
cd61f6c584 Fix harmless warning.. pmap_nw_modified was not having it's arg
cast to pt_entry_t like the others inside the DIAGNOSTIC code.
1996-05-22 17:07:14 +00:00
Justin T. Gibbs
393ca4686c Setup ULTRAEN in SXFRCTL0 to match the syncrate we are using during the
call of ahc_scsirate.  Otherwise, the proper setting may not get set until
the next reconnection/selection.

The saved_queue used to re-order the QINFIFO during error recovery or
certain SCB paging operations should be an array of u_chars not ints.

saved_queue type error pointed out by: Noriyuki Soda <soda@sra.co.jp>
1996-05-22 15:32:28 +00:00
John Dyson
93d52b3c56 A serious error in pmap.c(pmap_remove) is corrected by this. When
comparing the PTD pointers, they needed to be masked by PG_FRAME, and
they weren't.  Also, the "improved" non-386 code wasn't really an
improvement, so I simplified and fixed the code.  This might have
caused some of the panics caused by the VM megacommit.
1996-05-22 04:17:17 +00:00
Dima Ruban
2dfdc2cd79 "board not responding" -> "board is not responding"
Reviewed by:	gibbs
1996-05-22 00:04:12 +00:00
Peter Wemm
ce8c72b147 Fix an embarresing error on my part that made the IP_PORTRANGE options
return a failure code (even though it worked).
This commit brought to you by the 'C' keyword "break".. :-)
1996-05-21 20:47:31 +00:00
Garrett Wollman
1608c58429 Let the user know what errors are experienced on received packets.
I spent the better part of a day trying to figure out why my
experiment didn't work the way I expected, only to find out that
the router was dropping huge numbers of packets because of PCI bus
priblems.  This does not fix the bug that errors are counted as
input packets because my patch doesn't apply cleanly.
1996-05-21 19:05:31 +00:00
Justin T. Gibbs
0d12199628 It seems that the aic78X0 chips will either have their scratch ram
as all 0s or all 1s after POST if there is no BIOS installed.
1996-05-21 18:38:41 +00:00
Justin T. Gibbs
f6ca14f03c Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.

Remove all Ultra settings except for the top three that are documented
to work.  This fixes some problem reports with the last revision of the
driver since at least the 5.7MHz entry doesn't work in Ultra mode.
1996-05-21 18:37:25 +00:00
Justin T. Gibbs
61538c3003 Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.
1996-05-21 18:32:23 +00:00
John Dyson
4a62209c07 After reviewing the previous commit to vm_object, the page protection
is never necessary, not just for PG_FICTICIOUS.
1996-05-21 17:13:31 +00:00
John Dyson
07c647c528 Don't protect non-managed pages off during object rundown. This fixes
a hang that occurs under certain circumstances when exiting X.
1996-05-21 05:26:27 +00:00
John Dyson
ed48f831e0 To quote Stephen McKay: pmap_copy is a complex NOP at this moment :-).
With this fix from Stephen, we are getting the target fork performance
that I have been trying to attain: P5-166, before the mega-commit: 700-800usecs,
after: 600usecs, with Stephen's fix: 500usecs!!!  Also, this could be the
solution of some strange panic problems...
Reviewed by:	dyson@freebsd.org
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1996-05-21 00:39:39 +00:00
Joerg Wunsch
ef70eb9783 Correct a few mode page definitions according to the SCSI-2 specs.
Not yet used, but might perhaps be used in od(4) some day.
1996-05-19 19:29:09 +00:00
Joerg Wunsch
a77032a5a4 This patch updates sys/scsi/od.c:
* Improve ficticious geometry translation.
  * CD compatible ioctl's, CDIOCALLOW, CDIOCPREVENT and CDIOCEJECT.
  * Additional sense code handling for some drives.

Reviewed by:	joerg
Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-05-19 19:26:21 +00:00
John Dyson
867a482d66 Initial support for mincore and madvise. Both are almost fully
supported, except madvise does not page in with MADV_WILLNEED, and
MADV_DONTNEED doesn't force dirty pages out.
1996-05-19 07:36:50 +00:00
John Dyson
14bf02f8f4 Minor performance improvement to kern_malloc.c that increases the
probability of reuse of recently freed memory.  This improves cache
hit stats on cached memory, and improves at least fork speed consistancy.
1996-05-18 22:33:13 +00:00
Bill Fenner
9957f86096 Removed SIOCSETRTINFO, SIOCGETRTINFO, and SIOCGETVIFINF ioctl's, which
snuck in accidentally from the DARTNet kernel.  SIOC*RTINFO were an
extended interface to the stock routing table and SIOCGETVIFINF was
an interface for rsvpd to ask the kernel for the list of multicast vif's.

Pointed-out-by: Brian Reichert <reichert@internet.com>
1996-05-18 20:33:42 +00:00
Stefan Eßer
8408422768 Add support for NE2000 compatible PCI Ethernet cards. The PCI probe
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...

BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!

Reviewed by:	davidg
1996-05-18 17:56:42 +00:00
Stefan Eßer
4beaf036a6 Fix range check to actually test the variable that will be used as
an index later.

Submitted by:	Erich Stefan Boleyn <erich@uruk.org>
1996-05-18 17:32:20 +00:00
John Dyson
7f5fe93fc7 One more file missing from the mega-commit. This inlines some very
simple routines in vm_page.c, so that an unnecessary subroutine call
is removed.
1996-05-18 04:00:18 +00:00
John Dyson
1b4435b8ce File mistakenly left out of the previous mega-commit. This provides
a global defn for 'exech_map.'
1996-05-18 03:52:13 +00:00
John Dyson
b18bfc3da7 This set of commits to the VM system does the following, and contain
contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>,
Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me:

	More usage of the TAILQ macros.  Additional minor fix to queue.h.
	Performance enhancements to the pageout daemon.
		Addition of a wait in the case that the pageout daemon
		has to run immediately.
		Slightly modify the pageout algorithm.
	Significant revamp of the pmap/fork code:
		1) PTE's and UPAGES's are NO LONGER in the process's map.
		2) PTE's and UPAGES's reside in their own objects.
		3) TOTAL elimination of recursive page table pagefaults.
		4) The page directory now resides in the PTE object.
		5) Implemented pmap_copy, thereby speeding up fork time.
		6) Changed the pv entries so that the head is a pointer
		   and not an entire entry.
		7) Significant cleanup of pmap_protect, and pmap_remove.
		8) Removed significant amounts of machine dependent
		   fork code from vm_glue.  Pushed much of that code into
		   the machine dependent pmap module.
		9) Support more completely the reuse of already zeroed
		   pages (Page table pages and page directories) as being
		   already zeroed.
	Performance and code cleanups in vm_map:
		1) Improved and simplified allocation of map entries.
		2) Improved vm_map_copy code.
		3) Corrected some minor problems in the simplify code.
	Implemented splvm (combo of splbio and splimp.)  The VM code now
		seldom uses splhigh.
	Improved the speed of and simplified kmem_malloc.
	Minor mod to vm_fault to avoid using pre-zeroed pages in the case
		of objects with backing objects along with the already
		existant condition of having a vnode.  (If there is a backing
		object, there will likely be a COW...  With a COW, it isn't
		necessary to start with a pre-zeroed page.)
	Minor reorg of source to perhaps improve locality of ref.
1996-05-18 03:38:05 +00:00
Jordan K. Hubbard
734d08a223 A patch for the meteor device driver. It fixes:
1) A spelling error pointed out by Paco Hope.
       2) A bug in the range checking routing pointed out by Jim Bray.
       3) Enables the setting of frames per second.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
1996-05-17 09:43:15 +00:00
Andrey A. Chernov
49968bb8cf When two units swapped, copy SC_STATIC flag too, not clear it 1996-05-13 14:18:18 +00:00