Commit Graph

153 Commits

Author SHA1 Message Date
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
41e4eb70b4 Comment out rootdev & rrootdev so a ls -l doesn't panic the machine. 1996-07-03 03:48:46 +00:00
John Dyson
688bbd5b76 Implement locking for pfs nodes, when at the leaf. Concurrent access
to information from a single process causes hangs.  Specifically, this
fixes problems (hangs) with concurrent ps commands, when the system is under
heavy memory load.
Reviewed by:	davidg
1996-07-02 13:38:10 +00:00
John Dyson
c6c4b08e59 Fix a serious problem, with a window where an object lock is needed,
but not there.  The extent of the object lock is expanded to be over the
range that it is needed.  Additionally, clean up the code so that it conforms
to better coding style.
1996-07-02 01:40:52 +00:00
John Dyson
32acf9a16a Add procfs_type.c to the repository. 1996-06-18 05:22:45 +00:00
John Dyson
6ead3edd9c Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
John Dyson
975dcaa94f This file is the "meat" of the process address space capability. If you
would like other things added, just ask!!!  It might be pretty easy to add.
1996-06-17 22:53:27 +00:00
John Dyson
9353aadd89 Add a feature to procfs to allow display of the process address map
with multiple entries as follows:

	start address, end address, resident pages in range, private pages
		in range, RW/RO, COW or not, (vnode/device/swap/default).
1996-06-17 22:43:36 +00:00
Gary Palmer
75cc5f07de Cosmetic change: make the ``ready to run'' line match the
``ready for devices'' printed out earlier by changing `devs '
to be `DEVFS: '
1996-06-15 20:37:22 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer
1409e0b384 Clean up -Wunused warnings. Julian asked me to just ifdef
out unused code as this is still work in progress.

Reviewed by:		bde
1996-06-12 05:08:34 +00:00
David Greenman
2f9bae59d6 Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.

Pointed out by Matt Day <mday@artisoft.com>
1996-06-12 03:37:57 +00:00
John Dyson
dc48d43a6c Properly lock the vm space when accessing the memory in a process. This
fix could solve some "interesting" problems that could happen during
process rundown.
1996-06-11 23:52:27 +00:00
Joerg Wunsch
cbe4630780 Fix the reproto.sh script that was broken after my KNFification.
Pointed out by: bde
1996-04-07 01:15:03 +00:00
Joerg Wunsch
d9fb9dd03e KNFify the function definitions. It's harder to grep around when the
function names don't start in column 1.
1996-04-06 13:34:37 +00:00
Marc G. Fournier
ad98bd0b24 Merged devfs_add_devsw() into devfs_add_devswf() 1996-04-03 03:03:27 +00:00
Marc G. Fournier
2523e82c8b Made the src code match the man page.
Removed dev_link() and dev_linkf(), replacing dev_linkf() with devfs_link()
1996-04-02 04:53:05 +00:00
Marc G. Fournier
0d5b12e38e Added dev_linkf() function (dev_link() + printf-style arguments)
Reviewed by:	julian@freebsd.org
1996-03-28 14:32:27 +00:00
Julian Elischer
54a5291b37 Submitted by: "Marc G. Fournier" <scrappy@ki.net>
allows correct creation of subdirectories in devfs_add_devswf()
1996-03-25 21:56:59 +00:00
John Dyson
ad5dd2341c Fix the problem that unmounting filesystems that are backed by a VMIO
device have reference count problems.  We mark the underlying object
ono-persistent, and account for the reference count that the VM system
maintainsfor the special device close.  This should fix the removable
device problem.
1996-03-19 05:13:22 +00:00
Peter Wemm
89be462c47 This commit was generated by cvs2svn to compensate for changes in r14557,
which included commits to RCS files with non-trunk default branches.
1996-03-11 19:29:25 +00:00
Peter Wemm
5e5861b9c6 Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all
files are off the vendor branch, so this should not change anything.

A "U" marker generally means that the file was not changed in between
the 4.4Lite and Lite-2 releases, and does not need a merge.  "C" generally
means that there was a change.
[two new auxillary files in miscfs/union]
1996-03-11 19:29:25 +00:00
Jeffrey Hsu
5a18c60a63 For Lite2: proc LIST changes.
Reviewed by:	davidg & bde
1996-03-11 06:13:09 +00:00
John Dyson
46d66d275b Make sure that the zero flag is cleared upon completion of paging I/O. 1996-03-09 07:02:52 +00:00
Julian Elischer
e9ee430593 really stupid mistake that stopped devices from appearing on the fly in mounted
DEVFS filesystems..

