Commit Graph

1363 Commits

Author SHA1 Message Date
wollman
4542c1cf5d Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
wollman
6e64800860 Dejulianize DIAGNOSTIC panic code. The types are wrong; probably there's
a missing dereference.
1997-08-16 19:07:20 +00:00
fsmp
36308aa291 The promised "better fix" for "Trap 9 When Boot SMP" problem.
We now tsleep() in kthread_init() between start_init()
and prepare_usermode() while waiting for ALL the idle_loop()
processes to come online.

Debugged & tested by:	"Thomas D. Dean" <tomdean@ix.netcom.com>

Reviewed by:	David Greenman <dg@root.com>
1997-08-15 02:33:30 +00:00
ache
4ef0ac8df9 setitimer: if it_value == 0 clear it_interval now
non-zero it_interval values have no sense if it_value == 0 but
checked by itimerfix which may cause EINVAL return
1997-08-14 08:15:12 +00:00
fsmp
087e3f1aff Cheap TEMPORARY fix for "Trap 9 When Boot SMP" problem.
This is on the top of my list for a correct fix.

Submitted by:	"Thomas D. Dean" <tomdean@ix.netcom.com>
1997-08-13 23:05:33 +00:00
julian
0d371398d7 add a diagnostic to catch some common cases of tsleep being
called from the wrong place.
1997-08-13 19:29:33 +00:00
ache
17e05ba7e2 Bypass itimerfix 100000000 limit in nanosleep1 using loop through timeouts 1997-08-13 17:55:11 +00:00
dyson
782a1cf641 Back out a part of the disk scheduling "improvements" :-(. Let me know
how the system works now!!!
1997-08-12 19:07:42 +00:00
fsmp
f76cbffb97 Cheap fix for kern/4255.
If the problem is seen this fix suggests a compile-time work-around then panics.
1997-08-10 19:32:38 +00:00
fsmp
0204bddf7c Some fixes towards making "default configs" work again.
Still not fixed, no idea why.

Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
1997-08-09 23:01:03 +00:00
dyson
c38957d22b Modify the scheduling policy to take into account disk I/O waits
as chargeable CPU usage.  This should mitigate the problem of processes
doing disk I/O hogging the CPU.  Various users have reported the
problem, and test code shows that the problem should now be gone.
1997-08-09 10:13:32 +00:00
julian
c92a006d04 Teach both disk drivers how to cope with a hardware watchdog
while dumping core.. I'm tired of getting 1/2 of a core-dump

conditional on -DHW_WDOG for now
this will migrate to 2.2 as that's where I need it.
1997-08-09 01:44:25 +00:00
julian
9b3d3ce7fa Use up 4 precious bytes to give the kernel a hook to
support hardware watchdogs. The actual functions would be supplied in an LKM
or a linked file, but they need to hang off something.
1997-08-09 01:25:54 +00:00
dyson
ad0649e2b9 VM86 kernel support.
Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>,
	Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>,
	and probably alot of others.
Submitted by:	Jnathan Lemon <jlemon@americantv.com>
1997-08-09 00:04:06 +00:00
julian
ac5704714e Make the scheduler quantum a tunable parameter
Reviewd by: John Dyson  dyson@freebsd.org
1997-08-08 22:48:57 +00:00
julian
9434cb7524 Make a function static to quieten gcc 1997-08-08 20:29:47 +00:00
julian
0c0b422f31 Clean up the console muting functionality.
this has been in production now for a long time with no known effects.
1997-08-08 20:09:50 +00:00
fsmp
585d84061d Fixes kern/3835: SMP kernel crash on enable "dumps on wd0"
- SMP: set value of curproc in main(), before the SYSINIT stuff runs.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
1997-08-07 21:22:29 +00:00
dyson
2649bd0b26 Another attempt at cleaning up the new memory allocator. 1997-08-05 22:24:31 +00:00
dyson
8a37859859 Fix up come cruft that I left on a previous commit. 1997-08-05 00:05:00 +00:00
dyson
8fa8ae3d0d Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu of
a simple, clean zone type allocator.  This new allocator will also be
used for machine dependent pmap PV entries.
1997-08-05 00:02:08 +00:00
fsmp
986d57f22b pushed down "volatility" of simplelock to actual int inside the struct.
Submitted by:	 bde@zeta.org.au, smp@csn.net
1997-08-04 19:11:26 +00:00
dyson
4811e46aa5 Fix a problem with the vfs vnode caching that it doesn't grow quickly
enough and can cause some strange performance problems.  Specifically, at
or near startup time is when the problem is worst.  To reproduce
the problem, run "lat_syscall stat" from the alpha lmbench code right
after bootup.  A positive side effect of this mod is that the name
cache can be set to grow again by sysctl.  A noticable positive
performance impact is realized due to a larger namecache being available
as needed (or tuned.)
1997-08-04 07:43:28 +00:00
phk
14e530a9e3 remove unused MAXVNODEUSE macro. 1997-08-04 07:31:36 +00:00
dg
4cd1615cbc Fixed security hole with sharing the file descriptor table (via rfork)
when execing a setuid/setgid binary. Code submitted by Sean Eric Fagan
(sef@freebsd.org).
Also consolidated the setuid/setgid checks into one place.
Reviewed by:	dyson,sef
1997-08-04 05:39:24 +00:00
bde
6cd5fb9a8c Fixed syscall arg checking in clock_settime(). Stack garbage was
checked to be >= 0.  This bug was introduced in rev.1.26.

Reported by:	John Hay <jhay@mikom.csir.co.za>
1997-08-03 07:26:50 +00:00
bde
9195bd1ec7 Removed unused #includes. 1997-08-02 14:33:27 +00:00
fsmp
4fa08df3f6 Converted the TEST_LOPRIO code to default.
Created mplock functions that save/restore NO registers.
Minor cleanup.
1997-07-31 05:43:05 +00:00
jmg
6422ff5313 fix a few problems with pty. warn about how if you only have 1 pty
defined, your really getting 32.  Also warn about how you can't have
more than 256 pty's when your using DEVFS (non DEVFS can use more, just
the makedev script doesn't know how to make >256).  it also doesn't
allocate more memory than needed in this case.

Make sure that the signal passed in TIOCSIG isn't 0 as it might cause
a panic.  I personally haven't seen this happen, but after a similar
bug in syscons crashed my machine, I'm acutely aware of this one. :)
1997-07-30 10:05:18 +00:00
fsmp
97cf884548 Modified the PEND_INTS algorithm to fix the ISA INT loss problem.
Noticed by:	dave adkins <adkin003@gold.tc.umn.edu> and others.
1997-07-28 03:59:54 +00:00
fsmp
8d2474227f mpapic.c & mp_machdep:
- removed TEST_ALTTIMER.
 - removed APIC_PIN0_TIMER.
 - removed TIMER_ALL.

mplock.s:
 - minor update of try_mplock for new algorithm where a CPU uses try_mplock
	instead of get_mplock in the ISRs.
1997-07-26 01:55:19 +00:00
fsmp
31c730f3a6 New simple_lock code in asm:
- s_lock_init()
 - s_lock()
 - s_lock_try()
 - s_unlock()

Created lock for IO APIC and apic_imen  (SMP version of imen)
 - imen_lock

Code to use imen_lock for access from apic_ipl.s and apic_vector.s.
Moved this code *outside* of mp_lock.

It seems to work!!!
1997-07-23 20:47:19 +00:00
fsmp
a377b0478a Cleaned up the FPU init. 1997-07-22 16:49:54 +00:00
fsmp
46330a4823 SMP code initializes the FPU of APs.
Suggested by:     Bruce Evans <bde@FreeBSD.ORG>
1997-07-21 17:03:22 +00:00
fsmp
2ac3ad1fd3 Developed a new strategy for handling the 8254/8259/APIC issue. 1997-07-20 19:41:38 +00:00
fsmp
8fe3123e94 Minor cleanup.
Pass string arg to apic_dump.
Moved bootverbose printing of SMP enabled INTs from clock.c to autoconf.c
1997-07-20 18:05:20 +00:00
bde
37174c05e6 Removed unused #includes. 1997-07-20 08:37:24 +00:00
fenner
38192cf9a5 Remove sonewconn() macro kludge, introduced in 4.3-Reno to catch argument
mismatches.  Prototypes do a much better job these days.

Noticed by:	bde
1997-07-19 20:15:43 +00:00
fsmp
11a19ed09a Added code to support #define APIC_PIN0_TIMER.
This code ALWAYS runs the 8254 timer thru the 8259 ICU.
It depricates the usage of "options SMP_TIMER_NC" in the config file.
1997-07-19 04:00:35 +00:00
fsmp
ee22260a44 Split TEST_CPUSTOP code into CPUSTOP_ON_DDBBREAK and mainline code. 1997-07-18 21:27:53 +00:00
fsmp
669fe5c8eb printf cleanup. 1997-07-18 03:58:14 +00:00
dyson
53c148264d Hopefully fix a few problems that could cause hangs in SMP mode.
1)	Make sure that the region mapped by a 4MB page is
	properly aligned.
