Commit Graph

367 Commits

Author SHA1 Message Date
dg
b9e7140c7c Don't gain/lose a reference to the object when yanking its pages in
vinvalbuf()...it will cause vnode locking problems in vm_object_terminate,
and isn't necessary anyway.
1995-03-20 10:19:09 +00:00
dg
cfecdfd362 Don't attempt to sync pages in the V_SAVE case of vinvalbuf; doing so can
lead to a deadlock. Just let the VM system deal with it.
1995-03-20 02:08:24 +00:00
dg
23d0a8bc3c Fixed bug introduced in the previous commit - the lock must be held until
after the call to exec_check_permissions().
1995-03-19 23:27:57 +00:00
dg
d337091388 Lose the lock on the vnode. Changes to implement proper locking in the
vnode pager now require this.

Submitted by:	John Dyson
1995-03-19 23:08:12 +00:00
dg
9cd78521d8 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
dg
568f2efc88 Fix from Doug Rabson: Don't try to release a pbuf we didn't get.
Minor style change by me.
1995-03-19 13:28:54 +00:00
dg
fa7269fdef Removed unnecessary call to vnode_pager_uncache(). We automatically clear
the VTEXT flag after all mappers have finished with the object.
1995-03-19 12:08:03 +00:00
dg
a62ef20881 Moved call to vnode_pager_uncache in rename() to before the VOP_RENAME.
It was previously after the VOP_RENAME and the reference and lock on
the vnode had already been lost, allowing interesting internel
inconsistencies. This is one of the two reasons why freefall was crashing
every hour or two (the other being nullfs bugs).
Don't call vnode_pager_uncache in revoke(). revoke() is only allowed on
VCHR and VBLK vnodes.
1995-03-19 11:16:58 +00:00
dg
8809f325f3 Patch from Kirk McKusick to fix a bug introduced in the Poul's vfs_cache
rewrite.
1995-03-19 09:33:51 +00:00
dg
6037557863 Woops, add back that #define...it's used later in the file. 1995-03-18 07:06:51 +00:00
dg
84d7516af3 Fixed comments and removed b_cylinder #define. 1995-03-18 06:38:04 +00:00
dg
c07d989087 Integrated change from 1.1.5: Fixed broken disksort to sort by pblkno
rather than by cylinder.
1995-03-18 06:32:48 +00:00
dg
14517b375e Changed names of goaway routines into shutdown routines. 1995-03-17 04:18:07 +00:00
bde
289f11acb4 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
bde
42f54543e6 Fix support for extended partitions (forgot to release the buffer). 1995-03-15 16:25:08 +00:00
dg
c20bdce1e0 Special cased the handling of mb_map in the M_WAITOK case. kmem_malloc()
now returns NULL and sets a global 'mb_map_full' when the map is full.
m_clalloc() has further been taught to expect this and do the right thing.
This should fix the "mb_map full" panics that several people have reported.
1995-03-15 07:52:06 +00:00
bde
bc56901dc4 Finish the previous change. The device name got lost in diskerr(). 1995-03-12 08:17:30 +00:00
phk
6d3911a952 Update a couple of counters. 1995-03-12 02:01:20 +00:00
dg
12b812885a Added a comment. 1995-03-11 22:29:07 +00:00
dg
2ff0acd8ef Added some additional DIAGNOSTIC code that makes sure that freed
memory addresses and types are with the valid range. Increased
MAX_COPY to 256 (used to verify no freed memory use with DIAGNOSTIC).
1995-03-11 22:28:16 +00:00
dg
4e060d1941 Reorganized an if() expression for efficiency. 1995-03-10 21:18:24 +00:00
dg
1b881d5453 Whoops, back out that last change - I misread what Poul had done there. 1995-03-10 20:29:51 +00:00
dg
0edff5994e Don't thrash the name cache while trying to fill up the object cache.
(Make a new cache entry until desiredvnodes is reached).
1995-03-10 20:26:29 +00:00
dg
589ce9b43d Removed some #include's of unnecessary include files. 1995-03-10 08:44:20 +00:00
phk
5ac4500e79 Clean up and improve the namecache.
1. We always keep one 16th of the vnodes on the freelist, so that the
namecache doesn't get trashed.  It used to be that it wasn't a problem, but
the only vnodes getting released these days are directories and things which
Clean up and improve the namecache.

1. We always keep one 16th of the vnodes on the freelist, so that the
namecache doesn't get trashed.  It used to be that it wasn't a problem, but
the only vnodes getting released these days are directories and things which
gets forced out of the VM/cache.  The latter is not numerous enough to keep
the pool of vnodes needed for the namecache sufficiently big.

2. Purge invalid entries in the namecache as soon as we notice them.  This
avoids a stale entry pushing out a valid entry on the LRU list.

3. Speed up the lookup in the namecache by avoid a special case branch.

4. Make the cache purge routines do the thing they're supposed to, and in
a decently efficient manner.

5. Make the size of the namecache follow the number of vnodes, so that we
can always point to all the vnodes we have in core.

6. Readability has gone way up.

7. Added a "options NCH_STATISTICS" feature that will gather more
detailed statistics on the performance of the namecache.

Reviewed by:    davidg

