Commit Graph

38186 Commits

Author SHA1 Message Date
Maxime Henrion
b9deb009c2 Convert one more d_mmap_t consumer I missed in my previous commit. 2003-02-25 13:30:50 +00:00
Søren Schmidt
ae64a900aa Fix support for the old CMD 646 chips, interrupt setup was wrong. 2003-02-25 12:56:37 +00:00
Maxim Konovalov
b36f5b3735 style(9): join lines. 2003-02-25 11:53:11 +00:00
Maxim Konovalov
99e8617d24 Ip reassembly queue structure has ipq_nfrags now. Count a number of
dropped ip fragments precisely.

Reviewed by:	silby
2003-02-25 11:49:01 +00:00
David Xu
d9b05fa0b0 Remove an unsafe KASSERT. 2003-02-25 11:23:17 +00:00
Jeff Roberson
869d735043 - Properly handle the vnode interlock in nfs_fsync.
Reported by:	phk
2003-02-25 08:50:21 +00:00
Jeff Roberson
2e3981a70c - Add the missing NULL interlock argument to a recently added BUF_LOCK. 2003-02-25 08:23:11 +00:00
Søren Schmidt
b301920c88 Revert the probe code change.
It helped those fake devices probe delays to go away, but as a side
effect it also made some not so conforming CD/DVD drives go away...
2003-02-25 08:22:01 +00:00
Poul-Henning Kamp
5cd0cc885f NO_GEOM cleanup:
Move to "struct disk *" centric API.
Add NULL check to a malloc(9) return value.

Ok'ed by:	sos
2003-02-25 08:02:57 +00:00
Poul-Henning Kamp
42170da1d8 NO_GEOM cleanup:
Move to new "struct disk *" centric API.
Retire major #147 (twed)
2003-02-25 07:41:51 +00:00
Poul-Henning Kamp
b2fe65c5be NO_GEOM cleanup:
Move to "struct disk*" centric API.
Retire major #131 (mlxd)
2003-02-25 07:35:41 +00:00
Poul-Henning Kamp
e78dcaf403 Retire major #133 (amrd). 2003-02-25 07:24:51 +00:00
Alan Cox
077808c588 Fuse two #ifdefs with identical conditions. 2003-02-25 06:46:08 +00:00
Kirk McKusick
3a7053cb60 Prevent large files from monopolizing the system buffers. Keep
track of the number of dirty buffers held by a vnode. When a
bdwrite is done on a buffer, check the existing number of dirty
buffers associated with its vnode. If the number rises above
vfs.dirtybufthresh (currently 90% of vfs.hidirtybuffers), one
of the other (hopefully older) dirty buffers associated with
the vnode is written (using bawrite). In the event that this
approach fails to curb the growth in it the vnode's number of
dirty buffers (due to soft updates rollback dependencies),
the more drastic approach of doing a VOP_FSYNC on the vnode
is used. This code primarily affects very large and actively
written files such as snapshots. This change should eliminate
hanging when taking snapshots or doing background fsck on
very large filesystems.

Hopefully, one day it will be possible to cache filesystem
metadata in the VM cache as is done with file data. As it
stands, only the buffer cache can be used which limits total
metadata storage to about 20Mb no matter how much memory is
available on the system. This rather small memory gets badly
thrashed causing a lot of extra I/O. For example, taking a
snapshot of a 1Tb filesystem minimally requires about 35,000
write operations, but because of the cache thrashing (we only
have about 350 buffers at our disposal) ends up doing about
237,540 I/O's thus taking twenty-five minutes instead of four
if it could run entirely in the cache.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-02-25 06:44:42 +00:00
David Xu
d4b570f053 Remove a bogus comment. 2003-02-25 05:17:18 +00:00
David Xu
768298d8c4 Remove a never true condition. 2003-02-25 05:14:18 +00:00
Jeff Roberson
17661e5ac4 - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.
- Remove the buftimelock mutex and acquire the buf's interlock to protect
   these fields instead.
 - Hold the vnode interlock while locking bufs on the clean/dirty queues.
   This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another
   BUF_LOCK with a LK_TIMEFAIL to a single lock.

Reviewed by:	arch, mckusick
2003-02-25 03:37:48 +00:00
Maxime Henrion
07159f9c56 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
Jeffrey Hsu
edf02ff15d Hold the TCP protocol lock while modifying the connection hash table. 2003-02-25 01:32:03 +00:00
Marcel Moolenaar
907cf80fbf Remove support for running in SimOS. The support has rotted over
time and there's no indication that it will improve anytime soon.
By removing support for SimOS it is possible to build LINT on
Alpha, which is considered more important at the moment.

Not objected to on: alpha@
2003-02-25 00:42:40 +00:00
David E. O'Brien
957a6263b6 Only apply rev 1.10 (which hacks around the i386 boot2 being too big for
both ufs1 and ufs2 support) on i386.
2003-02-25 00:10:20 +00:00
Poul-Henning Kamp
7d6ddd1027 NO_GEOM cleanup:
Move to new "struct disk *" centered API".

OK'ed by:	emoore
2003-02-24 21:49:27 +00:00
Jake Burkholder
5cd612b27e - Removed UMAXPTDI and UMAXPTEOFF.
- Changed VM_MAXUSER_ADDRESS to be defined in terms of PTDPTDI.  In order for
  assumptions about the recursive page table map to work it must be the base
  of the recursive map.  Any pte offset that's not NPTEPG will break these
  assumptions.