2)	Don't turn on the PG_G flag in locore for SMP.  I plan
	to do that later in startup anyway.
3)	Make sure the 2nd processor has PSE enabled, so that 4MB
	pages don't hose it.

We don't use PG_G yet on SMP -- there is work to be done to make that
work correctly.  It isn't that important anyway...
1997-07-17 19:45:01 +00:00
dfr
df8d8e5713 Merge WebNFS support from NetBSD
Obtained from:	NetBSD
1997-07-17 07:17:33 +00:00
dyson
8e56f80f0e Clean up some lint associated with the AIO code. 1997-07-17 04:49:43 +00:00
fsmp
dd0a098be8 Minor cleanup. 1997-07-15 02:46:37 +00:00
bde
4112123248 Use the correct size for a sector in the search for a label in
readdisklabel().  Sectors may be larger than DEV_BSIZE.
1997-07-13 15:53:20 +00:00
fsmp
eb632f277f new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
this code is controlled by smptests.h: TEST_CPUSTOP, OFF by default

new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
this code is controlled by smptests.h: TEST_ALTTIMER, ON by default
1997-07-13 01:22:48 +00:00
fsmp
6199fe70f1 Cleanup old stop_cpus/restart_cpus() cruft.
Leave TEST_TEST1 for now.
1997-07-13 01:07:57 +00:00
davidn
9c6cf56f17 Adds sysctl int for shutdown timeout.
Reviewed by:	Poul-Henning Kamp <phk@dk.tfs.com>
1997-07-10 11:44:42 +00:00
ache
96b4a920ad Back out changes for 'conflicts' with IRQ, remove intr_registered() 1997-07-09 18:06:25 +00:00