Bruce Evans [Mon, 8 Feb 1999 06:29:10 +0000 (06:29 +0000)]
Copy from vendor branch. This mainly undoes most of the backing out of
Russian zones/rules in rev.1.12. ache objected mainly to the changes
in the Moscow zone names in rev.1.11 and those changes have been backed
out in the vendor branch.
Julian Elischer [Mon, 8 Feb 1999 05:48:46 +0000 (05:48 +0000)]
Fix for PR 9309.
Divert was not feeding clean data to ifa_ifwithaddr() so it was
giving bad results.
Submitted by: kseel <kseel@utcorp.com>, Ruslan Ermilov <ru@ucb.crimea.ua>
Matthew Dillon [Mon, 8 Feb 1999 02:11:52 +0000 (02:11 +0000)]
If there are 4 or fewer disk devices, we have room to display additional
VM statistics. zfod is moved and %slo-z ( percentage of zero-fills that
were slow, i.e. not pre-zero'd ), and number of pages freed per second.
Matthew Dillon [Mon, 8 Feb 1999 00:37:36 +0000 (00:37 +0000)]
Rip out PQ_ZERO queue. PQ_ZERO functionality is now combined in with
PQ_FREE. There is little operational difference other then the kernel
being a few kilobytes smaller and the code being more readable.
* vm_page_select_free() has been *greatly* simplified.
* The PQ_ZERO page queue and supporting structures have been removed
* vm_page_zero_idle() revamped (see below)
PG_ZERO setting and clearing has been migrated from vm_page_alloc()
to vm_page_free[_zero]() and will eventually be guarenteed to remain
tracked throughout a page's life ( if it isn't already ).
When a page is freed, PG_ZERO pages are appended to the appropriate
tailq in the PQ_FREE queue while non-PG_ZERO pages are prepended.
When locating a new free page, PG_ZERO selection operates from within
vm_page_list_find() ( get page from end of queue instead of beginning
of queue ) and then only occurs in the nominal critical path case. If
the nominal case misses, both normal and zero-page allocation devolves
into the same _vm_page_list_find() select code without any specific
zero-page optimizations.
Additionally, vm_page_zero_idle() has been revamped. Hysteresis has been
added and zero-page tracking adjusted to conform with the other changes.
Currently hysteresis is set at 1/3 (lo) and 1/2 (hi) the number of free
pages. We may wish to increase both parameters as time permits. The
hysteresis is designed to avoid silly zeroing in borderline allocation/free
situations.
Matthew Dillon [Mon, 8 Feb 1999 00:27:56 +0000 (00:27 +0000)]
Backed out vm_map coalesce optimization - it resulted in 22% more page
faults for reasons unknown ( under investigation ).
/usr/bin/time -l make in /usr/src/bin went from 67000 faults to 90000
faults.
John Polstra [Sun, 7 Feb 1999 23:49:56 +0000 (23:49 +0000)]
Change the load address of the ELF dynamic linker from "2L*MAXDSIZ"
to an architecture-specific value defined in <machine/elf.h>. This
solves problems on large-memory systems that have a high value for
MAXDSIZ.
The load address is controlled by a new macro ELF_RTLD_ADDR(vmspace).
On the i386 it is hard-wired to 0x08000000, which is the standard
SVR4 location for the dynamic linker.
On the Alpha, the dynamic linker is loaded MAXDSIZ bytes beyond
the start of the program's data segment. This is the same place
a userland mmap(0, ...) call would put it, so it ends up just below
all the shared libraries. The rationale behind the calculation is
that it allows room for the data segment to grow to its maximum
possible size.
These changes have been tested on the i386 for several months
without problems. They have been tested on the Alpha as well,
though not for nearly as long. I would like to merge the changes
into 3.1 within a week if no problems have surfaced as a result of
them.
Matthew Dillon [Sun, 7 Feb 1999 21:48:23 +0000 (21:48 +0000)]
Remove MAP_ENTRY_IS_A_MAP 'share' maps. These maps were once used to
attempt to optimize forks but were essentially given-up on due to
problems and replaced with an explicit dup of the vm_map_entry structure.
Prior to the removal, they were entirely unused.
Guido van Rooij [Sun, 7 Feb 1999 19:35:40 +0000 (19:35 +0000)]
1) Fix our view of how ibcs2_semid_ds looks. There is no padding int there
(SVR4 does have it so that;s probably the cause of this bug)
2) Add a wrapper function for translation between ibcs2_ipc_perm and
ipc_perm as I think we screwed up when defining the ipc_perm struct and
mixed up 'normal' and creator [ug]id's
3) Fix IBCS2_IPC_STAT semctl. The FreeBSD version needs a union semun
whereas the IBCS2 version gives a struct ibcs2_semid_ds.
Apparently this is all fixed in the SVR4 compatibility code.
PR: 7729
Remove strange-looking quotes. This part of the code is #if'ed out,
and the variable doesn't even exist (though it is referenced elsewhere).
Just make sure it produces error messages when Mike get back to it.
Matt Jacob [Sat, 6 Feb 1999 17:58:06 +0000 (17:58 +0000)]
Hmm- I must be blind. There *was* already an appropriate typedef still
left there. The typedef that was inserted negated the correct typedef.
This may have just been cvs automerge foo. Sorry.
Bill Fenner [Sat, 6 Feb 1999 16:58:50 +0000 (16:58 +0000)]
Don't dump core when p_stat is not in the expected range. This is
only likely to happen when you have a kernel<>userland mismatch,
but it's really annoying when top dumps core and leaves the terminal
in a mangled state; it's much nicer to print nicely formatted gibberish.
Matt Jacob [Sat, 6 Feb 1999 16:39:16 +0000 (16:39 +0000)]
I don't know what happened here- I submitted a *working* patch for
alpha to John Polstra yesterday and it was checked in. Then there
was a bunch of CVS activity, and it ended up with the *broken*
prototype being reinserted. All I see in the history is 'style nits'
as a comment, and I certainly agree with the latter of those two words.
Bruce Evans [Sat, 6 Feb 1999 08:41:06 +0000 (08:41 +0000)]
Added underscores to some names in svr4_locore.s so that it compiles
with -aout. Added translation back to elf names in asnames.h as
usual. The elf names were inconsistent in the aout case even
internally because a macro adds an underscore to just one of them.
Removed commented out code for a previous life of `svr4_esigcode'.
Didn't add an underscore to `svr4_esigcode' since it is correct for
aout although wrong for elf, like most internal names in assembler
files. These names should be in a different namespace so that gprof
can ignore them.
Matthew Dillon [Sat, 6 Feb 1999 07:48:56 +0000 (07:48 +0000)]
Flush delayed-write data out prior to issuing a rename rpc. This appears
to fix the problem w/ NFSV3 whereby a make installworld would get into
high-network-bandwidth situations continuously trying to retry nfs writes
that fail with a 'stale file handle' error.
Bruce Evans [Sat, 6 Feb 1999 07:48:24 +0000 (07:48 +0000)]
Honor ${LDFLAGS} for building svr4_genassym. This is part of fixing
world breakage (mainly for cross-world cases). The world Makefile
attempts to build tools static so that nonexistent or wrong shared
libraries and interpreters don't get used. This is broken anyway
since the world Makefile doesn't know about svr4_genassym.
Force building svr4_genassym static. This is part of "fixing"
aout-to-elf-build breakage. aout-to-elf-build abuses NOTOOLS to
avoid rebuilding all the aout tools. This saves time and avoids
some complications. However, it breaks all the internal tools --
they get linked to target libraries which might not work. Cases
where the host can run the target's static libraries are "fixed"
by encrufting all Makefiles that build internal tools to build the
tools static.
Don't add .depend to CLEANFILES -- it just breaks the separation of
`make cleandepend' from `make clean'.
Matthew Dillon [Sat, 6 Feb 1999 07:22:21 +0000 (07:22 +0000)]
Add hysteresis to the 'swap_pager_getswapspace; failed' console message.
Also widen the hysteresis levels a little ( these really should be
dynamically configured ).
Brian Somers [Sat, 6 Feb 1999 02:54:47 +0000 (02:54 +0000)]
Decouple pap & chap output routines from the corresponding
input routines and take advantage of the new init/continue
interface in libradius. This allows a timely response on
other links in an MP setup while RADIUS requests are in
progress as well as the ability to handle other data from
the peer in parallel. It should also make the future addition
of PAM support trivial.
While I'm in there, validate pap & chap header IDs if
``idcheck'' is enabled (the default) for other FSM packet
types.
NOTE: This involved integrating the generation of chap
challenges and the validation of chap responses
(and commenting what's going on in those routines).
I currently have no way of testing ppps ability
to respond to M$Chap CHALLENGEs correctly, so if
someone could do the honours, it'd be much
appreciated (it *looks* ok!).
Sponsored by: Internet Business Solutions Ltd., Switzerland
Peter Wemm [Sat, 6 Feb 1999 02:28:52 +0000 (02:28 +0000)]
Back out rev 1.89. The #include is necessary for the #if that tests
the value that config(8) provides when intpm is configured. It seems
that somebody forgot to rerun config at the time and commented this out
instead.
Totally change the way variables are accounted for in sysinstall.
Now we know which variables are internal and which need to be
backed to /etc/rc.conf.site. rc.conf is not touched now.
Also kget kernel change information back properly and set up a loader.rc
file to use it.
Kazutaka YOKOTA [Fri, 5 Feb 1999 11:52:13 +0000 (11:52 +0000)]
- Don't assume the line length in the video memory is always the same as
the screen width.
- Store the current video mode information in the `video_adapter' struct.
- The size of the `v_offscreensize' field in the VESA mode information
block is u_int16, not u_int8.
Matthew Dillon [Fri, 5 Feb 1999 07:49:29 +0000 (07:49 +0000)]
The elf loader sets the permissions on bss to VM_PROT_READ|VM_PROT_WRITE
rather then VM_PROT_ALL. obreak, on the otherhand, uses VM_PROT_ALL.
This prevents vm_map_insert() from being able to coalesce the heap and
creates an extra map entry. Since current architectures ignore
VM_PROT_EXECUTE anyway, and since not having VM_PROT_EXECUTE on data/bss
may provide protection in the future, obreak now uses read+write rather
then all (r+w+x).
Matt Jacob [Fri, 5 Feb 1999 07:32:52 +0000 (07:32 +0000)]
Extend unit numbers to a full 10 bits (split into sections
of the minor). Establish and use a control mode open. Control
mode opens may open the device without locking, but are prohibited
from all but some ioctls. MTIOCGET always works. MTIOCERRSTAT
works, but the clearing of latched error status is contingent
upon whether another application has the device open, in which
case an interruptible perip acquire is done. MTSETBSIZ, MTSETDNSTY
and MTCOMP also require a periph aquire.
Relative fileno and blkno are tracked. Note that just about any
error will make these undefined, and if you space to EOD or use
hardware block positioning, these are also lost until the next
UNLOAD or REWIND.
Driver state is also tracked and recorded in the unit softc
to be passed back in mt_dsreg for a MTIOCGET call.
Thanks to Dan Strick for suggesting this.
Reintroduce 2 filemarks at EOD for all but QIC devices. I
really think it's wrong, but there is a lot of 3rd party
software that depends upon this (not the least of which is
tcopy). Introduce a SA_QUIRK_1FM to ensure that some devices
can be marked as only being able to do 1 FM at EOD.
At samount time force a load to BOT if we aren't mounted. If the
LOAD command fails, use the REWIND command (e.g., for the IBM 3590
which for some gawdawful reason doesn't support the LOAD (to BOT)
command).
Also at samount time, if you don't know fixed or variable, try to
*set* to one of the known fixed (or variable, for special case)
density codes. We only have to do this once per boot, so it's not
that painful. This is another way to try and figure out the wierd
QIC devices without having to quirk everything in the universe.
A substantial amount of cleanup as to what operations can and what
operations cannot be retried. Don't retry space operations if they
fail- it'll just lead to lossage.
Not yet done is invalidating mounts correctly after errors. ENOTIME.
Mark Newton [Fri, 5 Feb 1999 03:47:47 +0000 (03:47 +0000)]
Additional note on last rev: The rationale for this is to allow you
to run Solaris executables (or executables from any other ELF system)
directly off the CD-ROM without having to waste megabytes of disk
by copying them to another filesystem just to brand them.
Mark Newton [Fri, 5 Feb 1999 03:43:18 +0000 (03:43 +0000)]
Created sysctl kern.fallback_elf_brand. Defaults to "none", which will
give the same behaviour produced before today. If sysadmin sets it
to a valid ELF brand, ELF image activator will attempt to run unbranded
ELF exectutables as if they were branded with that value.
Matthew Dillon [Thu, 4 Feb 1999 23:50:49 +0000 (23:50 +0000)]
Fix race in pipe read code whereby a blocked lock can allow another
process to sneak in and write to or close the pipe. The read code
enters a 'piperd' state after doing the lock operation without
checking to see if the state changed, which can cause the process
to wait forever.
Matthew Dillon [Thu, 4 Feb 1999 18:25:39 +0000 (18:25 +0000)]
vp->v_object must be valid after normal flow of vfs_object_create()
completes, change if() to KASSERT(). This is not a bug, we are
simplify clarifying and optimizing the code.
In if/else in vfs_object_create(), the failure of both conditionals
will lead to a NULL object. Exit gracefully if this case occurs.
( this case does not normally occur, but needed to be handled ).
Matthew Dillon [Thu, 4 Feb 1999 17:47:52 +0000 (17:47 +0000)]
Fix bug in a KASSERT I introduced in vm_page_qcollapse() rev 1.139.
Since paging is in progress, page scan in vm_page_qcollapse() must be
protected at atleast splbio() to prevent pages from being ripped out from
under the scan.
Add freebsd.fr, for FreeBSD specific forth source. Add $ and %, to
replace the lost @ and - functionality of include. $ has the opposite
behavior of @ though, since the default behavior was inverted.
Change include() so it will be able to load files with forth code,
instead of just builtins. Remove #@- from the include section of the
help file, since they don't work in the new version of include, unless
BOOT_FORTH is not defined.
Change bf_run() so it will return the result returned by ficlExec(). Also,
make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec()
doesn't do it by itself. (Things worked previously because nothing
recursed through ficlExec() by the way of bf_run()).
Change/extend comments on builtin behavior.
Search for "interpret" at the end of bf_init(), so /boot/boot.4th can
provide it's own version.