Andrew Gallatin [Mon, 19 Jul 2004 23:56:07 +0000 (23:56 +0000)]
Fix printing of long doubles to match the size that
gcc is using. This fixes devstat consumers (like vmstat, iostat,
systat) so they don't print crazy zillion digit numbers for
disk transfers and bandwidth.
According to gcc, long doubles are 64-bits, rather than 128 bits
like the SVR4 ABI spec wants them to be.. Note that MacOSX also treats
long doubles as 64-bits, and not 128 bits, so we are in good company.
Brian Feldman [Mon, 19 Jul 2004 23:29:36 +0000 (23:29 +0000)]
Remove extraneous locks on the VM free page queue mutex; it is not
meant to be recursed upon, and could cauuse a deadlock inside the
new contigmalloc (vm.old_contigmalloc=0) code.
Fix a potential panic in the SACK code that was causing
1) data to be sent to the right of snd_recover.
2) send more data then whats in the send buffer.
The fix is to postpone sack retransmit to a subsequent recovery episode
if the current retransmit pointer is beyond snd_recover.
Thanks to Mohan Srinivasan for helping fix the bug.
usbdi.c rev. 1.104, author: mycroft
ugen_isoc_rintr() may recycle the xfer immediately. Therefore, we
avoid touching the xfer after calling the callback in
usb_transfer_complete(). From PR 25960.
Alan Cox [Mon, 19 Jul 2004 18:12:04 +0000 (18:12 +0000)]
- Eliminate the pte object from the pmap. Instead, page table pages are
allocated as "no object" pages. Similar changes were made to the amd64
and i386 pmap last year. The primary reason being that maintaining
a pte object leads to lock order violations. A secondary reason being
that the pte object is redundant, i.e., the page table itself can be
used to lookup page table pages. (Historical note: The pte object
predates our ability to allocate "no object" pages. Thus, the pte
object was a necessary evil.)
- Unconditionally check the vm object lock's status in vm_page_remove().
Previously, this assertion could not be made on Alpha due to its use
of a pte object.
Allow the user who calls doadump() from the kernel debugger
to not get a page fault if he has not defined a dump device.
Panic can often not do a dump as it can hang forever in some cases.
The original PR was for amd64 only. This is a generalised version of
that change.
PR: amd64/67712
Submitted by: wjw@withagen.nl <Willen Jan Withagen>
Robert Watson [Mon, 19 Jul 2004 17:15:51 +0000 (17:15 +0000)]
Re-style at_control.c to bring it closer to style(9), primarily with
regard to function prototypes and indentation. The lack of indentation
in if clauses and case statements made this code extremely difficult
to read.
prgregset_t changed type from being a typedef of struct reg to an
array of one element of type struct reg. Change the argument to
libc_r_md_getgregs() accordingly.
John Baldwin [Mon, 19 Jul 2004 16:37:47 +0000 (16:37 +0000)]
As a temporary hack, turn off deferred preemptions that are the result of
a fast interrupt handler doing an swi_sched(). This fixed the lockups I
saw on my laptop when using xmms in KDE and on rwatson's MySQL benchmarks
on SMP. This will eventually be removed and/or modified when I figure out
what the root cause is and fix that.
Brian Feldman [Mon, 19 Jul 2004 15:05:24 +0000 (15:05 +0000)]
Since breakage of malloc(9)/uma_zalloc(9) is totally non-optional in
GENERIC/for WITNESS users, make sure the sysctl to disable the behavior
is read-only and always enabled.
Make it clearer what means 'won't work' for .if string == ${VAR}.
Replace the use of '=' in conditionals in the examples
by the more correct '=='.
Clarify the example explaining that .for expansion takes place before
.if handling by showing the correct code instead of saying 'the other
way around'. Change a variable name there so the example is more parseable
to the human reader.
PR: docs/65400
Submitted by: Roman Neuhauser <neuhauser@chello.cz>
Tim J. Robbins [Mon, 19 Jul 2004 11:18:56 +0000 (11:18 +0000)]
Move exit status information into a DIAGNOSTICS section. Add an ENVIRONMENT
section. Re-add a sentence from the BUGS section that went missing in
the previous commit.
Tim J. Robbins [Mon, 19 Jul 2004 11:12:02 +0000 (11:12 +0000)]
Add support for multibyte characters. While here, fix a longstanding bug in
the implementation of the -d option: we were skipping too many characters
when a non-alphanumeric character was encountered.
David Schultz [Mon, 19 Jul 2004 08:24:04 +0000 (08:24 +0000)]
Forced commit to note that the previous commit message doesn't apply
to the ARM port. We set FLT_ROUNDS to -1 (indeterminate), because the
rounding mode on ARM is static, i.e. part of the FP instruction
format. Or at least that's my understanding.
MFp4: Add two options for gnop(8)'s 'create' command:
-o offset - specifies where to start on the original provider
-s size - specifies size of the transparent provider
Brian Feldman [Mon, 19 Jul 2004 06:21:27 +0000 (06:21 +0000)]
Reimplement contigmalloc(9) with an algorithm which stands a greatly-
improved chance of working despite pressure from running programs.
Instead of trying to throw a bunch of pages out to swap and hope for
the best, only a range that can potentially fulfill contigmalloc(9)'s
request will have its contents paged out (potentially, not forcibly)
at a time.
The new contigmalloc operation still operates in three passes, but it
could potentially be tuned to more or less. The first pass only looks
at pages in the cache and free pages, so they would be thrown out
without having to block. If this is not enough, the subsequent passes
page out any unwired memory. To combat memory pressure refragmenting
the section of memory being laundered, each page is removed from the
systems' free memory queue once it has been freed so that blocking
later doesn't cause the memory laundered so far to get reallocated.
The page-out operations are now blocking, as it would make little sense
to try to push out a page, then get its status immediately afterward
to remove it from the available free pages queue, if it's unlikely to
have been freed. Another change is that if KVA allocation fails, the
allocated memory segment will be freed and not leaked.
There is a sysctl/tunable, defaulting to on, which causes the old
contigmalloc() algorithm to be used. Nonetheless, I have been using
vm.old_contigmalloc=0 for over a month. It is safe to switch at
run-time to see the difference it makes.
A new interface has been used which does not require mapping the
allocated pages into KVA: vm_page.h functions vm_page_alloc_contig()
and vm_page_release_contig(). These are what vm.old_contigmalloc=0
uses internally, so the sysctl/tunable does not affect their operation.
When using the contigmalloc(9) and contigfree(9) interfaces, memory
is now tracked with malloc(9) stats. Several functions have been
exported from kern_malloc.c to allow other subsystems to use these
statistics, as well. This invalidates the BUGS section of the
contigmalloc(9) manpage.
When calling scheduler entrypoints for creating new threads and processes,
specify "us" as the thread not the process/ksegrp/kse.
You can always find the others from the thread but the converse is not true.
Theorotically this would lead to runtime being allocated to the wrong
entity in some cases though it is not clear how often this actually happenned.
(would only affect threaded processes and would probably be pretty benign,
but it WAS a bug..)
Reverse a lock/unlock pair that were the wrong way around in some code that
is obviously not run a lot. (but is in some test cases).
This code is not usually run because it covers a case that doesn't
happen a lot (removing a node that has data traversing it).
Mike Silbersack [Sun, 18 Jul 2004 21:39:45 +0000 (21:39 +0000)]
Clarify boot.8 (i386 version) a bit, so that people know
where boot.config needs to reside. Also change /kernel
to /boot/loader, as that is the apparent default now. This
man page probably requires more updates.
Alan Cox [Sun, 18 Jul 2004 21:19:10 +0000 (21:19 +0000)]
Utilize pmap_pte_quick() rather than pmap_pte() in pmap_protect(). The
reason being that pmap_pte_quick() requires the page queues lock, which is
already held, rather than Giant.
After maintaining previous behaviour in writing out the core notes, it's
time now to break with the past: do not write the PID in the first note.
Rationale:
1. [impact of the breakage] Process IDs in core files serve no immediate
purpose to the debugger itself. They are only useful to relate a core
file to a process. This can provide context to the person looking at
the core file, provided one keeps track of this. Overall, not having
the PID in the core file is only in very rare occasions unfortunate.
2. [reason of the breakage] Having one PRSTATUS note contain the PID,
while all others contain the LWPID of the corresponding kernel thread
creates an irregularity for the debugger that cannot easily be worked
around. This is caused by libthread_db correlating user thread IDs to
kernel thread (aka LWP) IDs and thus aware of the actual LWPIDs.
Gary Jennejohn [Sun, 18 Jul 2004 20:13:31 +0000 (20:13 +0000)]
Fix a possible hang which apparently occurs during a warm boot (cold boot
does not display the symptom). Evidently the ifpi2 controller needs to be
massaged more than it was.
Note that this does not close the PR since it was filed against 4.9.
MFC: 5 days
PR: kern/68756
Submitted by: Ari Suutari <ari.suutari@syncrontech.com>
This library is not WARNS=2 clean for -O2 builds, because we include
headers from libpthread that are not WARNS=2 clean for -O2 builds.
Lower the WARNS level to 1. This is the highest level possible for
now.
Correct the mess I made by committing from the wrong tree. Most
notably, this restores some of the contents in thread_db.h as well
as David Xu's copyright notice. This also fixes the includes in
the MD libpthread files which Scott tried to provide a quick fix
for.
David Malone [Sun, 18 Jul 2004 19:10:36 +0000 (19:10 +0000)]
The recent changes to control message passing broke some things
that get certain types of control messages (ping6 and rtsol are
examples). This gets the new code closer to working:
1) Collect control mbufs for processing in the controlp ==
NULL case, so that they can be freed by externalize.
2) Loop over the list of control mbufs, as the externalize
function may not know how to deal with chains.
3) In the case where there is no externalize function,
remember to add the control mbuf to the controlp list so
that it will be returned.
4) After adding stuff to the controlp list, walk to the
end of the list of stuff that was added, incase we added
a chain.
This code can be further improved, but this is enough to get most
things working again.
Mark Murray [Sun, 18 Jul 2004 18:55:31 +0000 (18:55 +0000)]
Rename a preposterously long name with one that might look a bit
more professional. While here, write a few lines of explanatory
text to explain what its for.
For the gbde attach script:
- Ask the user up to X times (3 by default) for the pass-phrase, if
it is incorrect the first time.
- Add support for storing the lockfiles in another other directory
than /etc.
- Document that it is possible to override the location of each single
lockfile.
Scott Long [Sun, 18 Jul 2004 15:59:03 +0000 (15:59 +0000)]
Enable ADAPTIVE_MUTEXES by default by changing the sense of the option to
NO_ADAPTIVE_MUTEXES. This option has been enabled by default on amd64 for
quite some time, and has been extensively tested on i386 and sparc64. It
shows measurable performance gains in many circumstances, and few negative
effects. It would be nice in t he future if adaptive mutexes actually went
to sleep after a certain amount of spinning, but that will require quite a
bit more testing.
Tim J. Robbins [Sun, 18 Jul 2004 10:11:27 +0000 (10:11 +0000)]
Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.
Tim J. Robbins [Sun, 18 Jul 2004 06:56:40 +0000 (06:56 +0000)]
Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.
Hook libthread_db into the build, except for arm and powerpc.
Porting libthread_db to arm and/or powerpc is easy enough, but
we don't build gdb on those platforms yet.
Add rudimentary support and stubs for libthr and libc_r on alpha, amd64,
i386, ia64 and sparc64. Add stubs for alpha, amd64, ia64 and sparc64 for
libpthread.
Restructure the source files to avoid unnecessary use of subdirectories
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).
The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).
The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.
Remove the dependency of the :C/regexp/replacement/ variable modifier
from the :S modifier which follows a bit further below. This way the
reader can read each of these two descriptions without having to jump
back and forth in the manpage.
PR: docs/26943
Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Robert Watson [Sun, 18 Jul 2004 01:29:43 +0000 (01:29 +0000)]
Drop Giant and acquire the UNIX domain socket subsystem lock a bit
earlier in unp_connect() so that vp->v_socket can't change between
our copying its value to a local variable and later use of that
variable. This may have been responsible for a panic during
shutdown that I experienced where simultaneous closing of a listen
socket by rpcbind and a new connection being made to rpcbind by
mountd.