Jeff Roberson [Mon, 17 Feb 2003 05:14:26 +0000 (05:14 +0000)]
- Split the struct kse into struct upcall and struct kse. struct kse will
soon be visible only to schedulers. This greatly simplifies much the
KSE code.
Back out "drop first N values" method of removing monotonically increased
seed->first value correlation. It breaks rand_r()... Other possible methods
like shuffling inside aray will breaks rand_r() too, because it assumes
only one word state, i.e. nothing extra can be added after seed assignment
in srand().
BTW, for old formulae seed->first value correlation is not so monotonically
increased as with other Linear Congruential Generators of this type only
becase arithmetic overflow happens. But overflow affects distribution
and lower bits very badly, as many articles says, such type of overflow
not improves PRNG.
So, monotonically increased seed->first value correlation problem remains...
Tim J. Robbins [Mon, 17 Feb 2003 03:51:44 +0000 (03:51 +0000)]
Second attempt at removing machdep.h and using ALIGN from <sys/param.h>.
The problem with the previous attempt, as noticed by Marcel, was that
stacknxt was being aligned to a pointer boundary instead of an
ALIGNBYTES + 1 boundary, which broke sparc64.
Andrew Gallatin [Sun, 16 Feb 2003 19:25:04 +0000 (19:25 +0000)]
zero the end of the memory cluster we're disposing of. Otherwise teh
vm page startup code finds a 20GB cluster on this wacky alphaserver I'm
working on..
Andrew Gallatin [Sun, 16 Feb 2003 17:30:49 +0000 (17:30 +0000)]
When trimming memory to fit Maxmem, and we discard an entire cluster,
make certain to subtract its pages from physmem. Otherwise we end up
running phys_avail_cnt negative, and bad stuff happens.
Jacques Vidrine [Sun, 16 Feb 2003 17:29:11 +0000 (17:29 +0000)]
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.
Paranoia: instead of a NULL conversation function, use one that always
returns PAM_CONV_ERR; moreover, make sure we always have the right
conversation function installed before calling PAM service functions.
Also unwrap some not-so-long lines.
Jeff Roberson [Sun, 16 Feb 2003 10:43:06 +0000 (10:43 +0000)]
- Introduce a new function bremfreel() that does a bremfree with the buf
queue lock already held.
- In getblk() and flushbufqueues() use bremfreel() while we still have the
buf queue lock held to keep the lists consistent.
- Add LK_NOWAIT to two cases where we're essentially asserting that the bufs
are not locked while acquiring the locks. This will make sure that we get
the appropriate panic() and not another one for sleeping with a lock held.
Pass FTP_PASSIVE_MODE, FTP_PROXY, and HTTP_PROXY variables to chroot sandbox.
These variables will be used by pkg_add, which installs mkisofs package
while MAKE_ISOS=YES. See src/release/${arch}/mkisoimages.sh if you doubt.
Tim J. Robbins [Sun, 16 Feb 2003 03:28:11 +0000 (03:28 +0000)]
Temporarily back out machdep.h/ALIGN changes. It seems that on sparc64,
using the alignment from sys/param.h (16) instead of the alignment
from machdep.h (8) tickled a nasty bug in the memory allocator that I
haven't been able to track down yet.
Warner Losh [Sun, 16 Feb 2003 02:06:50 +0000 (02:06 +0000)]
Checkpoint a work in progress:
o Use the common pci_* routines in preference to the copied and hacked
routines from an ancient pci.c.
This saves 509 lines in cardbus.c. More savings to follow when I
convert the resource code over. In the past when I've done this the
resource code conversion breaks cardbus in subtle ways so I'm doing a
1/2 way checkpoint this time. cardbus still works for me the same as
it did before.
It also looks like cardbus devices now show up as pci bus devices to
pciconf -l, but maybe that was happening before.
Inspired by a patch from Justin Gibbs many moons ago. When he
finishes his kobj multiple inheritance work, we can transition the
finished version of this work to that fairly easily.
Warner Losh [Sun, 16 Feb 2003 02:02:44 +0000 (02:02 +0000)]
Use rman_get_device rather than rle->resl->r_dev.
make pci_hdrtypedata and pci_read_extcap accessible (but maybe in the end
we'll make them private again).
Remove {man,cat}n from /usr/share/man. They had been added for TCL,
but it's no longer a part of the base-system and buildworld works fine
here after deleting them both on disk and from the mtree spec files.
Tor Egge [Sat, 15 Feb 2003 22:43:05 +0000 (22:43 +0000)]
Avoid file lock leakage when linuxthreads port or rfork is used:
- Mark the process leader as having an advisory lock
- Check if process leader is marked as having advisory lock when
closing file
- Check that file is still open after lock has been obtained
- Don't allow file descriptor table sharing between processes
with different leaders
Marcel Moolenaar [Sat, 15 Feb 2003 20:58:32 +0000 (20:58 +0000)]
Fix misuse of Maxmem in the calculation of the VHPT size. Maxmem
is already in pages, so we should not convert from bytes to pages.
The result of this bug was bad scaling of the VHPT relative to the
available memory.
Alan Cox [Sat, 15 Feb 2003 20:01:09 +0000 (20:01 +0000)]
Remove the acquisition and release of Giant around pmap_growkernel().
It's unnecessary for two reasons: (1) Giant is at present already held in
such cases and (2) our various implementations of pmap_growkernel() look to
be MP safe. (For example, for sparc64 the proof of (2) is trivial.)
David E. O'Brien [Sat, 15 Feb 2003 19:05:10 +0000 (19:05 +0000)]
Update for version 3.40.
* We have inttypes.h (yes, even in RELENG_4).
* We now have GNU getopt, so lets be the first thing in the tree to
acutally use it...
Andrew R. Reiter [Sat, 15 Feb 2003 18:58:06 +0000 (18:58 +0000)]
- Remove old comment for PURGE() as it no longer exists and implied it
was a comment to cache_zap().
- Add a comment to quickly state what cache_zap() does.
Sean Chittenden [Sat, 15 Feb 2003 10:57:20 +0000 (10:57 +0000)]
Add the Space Shuttle Columbia incident to calendar.history. While here
move LOTR "history" events into their own calendar file. Link
calendar.lotr into calendar.world to preserve visibility of this pre-trendy
gem in BSD.
Sean Chittenden [Sat, 15 Feb 2003 10:26:10 +0000 (10:26 +0000)]
flexlint rears its head as well as some style(9) fixes[1]. Fixed a
few bugs for a few corner cases and correctly handle the case where
read(2) is read()'ing from a non-file descriptor and could get fewer
bytes back than the buffer, but it isn't EOF[2]. random(6) extensively
tested and believed to be bug free (save performance for large files).
Tim J. Robbins [Sat, 15 Feb 2003 09:56:09 +0000 (09:56 +0000)]
Acquire Giant around calls to kern_sigaction() in sigaction(),
freebsd4_sigaction() and osigaction() instead of around the whole
body of those functions. They now no longer hold Giant around calls
to copyin() and copyout(), and it is slightly more obvious what
Giant is protecting.