(cvs is dumping core on me :-(  )
1995-03-09 20:27:04 +00:00
phk
a64ffc7c28 Clean up and improve the namecache.
1. We always keep one 16th of the vnodes on the freelist, so that the
namecache doesn't get trashed.  It used to be that it wasn't a problem, but
the only vnodes getting released these days are directories and things which
gets forced out of the VM/cache.  The latter is not numerous enough to keep
the pool of vnodes needed for the namecache sufficiently big.

2. Purge invalid entries in the namecache as soon as we notice them.  This
avoids a stale entry pushing out a valid entry on the LRU list.

3. Speed up the lookup in the namecache by avoid a special case branch.

4. Make the cache purge routines do the thing they're supposed to, and in
a decently efficient manner.

5. Make the size of the namecache follow the number of vnodes, so that we
can always point to all the vnodes we have in core.

6. Readability has gone way up.

7. Added a "options NCH_STATISTICS" feature that will gather more
detailed statistics on the performance of the namecache.

Reviewed by:	davidg
1995-03-09 20:23:45 +00:00
phk
25a158ff39 Another little optimization to the nameicache.
If an entry is stale, ditch it.
1995-03-08 01:40:44 +00:00
phk
f4953438ea Improve the quality of the hash used in the namei-cache. 1995-03-08 01:08:03 +00:00
dg
791564efa9 Removed most of the special policy regarding the seperation of VMIO and
dir/metadata buffers as it seems to have anomolous effects.
1995-03-07 19:53:27 +00:00
dg
652f33dd01 Put VAGE vnodes at the head of the free list. 1995-03-07 18:59:45 +00:00
phk
543c4f70db Update vfs_cache.c to use the <sys/queue.h> macros. This makes it easier
to read, but doesn't change the speed.

Reviewed by:	phk
Obtained from:	via NetBSD
1995-03-06 06:45:52 +00:00
dg
2c92668cd9 Added some more of John's "anti-chatter" fixes - set the page activation
count to 0 after activating the page; the previous behavior biased the
pages too high in some cases.

Submitted by:	John Dyson
1995-03-04 15:16:07 +00:00
bde
3e1a082ed0 Support extended DOSpartitions.
Accept even suspicious partitions.

Moved most handling of the compatibility slice to dsopen().

Report i/o errors.
1995-03-04 11:44:05 +00:00
bde
f0822da550 Don't warn about missing labels for non-BSD slices.
Don't print debugging messages by default.

Initialize the compatibility slice here and not in the machine-dependent
code.

Fix initialization of the label for the whole disk slice.

Make it clear that write protection of labels doesn't apply when there is
no label.
1995-03-04 11:42:27 +00:00
dg
e4e3f30221 Removed obsolete vtrace() remnants. 1995-03-04 03:24:45 +00:00
dg
9dc7842c25 Fixes from John Dyson to work around vnode lock hang. Basically, remove
the VOP_BMAP calls, and add one to bdwrite.

Submitted by:	John Dyson
1995-03-03 22:13:16 +00:00
dg
31019b7202 Don't try to cluster busy buffers.
Submitted by:	John Dyson
1995-03-02 19:36:50 +00:00
dg
beac11b74f Various changes from John and myself that do the following:
New functions create - vm_object_pip_wakeup and pagedaemon_wakeup that
are used to reduce the actual number of wakeups.
New function vm_page_protect which is used in conjuction with some new
page flags to reduce the number of calls to pmap_page_protect.
Minor changes to reduce unnecessary spl nesting.
Rewrote vm_page_alloc() to improve readability.
Various other mostly cosmetic changes.
1995-03-01 22:08:55 +00:00
dg
e9d6feff91 No longer assume that a process's address space can be directly written to. 1995-03-01 04:09:50 +00:00
ache
e33e8dd4a8 Workaround IXOFF bug when output queue is full && RTS control is on 1995-02-28 23:21:33 +00:00
dg
191e07d353 Do a vnode_pager_uncache after the VOP_RENAME to lose the remaining
reference to the old vnode.

Suggested by:	Bruce Evans
1995-02-28 02:52:48 +00:00
pst
9b98fb36dc Incorporate bde's code-review comments.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous.
(b) remove all of the wrappers that have been replaced by ttselect
(c) fix formatting in syscons.c and definition in syscons.h
(d) add cxdevtotty

NOT DONE:
(e) make pcvt work... it was already broken...when someone fixes pcvt to
	link properly, just rename get_pccons to xxxdevtotty and we're done
1995-02-28 00:21:11 +00:00
ugen
455c4accc3 same 1995-02-27 19:47:53 +00:00
dg
fab8fbea37 Backed out previous change. I forgot (for about the fourth time) that
v_rdev is a #define which is dereferenced through v_specinfo->si_rdev,
and that isn't initialized until later in checkalias().
1995-02-27 10:15:38 +00:00
dg
2061c5c918 Initialize v_rdev in getnewvnode() - it appears that some filesystems
may not properly initialize this field in all cases, and this would
result in very anti-social behavior (overwriting on some other random
device/location).

Submitted by:	John Dyson
1995-02-27 06:50:08 +00:00
bde
13cbdca12e Eliminate my private type `bool_t'. 1995-02-26 03:15:36 +00:00
pst
1dcb420b64 (a) remove the pointer to each driver's tty structure array from cdevsw
(b) add a function callback vector to tty drivers that will return a pointer
    to a valid tty structure based upon a dev_t
(c) make syscons structures the same size whether or not APM is enabled so
    utilities don't crash if NAPM changes (and make the damn kernel compile!)
(d) rewrite /dev/snp ioctl interface so that it is device driver and i386
    independant
1995-02-25 20:09:44 +00:00
dg
e65f654492 Fixed thrashing buffer problem.
Submitted by:	John Dyson
1995-02-25 01:46:26 +00:00
phk
cbb4f63628 Clean a bunch of -Wall warnings. 1995-02-24 08:51:34 +00:00
ache
f5b2c37e27 Add releasing of input flow control into
ttyflush(FREAD)
1995-02-24 02:36:01 +00:00