Commit Graph

900 Commits

Author SHA1 Message Date
Garrett Wollman
6a06dea05f Our new-old mbugf allocator. This is actually something of a blast from
the past, since it returns to the old system of allocating mbufs out of
a private area rather than using the kernel malloc().  While this may seem
like a backwards step to some, the new allocator is some 20% faster than
the old one and has much better caching properties.

Written by: John Wroclawski <jtw@lcs.mit.edu>
1996-05-08 19:38:27 +00:00
Gary Palmer
6ddbf1e299 Clean up various compiler warnings. Most (if not all) were benign
Reviewed by:	bde
1996-05-08 04:29:08 +00:00
Poul-Henning Kamp
b74a76ee15 An old typo MCLBYTES/CLBYTES became more obvious bogus now.
Submitted by:		wollman
1996-05-06 17:18:12 +00:00
Joerg Wunsch
9e609dde83 uninitialized auto variable shmseg is used in ...
Closes PR #kern/1174

Submitted by:	enami@ba2.so-net.or.jp
1996-05-05 13:53:48 +00:00
Poul-Henning Kamp
aa8de40ae5 Another sweep over the pmap/vm macros, this time with more focus on
the usage.  I'm not satisfied with the naming, but now at least there is
less bogus stuff around.
1996-05-03 21:01:54 +00:00
Poul-Henning Kamp
ab76ac21e7 disksort() is gone, all drivers now use tqdisksort(). 1996-05-03 15:05:17 +00:00
Poul-Henning Kamp
e911eafcba removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
Peter Wemm
88d1b64235 Fix a nasty bug that causes random crashes and lockups particularly on
very busy servers (eg: news, web).  This is an interaction between
embryonic processes that have not yet finished forking, and happen to
cause the kernel VM space to grow, hitting the uninitialised variable.

It was possible for this to strike at any time, depending on the size of
your kernel and load patterns.  One machine had paniced occasionally
when cron launches a job since before the 2.1 release.

If you had "options DIAGNOSTIC", you may have seen references to bogus
addresses like 0xdeadc142 and the like.

This is a minimal change to fix the problem, it will probably be done
better by reordering p_vmspace to be in the startzero section, but it
becomes harder to validate then.

It's been vulnerable since pmap.c rev 1.40 (Jan 9, 1995), so it's been a
cause of problems since well before 2.0.5.  This was when the merged
VM/buffer cache and the dynamic growing kernel VM space were first
committed.  This probably fixes a few of PR's.
1996-05-02 11:38:05 +00:00
Poul-Henning Kamp
f8845af0db First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
Poul-Henning Kamp
a8c5fef5e6 KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
Bruce Evans
3722e90e21 Removed unused #include. 1996-05-01 03:32:46 +00:00
Bruce Evans
a794e791c8 Removed unnecessary #includes from <sys/imgact.h> so that it is
self-sufficient and added explicit #includes where required.
1996-05-01 02:43:13 +00:00
Sujal Patel
24b34f097b Fixed two typos in the comment.
Pointed out by:	davidg
1996-04-29 15:07:59 +00:00
Bruce Evans
10d245c58a Yet more b_flags fixes. The previous ones broke the clearing of B_DONE
and B_READ before writing.  This was was fatal.  They also broke the
clearing of B_INVAL before doing i/o.  This didn't actually matter.

Submitted by:	mostly by joerg
1996-04-19 19:34:19 +00:00
Bruce Evans
3f64564278 Fixed removal of devfs entries for the real slice corresponding to the
compatibility slice.  They were forgotten on last-close and then
creating them on first-open failed.

Devfs entries for slices other than the one containing the root file
system are still invisible unless you open a non-devfs inode on the
slice.
1996-04-19 19:22:29 +00:00
Sujal Patel
0e3eb7ee6c Implement the RFNOWAIT flag for rfork(). If set this flag will cause the
forked child to be dissociated from the parent).

Cleanup fork1(), implement vfork() and fork() in terms of rfork() flags.

Remove RFENVG, RFNOTEG, RFCNAMEG, RFCENVG which are Plan9 specific and cannot
possibly be implemented in FreeBSD.

Renumbered the flags to make up for the removal of the above flags.

Reviewed by:	peter, smpatel
Submitted by:	Mike Grupenhoff <kashmir@umiacs.umd.edu>
1996-04-17 17:05:08 +00:00
David Greenman
46f578e76a Fix for PR #1146: the "next" pointer must be cached before calling soabort
since the struct containing it may be freed.
1996-04-16 03:50:08 +00:00
Poul-Henning Kamp
61220614a8 Fix a longstanding bug and a buglet of no significance.
Now net.ipx works.

