Commit Graph

5850 Commits

Author SHA1 Message Date
John Dyson
9ed7fc75ff Modification to vfs_cluster to allow clustering of NFS delayed writes.
Submitted by:	Doug Rabson <dfr@render.com>
1996-07-27 18:49:18 +00:00
John Dyson
34e95a26ec Under certain circumstances, reading the /proc/*/map file can
crash the system.  Nonexistant objects were not handled correctly.
1996-07-27 18:28:10 +00:00
John Dyson
bf6dfc7b35 Allow sequentially created mmap'ed anonymous regions to coalesce. There
is little or no reason to create a swap pager for small mmap's.  The
vm_map_insert code will automatically create a swap pager if the object
becomes too large.  This fix, per a request from phk.
1996-07-27 17:21:41 +00:00
Atsushi Murai
826702b23d Under the heavy load for transmiting condition, it will be write error
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by:	David Greenman <dg@root.com>
Submitted by:	amurai@spec.co.jp
1996-07-27 12:40:31 +00:00
John Dyson
3b297e93b8 Clean up some lint. 1996-07-27 04:22:12 +00:00
John Dyson
feb32a8fa9 Remove experimental header file. My test-build must have picked it
up in an unexpected place.
Submitted by:	jkh
1996-07-27 04:06:11 +00:00
John Dyson
29387b7bb6 Remove a totally unneeded (and as of the last VM commit, incorrect) call
to pmap_clear_modify.
1996-07-27 03:50:31 +00:00
John Dyson
819c1c6f43 Missing (prototype) change from the previous commit. 1996-07-27 03:47:35 +00:00
John Dyson
4f4d35edf0 This commit is meant to solve a couple of VM system problems or
performance issues.

	1) The pmap module has had too many inlines, and so the
	   object file is simply bigger than it needs to be.
	   Some common code is also merged into subroutines.
	2) Removal of some *evil* PHYS_TO_VM_PAGE macro calls.
	   Unfortunately, a few have needed to be added also.
	   The removal caused the need for more vm_page_lookups.
	   I added lookup hints to minimize the need for the
	   page table lookup operations.
	3) Removal of some bogus performance improvements, that
	   mostly made the code more complex (tracking individual
	   page table page updates unnecessarily).  Those improvements
	   actually hurt 386 processors perf (not that people who
	   worry about perf use 386 processors anymore :-)).
	4) Changed pv queue manipulations/structures to be TAILQ's.
	5) The pv queue code has had some performance problems since
	   day one.  Some significant scalability issues are resolved
	   by threading the pv entries from the pmap AND the physical
	   address instead of just the physical address.  This makes
	   certain pmap operations run much faster.  This does
	   not affect most micro-benchmarks, but should help loaded system
	   performance *significantly*.  DG helped and came up with most
	   of the solution for this one.
	6) Most if not all pmap bit operations follow the pattern:
		pmap_test_bit();
		pmap_clear_bit();
	   That made for twice the necessary pv list traversal.   The
	   pmap interface now supports only pmap_tc_bit type operations:
	   pmap_[test/clear]_modified, pmap_[test/clear]_referenced.
	   Additionally, the modified routine now takes a vm_page_t arg
	   instead of a phys address.  This eliminates a PHYS_TO_VM_PAGE
	   operation.
	7) Several rewrites of routines that contain redundant code to
	   use common routines, so that there is a greater likelihood of
	   keeping the cache footprint smaller.
1996-07-27 03:24:10 +00:00
Peter Wemm
66b8e416e6 ttysleep() can return EWOULDBLOCK, not ETIMEDOUT as the comment in tty.c
suggests.

Pointed out by: bde
1996-07-26 16:55:37 +00:00
Peter Wemm
446fe15067 Apply a bandaid to a problem elsewhere in the driver, when the process is
blocked in a write() while waiting for the output to drain, sleep only
for tp->t_timeout, not forever.  This only seems to happen when there is
either a modem lockup holding the hardware flow control down, or due to
some problem in the driver with processes attempting to write after the
modem has hung up (eg: elm, tf).
1996-07-26 13:47:38 +00:00
Garrett Wollman
949f380f38 Rename KERN_DOMAINNAME to KERN_NISDOMAINNAME so that it can't be confused
with a real Domain Name.

Suggested by: Keith Bostic
1996-07-25 18:02:40 +00:00
Satoshi Asami
34f3521636 Fail when odd number of disks are specified with mirror flag. Memory
leak fixes.  Miscellaneous cleanup.

Partially submitted by:	Matt White <mwhite+@CMU.EDU>
1996-07-24 23:45:24 +00:00
Poul-Henning Kamp
c74bb98638 DEVFS needs a special bdevvp().
I just noticed some junk in my patch.  I'll remove that in a sec.
1996-07-24 21:22:36 +00:00
Poul-Henning Kamp
e83cf165d6 DEVFS needs a special bdevvp(). 1996-07-24 21:21:43 +00:00
Garrett Wollman
fcd6781acb Fix a bug in ifa_ifwithnet() which caused a page fault in bcmp()
when attepmting to add certain types of routes.  This problem
only manifested itself in the presence of unconfigured point-to-point
interfaces.

Noticed by: Chuck Cranor <chuck@maria.wustl.edu>
1996-07-24 19:59:53 +00:00
Garrett Wollman
5e2d069649 Eliminate some more references to separate ip_v and ip_hl fields. 1996-07-24 18:46:19 +00:00
Poul-Henning Kamp
fe1624a4ff Revert my bdevsw change for wcd.c, Bruce pointed out that
this driver has bogus open/close entries.
1996-07-24 13:35:34 +00:00
Julian Elischer
e56dd1bb4f Submitted by: archie@whistle.com
slight cleanups on yesterday's patches
1996-07-23 22:00:14 +00:00
Poul-Henning Kamp
cba8a5ddd3 Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.

No functional change intended nor expected.

GENERIC should be about one k smaller now :-)
1996-07-23 21:52:43 +00:00
Garrett Wollman
f12c3c93de Fix a spelling error I forgot to bring over from my personal version
of the last (IF_ENQ_DROP) commit.
1996-07-23 14:44:46 +00:00
Satoshi Asami
92b4f2e0df Update to current state of PC98 world.
Submitted by:	The FreeBSD(98) development team
1996-07-23 07:46:59 +00:00
Julian Elischer
3a67d2bc37 Submitted by: archie@whistle.com
appletalk cleanups
1996-07-23 01:18:47 +00:00
Garrett Wollman
6f86639187 Add a new, better mechanism for sticking packets onto ifqueues.
The old system had the misfeature that the only policy it could implement
was tail-drop; the new IF_ENQ_DROP macro/function makes it possible
to implement more sophisticated queueing policies on a system-wide
basis.  No code actually uses this yet (although on my machine
I have converted the ethernet and (polled) loopback to use it).
1996-07-22 20:06:01 +00:00
Peter Wemm
9481c477f0 Don't dereference sc->sc_setmtu if it's NULL (such as when it's not running)
as discussed on current. (bde pointed out the cause of the problem)

Reported by: dev@fgate.flevel.co.uk
1996-07-21 17:14:06 +00:00
Poul-Henning Kamp
7c60604ada Add yet another kludge to this driver. Man page update to follow. 1996-07-21 09:28:50 +00:00
Poul-Henning Kamp
10bc064c3a Substitute raw{read|write} for ccd{read|write} 1996-07-21 09:28:03 +00:00
Joerg Wunsch
3135240845 Post-commit review by Bruce. Mostly stylistic changes.
Submitted by:	bde
1996-07-21 08:20:51 +00:00
Joerg Wunsch
5eb14f7e7c Replace the annoying calls to Debugger() by panic()'s in the
#ifdef DIAGNOSTIC case, and a warning only otherwise.

People who want them to break into the debugger can always set the
breakpoint explicitly.  The existing behaviour was a misfeature from
the beginning, in the (wrong) assumption that the SCSI controller must
always be of essential importance to the entire system.
1996-07-20 22:02:44 +00:00
Joerg Wunsch
f4de22acc7 Correct the timer2 acquiration and release, it must happen at splclock.
Also slightly reformatted so that it meets at least partially style(9),
and makes navigating through the functions easier.
1996-07-20 18:48:54 +00:00
Joerg Wunsch
99211adf2c Major cleanup of the timerX_{acquire,release} stuff. In particular,
make it more intelligible, improve the partially bogus locking, and
allow for a ``quick re-acquiration'' from a pending release of timer 0
that happened ``recently'', so it was not processed yet by clkintr().
This latter modification now finally allows to play XBoing over
pcaudio without losing sounds or getting complaints. ;-)  (XBoing
opens/writes/closes the sound device all over the day.)

Correct locking for sysbeep().

Extensively (:-) reviewed by:	bde
1996-07-20 18:47:23 +00:00
Alexander Langer
c616bf2a71 Removed extraneous return. 1996-07-20 00:16:20 +00:00
Stefan Eßer
76af5a923c Last night (local time :) I accidently checked in an intermediate version
of this patch, which had not actually been reviewed by Joerg or Paul!
(I'll better stop committing files after midnight ...)

I'm now commiting the latest code, which has been reported to work.

Minor correction to the previous commit message for this file:
The first PCI Lance in a system will get a name of lnc1, the second
will be known as lnc2 and so on. An arbitrary number of cards is
supported in a system ...
1996-07-19 17:18:20 +00:00
Atsushi Murai
0ed091876d Add interrupt register set up with original register value
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by:	"Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by:	amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
1996-07-19 13:20:05 +00:00
Stefan Eßer
c268c94f6b FINALLY: PCI support for the Lance Ethernet driver.
This code applies to several systems with integrated Ethernet
chip, for example from HP or Compaq. It should also support
PCI Ethernet cards based on the AMD PCI Lance chip.

This code has been reviewed (visually) by Paul Richards and
tested (using an ISA Lance board) by Joerg Wunsch.
Since the parameters to nearly each and every single function
had to be changed (generally from unit number to lnc_soft*),
there is some potential for buglets having crept in ...

BEWARE: If you had lnc0 configured to have the ISA probe find
your PCI Lance, then it should now be found by the PCI probe,
and should be automatically configured as pci1 (!!! note the "1").

Reviewed by:	paul, joerg
1996-07-18 22:03:47 +00:00
Julian Elischer
75d050aeaa some internal modems need LOTS of time to generate an interrupt
on demand.. increase DELAY from 1000 uS to 10000uS
1996-07-17 22:07:23 +00:00
Joerg Wunsch
cb9bf21103 Introduce two /dev/audio compat alias names for flushing and draining
the pcaudio device.  Now, XBoing sounds much better...
1996-07-17 20:18:56 +00:00
Bruce Evans
65d98215ea Fixed adjustment of `time' when timer0 is released. 27465 was 27645 in
a comment and in code that was only used when pcaudio was closed.  The
maximum error was 66 usec.
1996-07-17 11:26:05 +00:00
Doug Rabson
09c6884729 Various fixes from frank@fwi.uva.nl (Frank van der Linden) via
rick@snowhite.cis.uoguelph.ca:

1. Clear B_NEEDCOMMIT in nfs_write to make sure that dirty data is
correctly send to the server.  If a buffer was dirtied when it was in
the B_DELWRI+B_NEEDCOMMIT state, the state of the buffer was left
unchanged and when the buffer was later cleaned, just a commit rpc was
made to the server to complete the previous write.  Clearing
B_NEEDCOMMIT ensures that another write is made to the server.

2. If a server returned a server (for whatever reason) returned an
answer to a write RPC that implied that fewer bytes than requested
were written, bad things would happen.

3. The setattr operation passed on the atime in stead of the mtime to
the server. The fix is trivial.

4. XIDs always started at 0, but this caused some servers (older DEC
OSF/1 3.0 so I've been told) who had very long-lasting XID caches to
get confused if, after a reboot of a BSD client, RPCs came in with a
XID that had in the past been used before from that client. Patch is
to use the current time in seconds as a starting point for XIDs. The
patch below is not perfect, because it requires the root fs to be
mounted first. This is because of the check BSD systems do, comparing
FS time to system time.

Reviewed by:	Bruce Evans, Terry Lambert.
Obtained from:  frank@fwi.uva.nl (Frank van der Linden) via rick@snowhite.cis.uoguelph.ca
1996-07-16 10:19:45 +00:00
Nate Williams
20073b6d10 Moved declaration of zbuf outside of #ifdef DEVFS code. 1996-07-15 18:22:07 +00:00
Bruce Evans
6450111c1b Quick fix for previous commit: don't free zbuf on close since it may be
in use in another process that blocked in uiomove().
1996-07-15 05:23:04 +00:00
Alexander Langer
889fe95791 Switch back to logging accepted packets with the text "Allow" instead
of "Accept"
1996-07-14 21:12:52 +00:00
Joerg Wunsch
6bc025e10d Turn SCSIDEBUG into a new-style option. 1996-07-14 10:46:56 +00:00
John Dyson
f381a0c010 Almost gratuitious improvement of the performance of reading
/dev/zero.
1996-07-14 06:05:53 +00:00
John Dyson
d1a5be1064 A few minor mods (improvements) to support more efficient pipe
operations for large transfers.  There are essentially no differences
for small transfers, but big transfers should perform about 20%
better.
1996-07-13 22:52:50 +00:00
David Greenman
4611b39710 Enable transmit complete interrupt...
(author's explaination):

 Bit 15 is the flag to request a transmit complete interrupt.  The
driver was apparently written to minimize interrupts, and if not for a
3-COM design quirk, everything would be just ducky.
 Prior to loading the outbound packet into the FIFO, the driver checks
to see if there's enough space to contain the packet.  If not, the
driver requests a transmit-available interrupt when there is
sufficient room.  Unfortunately, the card is continuing to process the
prior FIFO, and by the time the driver sets the threshold for a
transmit available interrupt, the space is already available.  When
this occurs, the 3COM card ignores the interrupt request, and the
driver is hung waiting for an interrupt that will never occur.
There's probably a more elegant solution, but requesting the transmit
complete interrupt was the easiest to implement.  An alternative fix
might be to check free FIFO space again, after requesting the transmit
available interrupt, but I haven't bothered pursuing this.  Since the
patch, my 3C590 (PCI, same FIFO interface as 3C509) has been rock
solid.

Submitted by:	mevans@candle.com (Mike Evans)
1996-07-13 10:49:53 +00:00
Jordan K. Hubbard
51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
David Greenman
af7a299930 Fixed two bugs in previous commit: be sure to include tcp_debug.h when
TCPDEBUG is defined, and fix typo in TCPDEBUG2() macro.
1996-07-12 17:28:47 +00:00
Bill Fenner
32bd8943f8 Fix braino in rev 1.30 fix; m_copy() the mbuf that has the header
pulled up already.  This bug can cause the first packet from a source
to a group to be corrupted when it is delivered to a process listening
on the mrouter.
1996-07-12 17:22:32 +00:00
Peter Wemm
260afbaa5d Bump RELDATE in -current to be greater than RELDATE in -stable (and hence
2.1.5-RELEASE).  This will obviously be set "for real" closer to the time.

(some ports use this to differentiate the two branches /dev/kmem kernel
architectures.  This exact same procedure happened in November last year
for the 2.1 RELEASE as well.)
1996-07-12 11:21:57 +00:00