- 		if ( error = dev_add_name(child->name,parent->dnp
+ 		if ( error = dev_add_name(child->name,falias->dnp

Ok bruce, this is the one you were seeing..
1996-02-18 07:29:53 +00:00
Garrett Wollman
dc915e7cfc Kill XNS.
While we're at it, fix socreate() to take a process argument.  (This
was supposed to get committed days ago...)
1996-02-13 18:16:31 +00:00
Wolfram Schneider
1d08058f65 add ruid and rgid to file 'status' 1996-02-02 05:19:20 +00:00
Mike Pritchard
6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
Poul-Henning Kamp
02ae573ca8 make devfs_add_devswf a little smarter about '/'; 1996-01-28 10:07:55 +00:00
Poul-Henning Kamp
831e28a67a Make devfs_add_devfsf() which takes printf style args. 1996-01-25 07:17:31 +00:00
Peter Wemm
f863805df0 This time, really make the procfs work when reading stuff from the UPAGES.
This is a really ugly bandaid on the problem, but it works well enough for
'ps -u' to start working again.  The problem was caused by the user
address space shrinking by a little bit and the UPAGES being "cast off" to
become a seperate entity rather than being at the top of the process's
vmspace.  That optimization was part of John's most recent VM speedups.

Now, rather than decoding the VM space, it merely ensures the pages are
in core and accesses them the same way the ptrace(PT_READ_U..) code does,
ie: off the p->p_addr pointer.
1996-01-25 06:05:38 +00:00
Peter Wemm
0cc7521383 Major fixes for procfs..
Implement a "variable" directory structure. Files that do not make
sense for the given process do not "appear" and cannot be opened.
For example, "system" processes do not have "file", "regs" or "fpregs",
because they do not have a user area.

"attempt" to fill in the user area of a given process when it is being
accessed via /proc/pid/mem (the user struct is just after
VM_MAXUSER_ADDRESS in the process address space.)

Dont do IO to the U area while it's swapped, hold it in place if possible.

Lock off access to the "ctl" file if it's done a setuid like the other
pseudo-files in there.
1996-01-24 18:41:41 +00:00
Julian Elischer
da798be901 Slightly improved debug messages for inserting new items 1996-01-21 09:43:31 +00:00
Julian Elischer
b10669ebad oops.
get the last edit right
1996-01-21 09:07:58 +00:00
Julian Elischer
3daaa0c3bc Submitted by: Bruce Evans (bde)
better naming for  exported devfs function
and better place for the prototype
1996-01-21 09:03:15 +00:00
John Dyson
bd7e5f992e Eliminated many redundant vm_map_lookup operations for vm_mmap.
Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish
	overhead for merged cache.
Efficiency improvement for vfs_cluster.  It used to do alot of redundant
	calls to cluster_rbuild.
Correct the ordering for vrele of .text and release of credentials.
Use the selective tlb update for 486/586/P6.
Numerous fixes to the size of objects allocated for files.  Additionally,
	fixes in the various pagers.
Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs.
Fixes in the swap pager for exhausted resources.  The pageout code
	will not as readily thrash.
Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into
	page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE),
	thereby improving efficiency of several routines.
Eliminate even more unnecessary vm_page_protect operations.
Significantly speed up process forks.
Make vm_object_page_clean more efficient, thereby eliminating the pause
	that happens every 30seconds.
Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the
	case of filesystems mounted async.
Fix a panic with busy pages when write clustering is done for non-VMIO
	buffers.
1996-01-19 04:00:31 +00:00
Peter Wemm
689d68d9c2 Remove unnecessary debug printf's ("no references", "bad-id") - these
were development aids :-) and normal events.

Initialise the "hidden" blueprint mount "mnt_op" and "mnt_vfc" fields so
that a statfs() on a devfs file would not panic anymore. Fixes PR#911.

Head-scratching by: Julian and Peter
1996-01-02 09:14:49 +00:00
Poul-Henning Kamp
18e73f4fb6 I have some problem here, which shows up in the ahc0 driver. It isn't where
it originates, so I catch it here and fail.
This may expose the same bug on other disk controllers (both scsi & ide).
1996-01-01 20:20:45 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Bruce Evans
f2c6b65bab Fixed 1TB filesize changes. Some pindexes had bogus names and types
but worked because vm_pindex_t is indistinuishable from vm_offset_t.
1995-12-17 07:19:58 +00:00
Bruce Evans
a899362e40 Restored lost prototypes. 1995-12-14 19:04:09 +00:00
Julian Elischer
e9fc6a73db another case where cdevsw becoming a pointer makes it neccesary to
check if it's NULL
1995-12-14 18:26:55 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Julian Elischer
6ba9ebce28 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
Poul-Henning Kamp
3724793e05 Back out this one, must have screwed up somewhere :-( 1995-12-11 10:26:34 +00:00
Poul-Henning Kamp
d4b7a3694b Staticize. 1995-12-11 09:24:58 +00:00
John Dyson
a316d390bd Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
Julian Elischer
4d92e19833 clean a few DEVFS things..
fix a bug where you couldn't place devices in the root directory
of devfs

remove deprecated routines

On my machine devfs now shows:
julian@erf.tfs.com:
julian@erf.tfs.com: ls -RF
bpf0            mem             ptypb           spkr            ttyp8
bpf1            null            ptypc           stderr          ttyp9
bpf2            pcaudio         ptypd           stdin           ttypa
bpf3            pcaudioctl      ptype           stdout          ttypb
console         pt              ptypf           tty             ttypc
cuaa0           ptyp0           random          ttyd0           ttypd
cuaia0          ptyp1           rsd0            ttyid0          ttype
cuala0          ptyp2           rsd1            ttyld0          ttypf
fd/             ptyp3           rvn             ttyp0           tun0
fd0.1440        ptyp4           rworm           ttyp1           urandom
fd1.1200        ptyp5           scsi/           ttyp2           vn
io              ptyp6           sd0             ttyp3           zero
kmem            ptyp7           sd1             ttyp4
lkm             ptyp8           snp0            ttyp5
log             ptyp9           snp1            ttyp6
lpt0            ptypa           snp2            ttyp7

./fd:
0       15      21      28      34      40      47      53      6       9
1       16      22      29      35      41      48      54      60
10      17      23      3       36      42      49      55      61
11      18      24      30      37      43      5       56      62
12      19      25      31      38      44      50      57      63
13      2       26      32      39      45      51      58      7
14      20      27      33      4       46      52      59      8

./scsi:
sctarg  ssc
julian@erf.tfs.com:

which is all devices really there except for disk slices/partitions..
(if I don't have it it's not there, which has GOT to be an improvement..)

no DEVFS fixes from device maintainers yet?
1995-12-09 09:11:25 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00