Fixed remaining known bugs in the buffer IO and VM system.
vfs_bio.c:
Fixed some race conditions and locking bugs. Improved performance
by removing some (now) unnecessary code and fixing some broken
logic.
Fixed process accounting of # of FS outputs.
Properly handle NFS interrupts (B_EINTR).
(various)
Replaced calls to clrbuf() with calls to an optimized routine
call vfs_bio_clrbuf().
(various FS sync)
Sync out modified vnode_pager backed pages.
ffs_vnops.c:
Do two passes: Sync out file data first, then indirect blocks.
vm_fault.c:
Fixed deadly embrace caused by acquiring locks in the wrong order.
vnode_pager.c:
Changed to use buffer I/O system for writing out modified pages. This
should fix the problem with the modification date previous not getting
updated. Also dramatically simplifies the code. Note that this is
going to change in the future and be implemented via VOP_PUTPAGES().
vm_object.c:
Fixed a pile of bugs related to cleaning (vnode) objects. The performance
of vm_object_page_clean() is terrible when dealing with huge objects,
but this will change when we implement a binary tree to keep the object
pages sorted.
vm_pageout.c:
Fixed broken clustering of pageouts. Fixed race conditions and other
lockup style bugs in the scanning of pages. Improved performance.
drivers to protect DDB from being invoked while the console is in
process-controlled (i.e., graphics) mode.
Implement the logic to use this hook from within pcvt. (I'm sure
Søren will do the syscons part RSN).
I've still got one occasion where the system stalled, but my attempts
to trigger the situation artificially resulted int the expected
behaviour. It's hard to track bugs without the console and DDB
available. :-/
warnings and are cosmetic only. Poul once requested them, but neither
Sean nor Søren commented on them, so i commit it now before it's
getting lost some day.
card. This is the braindamaged card with the 80186 CPU on it. It is
slow, probably not very good after all, but hey, if you have one lying
around doing nothing anyway...
Added the "zp0" driver to GENERIC.
If a goto findpcb occurred during the processing of a segment, the TCP and
IP headers were dropped twice from the mbuf which resulted in data acked
by TCP but not delivered to the user.
Reviewed by: davidg
Added a new type to uiomove - "UIO_NOCOPY" which causes it to update
pointers and counts, but doesn't do any data copying. This is needed
for upcoming changes to the way that the vnode pager does its page
outs.
Added a new hash init function call "phashinit" that allocates and
initializes a prime number sized hash table.
vfs_cache.c:
Changed hashing algorithm to use the remainder of dividing by a prime
number to improve the distribution characteristcs. Uses new phashinit
function in kern_subr.c.
will cause kernel compiles to work even if the src/includes directory
doesn't exist but still do the 'Right Thing' and pull files from the
source tree if it does exist.
Reviewed by: Bruce Evans
#179). The fix implements a ttyhalfclose() (sort of), resetting the
session and pgrp pointers when the physical device is about to be
closed.
Suggested by: bde
old type (stty) ioctls can easily bypass locking bits.
It involves manual conversion from old ioctls to new ones,
large piece of code duplicated from tty_compat.c
so that these ioctls can be handled by the calling layer(s).
Clean up the recently added code:
- include the appropriate header to declare an implicitly declared function.
- declare timeout functions correctly and remove numerous bogus casts that
hid (but didn't fix) their incorrectness.
after ttioctl too, because it can change t_line.
Remove (TS_CNTTB | TS_LNCH) test, it is always inherits from
old tty mode and can't be reach in currently setted mode.
o the includes are now properly done by <sys/foo.h> instead of "foo.h"
o a bunch of undeclared functions has been resolved
o pcvt finally supports devconfig
When attempting to abort a command, don't assume that just because the
sequecer happens to have SCBPTR pointing at the scb we want that it is
an active command.
old value.
Remove unnecessary check for active messages in setup SCB. This same test
would also jump to p_mesgin_done which would "ACK" an extra time possibly
confusing the target.
Tell the kernel driver whenever we send an ABORT_TAG message.
In rare cases, when the filter specified accesses an multi-byte value that
is split across mbuf's, the value loaded is incorrect. And if you are very
unlucky (like me) it will index off the end of the mbuf and into an
unallocated page and panic the system.
If you look at the code you will discover the the index *k* is added to
the pointer *cp* and the used AGAIN as a subscript.
to poll succesfully even if we are sharing the interrupt.
Register the interrupt handler before the attach.
This commit makes the 294x PCI shared interrupt compliant. This has
been tested with an aic7870 motherboard controller and a 294x in the
same machine shareing an irq.
- Report valid residual byte counts. We actually pause the sequencer
when the residual is non-zero. I thought about using DMA to do this,
bus sequencer program space is tight.
- Fix embarassing off by one error in the computation of a 2's
compliment variable. This was most likely the cause of the
many problems reported with the tagged queuing code.
- Handle "MAX_SYNC" as a special case (ie we are the ones starting
the sync negotiation sequence). This was done so that the target
scratch area can be initialed to 0 offset (asyncronous transfers)
safely. The initialization to 0 (was 15) is necessary since in
some cases a Wide negotiation could run into problems if SCSIRATE
was set wrong and we went into data(in/out).
- Trim the DMA routines a little by using some procedures. Net
effect is more functionality with 3 less instructions after this
update.
- Toggle the WIDEODD bit of the DFCNTRL whenever this is not the
last SG block. It has no effect in the 8bit bus configuration,
but in the Wide configuration ensures that the overlap byte is
held in the SCSI block if the transfer is odd so it will end
up in the next SG (the correct behavior).
- catch the interrupt type (EDGE/LEVEL) before chip reset instead
of guessing the right type.
- Add pause variable to the ahc struct to better handle the different
interrupt types and pausing the sequencer.
- CLRINTSTAT -> CLRSCSIINT: This is a documented bit in the CLRINT
register in newer Adaptec documentation, so use their name for it.
- Report valid residual byte counts.
- Don't mess with the target scratch areas > id 8 on single, narrow,
channel devices. The BIOS does a checksum of this area and can
flip out if we zero it out.
- Initialize the sequencer FLAGS scratch ram variable in the single
channel devices to 0. This was the cause of the annoying warning
where we would get a cmdcmplt the first time we did any type of
transfer negotiation with no valid scb. It also fixes the problem
that looked like the INTSTAT register wasn't clearing fast enough.
This only showed up on 294x cards, not motherboard aic7870s.
- Add the AHC_AIC7870 type and use it as the superset of aic7870
based controllers.
- clear the sync offset section of the targ scratch area so that
we default to asyncronous transfers. This was only a problem
for wide controllers because there was a scenario where the
offset wouldn't get updated before a data(out/in) phase would
occur. This required some change in the sequencer code since we
were depending on this field to hold the rate to negotiate.
- allow sync and wide negotiated commands to be tagged (the sequencer
now handles this properly).
I'm not exactly sure why all the inb/outw stuff got added to netboot.h
and I'd be happy if someone like Martin or Bruce could take a look at it!
Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
* to reduce the number of adapter failures. Transceiver select
* logic changed to use value from EEPROM. Autoconfiguration
* features added.
Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
Etherlink III 'zp' on 2.0R, but it did not work with the -current.
Noriyuki Takahashi <hor@aecl.ntt.jp> san has fixed this bug.
Our alpha-testers are tested this driver with 3C589B-COMBO and
3C589B-TP. And it works fine.
I also fixed a little about the use of ZP_DEBUG symbol and beautified
the awful Frankenstein-style indent :-) with "indent -c0 -nfc1 -i4".
[Also merge with Bruce's last changes]
Submitted by: "HOSOKAWA Tatsumi" <hosokawa@mt.cs.keio.ac.jp>
It is common case when modem hangs with carier on but don't
receive anything from another side.
This thing commonly healed with hangup and redialing.
Enhancements below allows to determine when such action
is needed and inform attach program with SIGURG signal.
There two ioctls set: outfill and keepalive, used from both
sides of connection. Outfill repeatedly sends FRAME_END with
specified timeout (i.e. 40 seconds). It is needed to get input on
other side even if no user activity on slip line currently.
Keepalive checks FRAME_ENDs from other side, and if no one
got in specified timeout (i.e. 60 seconds, max modem retrain time),
send SIGURG to attach program.
I plan to add code to slattach to handle this thing too.
Reviewed by: wollman
update what has actually been touched. This should speed up
screen access on slow hardware.
Introduced setting of "destructive" cursor size, much like
the old hardware cursor.
on a "NQNFS" kernel config option. NQNFS is a 4.4 wart and the performance
penalty of the lease checks on the client/server for _local_ I/O is too high
to have this occur all the time - especially when most people will never
use it.
Install the biosboot as /usr/mdec/boot[12]
Make the traditional links from [swf]dboot and boot[swf]d to boot[12] files.
Install dosboot as /usr/mdec/boot/fbsdboot.exe
1) Preserve old buffer contents when input buffer overflows.
Old code clear buffer and rewrite it again, if !MAXBEL
(for MAXBEL it does right thing :-).
F.e. if you type too long string, last chars passed,
not first ones as expected.
Moreover, it flush output queue too in this case without any needs.
2) Don't do IXOFF, if IGNCR and c==\r, ignore completely.
3) If PARMRK is active and !ISTRIP and char == 0377
put yet one 0377 to distinguish it from parity mark sequence.
POSIX standard (thanx Bruce).
Reviewed by:
Submitted by:
Obtained from:
CVS:
if (tp->t_line != 0)
test when CS_ODONE, it fails for NTTYDISC, use
if (linesw[tp->t_line].l_start != ttstart)
instead.
Reviewed by:
Submitted by:
Obtained from:
CVS:
BREAK/parity/framing errors.
Term "correctly" assumes POSIX spec. and 4.4 ttyinput() behaviour.
1) Discard BREAK/parity at interrupt level when apropriate IGN*
is set in iflag. It helps "raw" mode works even IGN* is set.
2) Zero parity (if INPCK) and framing directly in buffer
before passing it to b_to_q() in "raw" mode.
Efficency:
interrupt level: if no error occurse, only two "test" commands added
"raw" mode: buf scan incc times for parity/framing added
Reviewed by:
Submitted by:
Obtained from:
CVS:
merged cache changes, and figure it out based on the B_VMIO buffer flag.
Fixes a problem where delayed write VMIO buffers would sometimes get
recopied into kernel-alloced memory.
Submitted by: John Dyson
Report floppy/tape units on seperate lines as fdX:/ftX: to correct lots of
ways the current scheme failed to end the output with \n.
Add controller and/or drive designator to the fron of several messages
that come from this drive. [It's not fun to track down driver messages
using grep over the source tree.]
Reviewed by: joerg
include <pci/pcivar.h> without including <sys/devconf.h> and other
drivers include <pci/pcivar.h> before including <sys/devconf.h> if
certain identifiers are defined.
The devconf headers have convoluted interdependencies. <sys/devconf.h>
includes <machine/devconf.h> which includes <pci/pcivar.h>. Most
drivers include <sys/devconf.h> so even isa drivers depend on
<pci/pcivar.h>. For similar reasons, most drivers depend on another
pci header, on an isa header and on two scsi headers.
- ignore the partition table if it is identical with the bogus one in
/usr/src/sys/i386/boot/biosboot/start.S. Honoring the bogus size
field was fatal. The error is detected but other compatibilty
cruft weakens the error handling too much for this case.
- weaken the partition entry checking to allow the following treatments
of C/H/S addresses when C should be >= 1024:
(1) allow C = 1023, H = max, S = max.
(2) allow C to be correct modulo 1024.
Other compatibilty cruft weakens the error handling to allow all
C/H/S addresses, but there too many errors were reported.
Improve error messages:
- print C/H/S addresses if relevant.
- distinguish primary partition table from extended partition tables.
- don't use diskerr() except for i/o errors.
to accurately track this. It isn't an indicator of resource consumption
anyway.
Removed cnt.v_kernel_pages: We don't implement this and doing so accurately
would be very difficult (and ambiguous - since process pages are often
double mapped in the kernel and the process address spaces).
NOT derived from the Linux code and is thus not GPL'd. It is the author's
express wish that the GPL copyrighted version be removed and this BSD copyright
version take its place. Considering our own stance on this, I'm certainly
not going to argue! [Note to NetBSD folks: You're free to grab it now :-)]
Submitted by: Mikael Hybsch <micke@dynas.se>
in.c: when an interface address is deleted, keep its multicast membership
. records (attached to a struct multi_kludge) for attachment to the
. next address on the same interface. Also, in_multi structures now
. gain a reference to the ifaddr so that they won't point off into
. freed memory if an interface goes away and doesn't come back before
. the last socket reference drops. This is analogous to how it is
. done for routes, and seems to make the most sense.