Attilio Rao [Wed, 7 May 2008 21:50:17 +0000 (21:50 +0000)]
Add a new awk script which parses informations returned by the newly
added sysctl debug.witness.graphs and returns all the graphs involving
Giant lock creating an appropriate script in DOT format which can be
plotted immediately.
Submitted by: Michele Dallachiesa <michele dot dallachiesa at poste dot it>
Attilio Rao [Wed, 7 May 2008 21:41:36 +0000 (21:41 +0000)]
Add a new witness sysctl which returns the relations between any lock
and its children in the form:
"parent","child"
so that head and bottom of an oriented graph can be easilly detected and
various form of diagrams can be build.
The sysctl is called debug.witness.graphs and it is read-only; in order
to get the list of relations, a simple:
#sysctl debug.witness.graphs
will do the trick.
This approach has been choosen in order to support easilly things like
the DOT format and such. Soon, an auto-explicative awk script, which
filters simple informations returned by the sysctl and converts them into
a real DOT script, will be committed to the repository between examples.
Marius Strobl [Wed, 7 May 2008 21:22:15 +0000 (21:22 +0000)]
- Use the name returned by device_get_nameunit(9) for the name of the
counter-timer timecounter so the associated SYSCTL nodes don't clash on
machines having multiple U2P and U2S bridges as well as establishing a
clear mapping between these bridges and their timecounter device.
- Don't bother setting up a "nice" name for the IOMMU, just use the name
returned by device_get_nameunit(9), too.
- Fix some minor style(9) bugs.
- Use __FBSDID in counter.c
John Baldwin [Wed, 7 May 2008 17:49:31 +0000 (17:49 +0000)]
Only output details about the current working directory of a process if
the vnode pointer is not NULL. This avoids spurious warnings in fstat -v
output for kernel processes.
Adrian Chadd [Wed, 7 May 2008 07:23:47 +0000 (07:23 +0000)]
Include a very basic (and beta) tool for stressing disks using the POSIX
AIO calls.
This small program queues up a controllable number of concurrent AIO
read operations w/ controllable io size against a disk or regular file.
There are a few other things to add (notably optional write support!)
but it works well enough at the present time to stress the AIO code out
relatively harshly in the disk IO case.
Daichi GOTO [Wed, 7 May 2008 05:32:55 +0000 (05:32 +0000)]
- change function name from *_vdir to *_vnode because
VSOCK has been added as cache target. Now they process
not only VDIR but also VSOCK.
- fixed panic issue caused by cache incorrect free process
by "umount -f"
John Baldwin [Tue, 6 May 2008 20:49:53 +0000 (20:49 +0000)]
Add a new personality to mpt(4) devices to allow userland applications to
perform various operations on a controller. Specifically, for each mpt(4)
device, create a character device in devfs which accepts ioctl requests for
reading and writing configuration pages and performing RAID actions.
Fix the problem with the C++ exception handling for the multithreaded
programs.
From the PR description:
The gcc runtime's _Unwind_Find_FDE function, invoked during exception
handling's stack unwinding, is not safe to execute from within multiple
threads. FreeBSD' s dl_iterate_phdr() however permits multiple threads
to pass through it though. The result is surprisingly reliable infinite
looping of one or more threads if they just happen to be unwinding at
the same time.
Introduce the new lock that is write locked around the dl_iterate_pdr,
thus providing required exclusion for the stack unwinders.
PR: threads/123062
Submitted by: Andy Newman <an at atrn org>
Reviewed by: kan
MFC after: 2 weeks
Robert Watson [Tue, 6 May 2008 00:32:23 +0000 (00:32 +0000)]
When testing whether to enter the audit argument gathering code, rather
than checking whether audit is enabled globally, instead check whether
the current thread has an audit record. This avoids entering the audit
code to collect argument data if auditing is enabled but the current
system call is not of interest to audit.
John Baldwin [Mon, 5 May 2008 19:13:52 +0000 (19:13 +0000)]
Fix a few edge cases with error handling in cpufreq(4)'s CPUFREQ_GET()
method:
- If the last of the child cpufreq drivers returns an error while trying to
fetch its list of supported frequencies but an earlier driver found the
requested frequency, don't return an error to the caller.
- If all of the child cpufreq drivers fail and the attempt to match the
frequency based on 'cpu_est_clockrate()' fails, return ENXIO rather than
returning success and returning a frequency of CPUFREQ_VAL_UNKNOWN.
MFC after: 3 days
PR: kern/121433
Reported by: Eugene Grosbein eugen ! kuzbass dot ru
Bjoern A. Zeeb [Mon, 5 May 2008 18:42:17 +0000 (18:42 +0000)]
Use a better approach to force the interrupt which should work for
all cards/modes.
In addition to the intr forcing added with rev. 1.205 adopt the other
places to use the same logic.
We need to exclude a few chips/revisions (5700, 5788) from using the
enhanced version and fall back to the old way as that is the only
method they support.
Tested by: phk
Suggested by: davidch, Broadcom (thanks a lot for the help!)
MFC after: 16 days
John Baldwin [Mon, 5 May 2008 16:03:52 +0000 (16:03 +0000)]
Expose FILE's internals to the world again in all their glory. Restore
all the previous inline optimizations as well. FILE is back to using
__mbstate_t, struct pthread *, and struct pthread_mutex *.
Do not read away the target directory entry when encountering deleted
files after a seekdir().
The seekdir shall set the position for the next readdir operation.
When the _readdir_unlocked() encounters deleted entry, dd_loc is
already advanced. Continuing the loop leads to premature read of
the target entry.
Submitted by: Marc Balmer <mbalmer at openbsd org>
Obtained from: OpenBSD
MFC after: 2 weeks
Mike Makonnen [Mon, 5 May 2008 06:31:41 +0000 (06:31 +0000)]
o Change the warning dialog for the 'W' command in both the label
and partition editors to reflect the fact that this is a stand-alone
application, not sysinstall(8).
o Change an instance of sade(8) refering to itself as sysinstall(8) in
a confirmation dialog.
Kip Macy [Mon, 5 May 2008 01:41:53 +0000 (01:41 +0000)]
MFSVN:
- add / remove clients from cxgb_main.c now
- change ifdef TOE_ENABLED to TCP_OFFLOAD_DISABLE
- update copyrights
- fix transmit data mismatch bug caused by not setting SB_NOCOALESCE
on tx sockbuf on passive connections
- fix receive sequence mismatch bug caused by not setting SB_NOCOALESCE
on rx sockbuf on passive connections
- don't sleep without checking SBS_CANTRCVMORE first
- various ddp ordering fixes
Peter Wemm [Sun, 4 May 2008 23:29:38 +0000 (23:29 +0000)]
Expand kdb_alt_break a little, most commonly used with the option
ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the
debugger), there is now "Enter ~ ctrl-P" (force panic) and
"Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons).
We've used variations of this at work. The force panic sequence is
best used with KDB_UNATTENDED for when you just want it to dump and
get on with it.
The reboot request is a safer way of getting into single user than
a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc).
It gives init the reboot signal, which causes an orderly reboot.
I've taken my best guess at what the !x86 and non-sio code changes
should be.
This also makes sio release its spinlock before calling KDB/DDB.
Marius Strobl [Sun, 4 May 2008 14:59:25 +0000 (14:59 +0000)]
Don't build unused SBus front-ends for sun4v, don't build EBus front-ends
which are also likely to be irrelevant for sun4v (there's no SBus on sun4v
and only some EBus devices). While at it fix some style bugs according to
style.Makefile(5) where appropriate.
Attilio Rao [Sun, 4 May 2008 13:54:55 +0000 (13:54 +0000)]
sync_vnode() has some messy code about locking in order to deal with
mount fs needing Giant to be held when processing bufobjs.
Use a different subqueue for pending workitems on filesystems requiring
Giant. This simplifies the code notably and also reduces the number of
Giant acquisitions (and the whole processing cost).
Suggested by: jeff
Reviewed by: kib
Tested by: pho
Unbreak build: libftpio gropes inside struct __sFILE. Implement
accessor functions for its benefit now thaat FILE is opaque.
I'm sure there's a better way. I leave that for people to work
on in a src tree that isn't broken.
Bruce M Simpson [Sat, 3 May 2008 02:29:02 +0000 (02:29 +0000)]
Relinquish exclusive TTY access when tip(1) or cu(1) exit.
Previously they would have left TIOCEXCL enabled, requiring
either a reboot or use of tip/cu as the root user.
Observed when running QEMU with character devices redirected to pty instances.
John Baldwin [Fri, 2 May 2008 15:25:07 +0000 (15:25 +0000)]
Next round of stdio changes: Remove all inlining of stdio operations and
move the definition of the type backing FILE (struct __sFILE) into an
internal header.
- Remove macros to inline certain operations from stdio.h. Applications
will now always call the functions instead.
- Move the various foo_unlocked() functions from unlocked.c into foo.c.
This lets some of the inlining macros (e.g. __sfeof()) move into
foo.c.
- Update a few comments.
- struct __sFILE can now go back to using mbstate_t, pthread_t, and
pthread_mutex_t instead of knowing about their private, backing types.
Tim Kientzle [Fri, 2 May 2008 05:40:05 +0000 (05:40 +0000)]
Documentation updates:
* --format can be used with -r or -u
* -o is a synonym for --format=ustar when used with -c, -r, or -u
Also, fix the erroneous sanity check that suppressed --format with -r or -u.
John Baldwin [Thu, 1 May 2008 20:36:48 +0000 (20:36 +0000)]
- Change how the vmcore target maps FreeBSD thread IDs to GDB ptids. We
now only use the TID and ignore the PID and use pid_to_ptid() to build a
ptid treating the TID as a PID. The benefit of this is that the vmcore
target now uses the same scheme as GDB's remote targets. As a result,
the 'tid' command now works for remote targets (however, it only accepts
TIDs and not addresses of 'struct thread' objects).
- Use gdb_thread_select() to do the actual thread switch for the 'tid' and
'proc' commands. This now gives the same UI feedback when switching
threads as the GDB 'thread' command rather than providing no visual
output at all.
Jason Evans [Thu, 1 May 2008 17:25:55 +0000 (17:25 +0000)]
Add a separate tree to track arena chunks that contain dirty pages.
This substantially improves worst case allocation performance, since
O(lg n) tree search can be used instead of O(n) tree iteration.
Use rb_wrap() instead of directly calling rb_*() macros.