Noticed by:	John Hay -- John.Hay@csir.co.za
1996-04-13 13:28:54 +00:00
Bruce Evans
78d7e629bf Spell cpu_switch() with an i in a comment. 1996-04-11 20:56:29 +00:00
Bruce Evans
79299e416a Fixed the PF_REMOTE case of ptcwrite(). I broke it in rev.1.22. Output
was duplicated until the canq filled up, and write() normally returned 0.
This case is apparently rare.  It was reported for Jove's shell buffer in
PR 1130.
1996-04-11 18:43:37 +00:00
David Greenman
39f70d4545 Killed sections 3 and 4 of my copyright as I don't agree with it (I believe
it to be unnecessarily restrictive). For tty_subr.c, update to my standard
copyright.
1996-04-08 01:22:00 +00:00
Bruce Evans
bc4750691c Use rdtsc() function instead of inline essembler. 1996-04-07 18:16:26 +00:00
Bruce Evans
6ffde942bf Removed never-used #includes of <machine/cpu.h>. Many were apparently
copied from bad examples.
1996-04-07 17:39:28 +00:00
Bruce Evans
3157adc8af Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose
being declared in the wrong place.
1996-04-07 17:32:42 +00:00
Bruce Evans
92ff4bb0e7 Declared pgrpdump() properly. 1996-04-07 16:16:05 +00:00
Bruce Evans
120c5995aa Cleaned up naming and formatting in recent changes. 1996-04-07 14:32:14 +00:00
Bruce Evans
242c09c05e Don't generate code for the unused function sleep(). 1996-04-07 13:35:58 +00:00
Poul-Henning Kamp
45ec3b3838 Move the "mib" variables out to their own file. 1996-04-07 13:03:06 +00:00
Marc G. Fournier
4297524c49 Fixed a bug in DEVFS code that was producing "name slot allocation failed"
messages.
1996-04-05 19:12:01 +00:00
Marc G. Fournier
ecd87fe6c3 changed from using dev_link() to devfs_link() 1996-04-02 04:52:03 +00:00
Marc G. Fournier
ab314ae513 Convert from using dev_link() to dev_linkf() 1996-04-01 21:03:07 +00:00
Jordan K. Hubbard
5931895ece Remove bogus architectures to allow make tags to work.
Submitted-by: Andreas Klemm <andreas@knobel.gun.de>
1996-03-31 18:53:43 +00:00
Peter Wemm
289ccde0bd Correct the handling of NOCLDSTOP when using sigvec()
Make the SA_NODEFER handling more correct, previously if you called
sigaction to set a handler and had SA_NODEFER set, and manually masked
the signal itself in sa_mask, and when you read the settings back later,
you'd find SA_NODEFER incorrectly cleared.

Pointed out by: bde
1996-03-30 15:15:30 +00:00
Peter Wemm
2eb80d36fe Because of the way that ptrace() now calls procfs routines to read/write
the process's memory, it was possible for the procfs_domem() call to
return a residual leftover, but with no errno.  Since this is no good for
ptrace which ignored the the residual, remap a leftover amount into an
errno rather than fooling the caller into thinking it was successful when
in fact it was not.

Submitted by: bde (a very long time ago :-)
1996-03-30 15:02:58 +00:00
Bruce Evans
cf78fc4129 Undid the last 2 commits. Rev.1.43 reversed the changes in rev.1.42 and
rev.1.44 was a subset of them.
1996-03-28 15:03:41 +00:00
Marc G. Fournier
734daefc97 Switched from using devfs_add_devsw() to devfs_add_devswf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:31:42 +00:00
Marc G. Fournier
6e18ce4676 Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:29:52 +00:00
John Dyson
4e489ec421 Remove a now unnecessary prototype from pmap.c. Also remove now
unnecessary vm_fault's of page table pages in trap.c.
1996-03-28 05:40:58 +00:00
Bruce Evans
27d02c9849 Fixed name of /dev/fs/klog (it's not "log").
Submitted by:	"Marc G. Fournier" <scrappy@ki.net> and edited by me
1996-03-27 19:45:28 +00:00
Bruce Evans
adcbf406c5 Fixed permissions of /devfs/lkm. 1996-03-27 19:42:14 +00:00
Bruce Evans
8fb3332429 Fixed the unit numbers of the devfs `fd' devices.
Made the devfs `fd' devices bug for bug compatible with the ones created
by MAKEDEV:
- ownership is bin.bin, not root.wheel, except for std*.  The devfsext
  interface doesn't seem to allow specifying the ownership of /devfs/fd,
  so it's still incompatible.
- std* aren't links to fd/[0-2].
1996-03-27 19:19:58 +00:00
Bruce Evans
3dffe3c5f6 Fixed permissions of /devfs/*random.
Fixed group and permissions of /devfs/perfmon.
1996-03-27 19:04:55 +00:00
Bruce Evans
1170175e62 Fixed mode of /devfs/console. 1996-03-27 18:55:19 +00:00
Bruce Evans
6ae323519c Fixed group of disk devices (was wheel or games, now operator).
Added scsi control devices.

Converted almost everything that I changed to use devfs_add_devswf()
and verbose id macros.

st.c:
Renamed enrst* to erst* since that's what the current name is (enrst
seems to be an old name).
1996-03-27 18:50:10 +00:00
Bruce Evans
ba00d77a82 Print stack pointer and frame pointer in trap messages.
Fixed "trace/trap" message.

Reviewed by:	davidg
1996-03-27 17:33:39 +00:00
Jordan K. Hubbard
2438fbba14 Bill Fenner <fenner@parc.xerox.com> comes up with a better fix to the
debugger_on_panic stuff.
1996-03-25 17:06:34 +00:00
John Dyson
d73ce5bd92 Various pipe error return fixes, and a significant typeo fix. From
Bruce Evans (of course :-)).
Submitted by:	bde
1996-03-25 01:48:28 +00:00
Jordan K. Hubbard
60743d0a33 Ok, now this is correct (even simple fixes sometimes ain't so simple :) 1996-03-23 21:41:00 +00:00
Jordan K. Hubbard
3ab332ee3f Fix bogus last commit - debugger_on_panic was referenced even when
not defined.  Another change clearly committed without testing! :-(
1996-03-23 21:23:43 +00:00
Poul-Henning Kamp
924dfd9801 Remove all traces of KADB
add sysctl
	debug.debugger_on_panic: 1
if DDB or KGDB is defined.

Requested by: davidg
1996-03-23 11:31:16 +00:00