Sponsored by:	DARPA, Network Associates Laboratories
2003-02-24 20:29:52 +00:00
Alan Cox
3fa24ec9f1 In vm_page_dirty(), assert that the page is not in the free queue(s). 2003-02-24 17:30:45 +00:00
Alexander Kabaev
ba873f4c18 Correctly map SIGSYS signal to/from Linux.
Submitted by:   "Georg-W. Koltermann" <g.w.k@web.de>
2003-02-24 16:16:45 +00:00
Yoshihiro Takahashi
2302407b21 The mpbiosreason variable does not used for pc98. 2003-02-24 14:36:03 +00:00
Yoshihiro Takahashi
7bc5ac11b7 Fix printf format error. 2003-02-24 14:32:27 +00:00
David Schultz
9cdb2d4d9d Expand the reference count on struct dquot to 32 bits.
This fixes a panic on large systems where a single user
may have more than 64K active or inactive vnodes.

PR:		48234
Reviewed by:	mike (mentor)
2003-02-24 08:49:59 +00:00
Kirk McKusick
3bf0ed940b When removing the last item from a non-empty worklist, the worklist
tail pointer must be updated.

Reported by:	Kris Kennaway <kris@obsecurity.org>
Sponsored by:   DARPA & NAI Labs.
2003-02-24 07:28:41 +00:00
David E. O'Brien
e901be8e96 <machine/vmparam.h> is the right place to get KERNBASE, so don't special
platform case it (or use alternate spellings).
2003-02-24 06:56:18 +00:00
Sam Leffler
45e10ed9ef o instead of applying arbitrary tunables, just honor the COP_F_BATCH
flag that can be marked on each symmetric op
o eliminate hw.ubsec.maxbatch and hw.ubsec.maxaggr since they are not
  needed anymore
o change ubsec_feed to return void instead of int since zero is always
  returned and noone ever looked at the return value
2003-02-24 06:03:13 +00:00
Scott Long
3303c14b57 Don't NULL out p_fd until after closefd() has been called. This isn't
totally correct, but it has caused breakage for too long.  I welcome
someone with more fd fu to fix it correctly.
2003-02-24 05:46:55 +00:00
David E. O'Brien
b9a49f7eb4 pst(4) should be portable across all our platforms. 2003-02-24 05:12:24 +00:00
Kirk McKusick
c555826bd7 Revert to old (broken for over 1.5Tb filesystems) version of cgbase
so that boot loader once again will fit.

Sponsored by:   DARPA & NAI Labs.
2003-02-24 04:57:01 +00:00
David E. O'Brien
36f19f1bee Wrap the static endian functions to shutup GCC. 2003-02-24 04:44:53 +00:00
Mike Silbersack
af9c7d06d5 Fix a comment which didn't match the new cookie behavior.
Submitted by:	Scott Renfro <scott@renfro.org>
MFC after:	1 day
2003-02-24 03:15:48 +00:00
Peter Grehan
597dc6637a Catch up with ATAng changes 2003-02-24 03:12:30 +00:00
Jonathan Lemon
060958481a Fix another case for timewait. 2003-02-24 02:06:50 +00:00
Jonathan Lemon
9c3309d174 Update to work with the new timewait state.
Reviewed by: sam
2003-02-24 02:06:02 +00:00
David Xu
0fccb684d1 Remove a XXXKSE. kg_completed now needs proc lock. 2003-02-24 01:28:10 +00:00
Jeffrey Hsu
11a20fb8b6 tcp_twstart() need to be called with the TCP protocol lock held to avoid
a race condition with the TCP timer routines.
2003-02-24 00:52:03 +00:00
David Xu
f5878f69df Backout last surplus commit. That day just wasn't my day. 2003-02-24 00:49:55 +00:00
Jeffrey Hsu
2fbef91887 Pass the right function to callout_reset() for a compressed
TIME-WAIT control block.
2003-02-24 00:48:12 +00:00
Jake Burkholder
28c9e1aa5c Use the direct mapping of IdlePTD setup in locore for proc0's page directory,
instead of allocating another page of kva and mapping it in again.  This was
likely an oversight in revision 1.174 (cut and paste from pmap_pinit).

Discussed with:	peter, tegge
Sponsored by:	DARPA, Network Associates Laboratories
2003-02-24 00:39:50 +00:00
Peter Grehan
84188b7cc1 Add apple partition map GEOM module 2003-02-24 00:16:51 +00:00
David E. O'Brien
0f7d7a85f0 Make the 'a' parameter of bus_space_write_multi_stream_*() a const pointer. 2003-02-24 00:11:15 +00:00
Tor Egge
07d2563244 Allow machines with one CPU and a valid mp table to boot an SMP kernel. 2003-02-23 23:49:57 +00:00
Dan Moschuk
25b803ef49 Add support for Peppercon ROL-F Card.
Submitted by: Sascha Holzeiter <sascha@root-login.org>
PR: 48559
2003-02-23 23:35:35 +00:00
Marcel Moolenaar
0f265fea23 Use the correct size for reading and writing the PCI config space.
Reading the PCI config space with the wrong (larger) size is not
a problem in this case, but writing can be as it clobbers unrelated
registers. In this case the clobbering is for reserved fields, which
too is mostly harmless... for now. Hence, this change is mostly
preventive in nature.
2003-02-23 23:09:17 +00:00
Tor Egge
6a07a13944 Sync new socket nonblocking/async state with file flags in accept().
PR:		1775
Reviewed by:	mbr
2003-02-23 23:00:28 +00:00