Commit Graph

156005 Commits

Author SHA1 Message Date
Jilles Tjoelker
3d0f8bcd30 libedit: Allow simple quoting in filename completion.
The completer recognizes characters escaped with backslashes as being
literal parts of a word, and adds backslashes to avoid almost all
misinterpretation. In particular, filenames containing spaces can be
completed correctly.

For bug compatibility with the NetBSD version, the improved completion
function has a new name, _el_fn_sh_complete, and _el_fn_complete is
unchanged.

Submitted by:	Guy Yur
2010-06-15 21:34:57 +00:00
Jack F Vogel
0dee704f01 Change to have legacy interrupts use the same
handler had a flaw, thanks to John Baldwin for
finding it. Change which queue legacy tasks are
enqueued on.

MFC: soonest
2010-06-15 21:11:51 +00:00
Jilles Tjoelker
da8301c83a libedit: Fix a bug that could make completion listings incomplete.
The element matches[0] is the common prefix and is not counted in len, so
subtracting 1 is not needed. A counter for the number of matches per line
was incremented twice.

Submitted by:	Guy Yur
2010-06-15 21:00:53 +00:00
Jung-uk Kim
547d94bde3 Implement flexible BPF timestamping framework.
- Allow setting format, resolution and accuracy of BPF time stamps per
listener.  Previously, we were only able to use microtime(9).  Now we can
set various resolutions and accuracies with ioctl(2) BIOCSTSTAMP command.
Similarly, we can get the current resolution and accuracy with BIOCGTSTAMP
command.  Document all supported options in bpf(4) and their uses.

- Introduce new time stamp 'struct bpf_ts' and header 'struct bpf_xhdr'.
The new time stamp has both 64-bit second and fractional parts.  bpf_xhdr
has this time stamp instead of 'struct timeval' for bh_tstamp.  The new
structures let us use bh_tstamp of same size on both 32-bit and 64-bit
platforms without adding additional shims for 32-bit binaries.  On 64-bit
platforms, size of BPF header does not change compared to bpf_hdr as its
members are already all 64-bit long.  On 32-bit platforms, the size may
increase by 8 bytes.  For backward compatibility, struct bpf_hdr with
struct timeval is still the default header unless new time stamp format is
explicitly requested.  However, the behaviour may change in the future and
all relevant code is wrapped around "#ifdef BURN_BRIDGES" for now.

- Add experimental support for tagging mbufs with time stamps from a lower
layer, e.g., device driver.  Currently, mbuf_tags(9) is used to tag mbufs.
The time stamps must be uptime in 'struct bintime' format as binuptime(9)
and getbinuptime(9) do.

Reviewed by:	net@
2010-06-15 19:28:44 +00:00
Sean Bruno
bf96595915 Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation.

Expand the debugger hook, db_show_uma, to display these results as well.

This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.

Reviewed by:	rwatson alc
Approved by:	scottl (mentor) peter
Obtained from:	Yahoo Inc.
2010-06-15 19:28:37 +00:00
Alexander Motin
ce304e0820 When Emulate3Button is active, do not set select() timeout in states when
it is not needed. No need to kick CPU every 20ms without a purpose.

Reviewed by:	philip@
2010-06-15 19:19:04 +00:00
John Baldwin
42040ff081 When updating individual CPU's lowest Cx state to use, never set it to a
state lower than the lowest one supported by the current CPU.  This closes
some races with changes to the hw.acpi.cpu_cx_lowest sysctl while Cx
states for individual CPUs were changing (e.g. unplugging the AC adapter
of a laptop) that could result in panics.

Submitted by:	Giovanni Trematerra
Tested by:	David Demelier  demelier dot david of gmail
MFC after:	3 days
2010-06-15 19:14:39 +00:00
John Baldwin
61d3f0bab2 Restore the machine check register banks on resume. For banks being
monitored via CMCI, reset the interrupt threshold to 1 on resume.

Reviewed by:	jkim
MFC after:	2 weeks
2010-06-15 18:51:41 +00:00
Alan Cox
ecd5dd957d Eliminate unnecessary page queues locking. 2010-06-15 18:37:31 +00:00
Warner Losh
358b781628 Allow population of /cfg and /data. Begin the move to making all
slice creation overrideable too, but there's a few problems doing that
for the duplicated partitions (s1 and s2), so just comment that it
needs work.

MFC after:	3 days
2010-06-15 18:18:31 +00:00
Warner Losh
77f9b8a393 Create a make.conf. not needed for runtime, but some ports want to spam it
at compile or install time.

MFC after:	3 days
2010-06-15 18:16:45 +00:00
Konstantin Belousov
07c809237a Remove two obsoleted comments, add a note about 32bit compatibility.
MFC after:	1 month
2010-06-15 18:16:04 +00:00
Warner Losh
d8e85077eb make these convenience functions more convenient by accepting all
args, not just the first.  makes mechanical conversion of old style
more forgiving.

MFC after:	3 days
2010-06-15 18:11:37 +00:00
Ed Schouten
d5f03e1f81 Remove even two more unneeded files from libllvmsupport. 2010-06-15 17:28:16 +00:00
Ed Schouten
9987dff003 Remove unneeded files from the build.
I used the following command to determine which source files were
unneeded:

| for i in `find lib/clang -name '*.o'`
| do
| 	MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
| 		usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
| 		sort | uniq -d | wc -l`"
| 	[ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done

This should slightly improve the build times.
2010-06-15 17:08:03 +00:00
Konstantin Belousov
4a23ecc77e Rename CRITSECT_ASSERT to CRITICAL_ASSERT.
Suggested by:	jhb
MFC after:	1 month
2010-06-15 14:59:35 +00:00
Edwin Groothuis
c9e4fb34cb Make mandoc/mdocml happy.
Submitted by:	Uli(?) via gmane.comp.time.tz
2010-06-15 11:37:33 +00:00
Andrey V. Elsukov
516ce862b0 Make all tests in libdialog compilable.
Fix coredump in menu3.c.

Approved by:	kib (mentor)
2010-06-15 10:01:49 +00:00
Konstantin Belousov
8284562954 Fix the syscall module name after r205320.
Submitted by:	Vladislav Movchan <vladislav.movchan gmail com>
MFC after:	1 week
2010-06-15 09:30:36 +00:00
Konstantin Belousov
997534958e Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by:	bde
Tested by:	pho
MFC after:	1 month
2010-06-15 09:19:33 +00:00
Konstantin Belousov
1c6e435051 Add assert to check that the (current) thread is in critical section.
MFC after:	1 month
2010-06-15 09:18:27 +00:00
Fabien Thomas
04e2fe6990 Set the comment at the right place for PMC uncore classes.
Submitted by: rstone
MFC after: 1 month
2010-06-15 09:12:31 +00:00
Alexander Leidinger
63669de232 Add a periodic zfs scrub script.
Features:
 - configurable amount of days between scrubs (default value or per pool)
 - do not scrub directly after pool creation (respects the configured
   number of days between scrubs)
 - do not scrub if a scrub is in progress
 - tells how to see the status of the scrub
 - tells how many days since the last scrub if it skips the scrubbing
 - warns if a non-existent pool is specified explicitely
   (default: no pools specified -> all currently imported pools are
   handled)
 - runs late in the periodic run to not slow down the other periodic daily
   scripts

Discussed on:	fs@
2010-06-15 08:58:16 +00:00
Andrey V. Elsukov
cac2fe695e * Include sys/systm.h for KASSERT()
* Remove unneeded includes and comment
* Replace home made OFFSETOF() macro with standard offsetof()

Pointed out by:	bde
Approved by:	kib (mentor)
2010-06-15 08:53:13 +00:00
Andriy Gapon
a9bdb5d3ad sound/pcm: use non-const string as a value with SYSCTL_STRING
Although the sysctls are marked with CTLFLAG_RD and the values will stay
immutable, current sysctl implementation stores value pointer in
void* type, which means that const qualifier is discarded anyway
and some newer compilers complaint about that.
We can't use de-const trick in sysctl implementation, because in that
case we could miss an opposite situation where a const value is used
with CTLFLAG_RW sysctl.

Complaint from:	gcc 4.4, clang
MFC after:	2 weeks
2010-06-15 07:06:54 +00:00
Ed Schouten
09071d46ab err() takes a printf format.
Submitted by:	Pawel Worach
Spotted by:	clang
2010-06-15 04:47:16 +00:00
Rick Macklem
a8437c97f1 Add MODULE_DEPEND() macros to the experimental NFS client and
server so that the modules will load when kernels are built with
none of the NFS* configuration options specified. I believe this
resolves the problems reported by PR kern/144458 and the email on
freebsd-stable@ posted by Dmitry Pryanishnikov on June 13.

Tested by:	kib
PR:		kern/144458
Reviewed by:	kib
MFC after:	1 week
2010-06-15 00:25:04 +00:00
Ed Maste
781e51d3eb Use literal format strings. Found by clang. 2010-06-14 23:51:35 +00:00
Jung-uk Kim
0f817de766 Fix typos that broke duration calculations on protection frames. A similar
fix was done for ral(4) long ago and it must be copy-and-paste bugs.

Found by:	clang
2010-06-14 23:01:50 +00:00
Kenneth D. Merry
37f5dbdfec For the target port groups structures, don't allocate the initial element.
This makes things easier for target implementations to calculate how many
elements they need to allocate.

Discussed with:	mjacob, gibbs
MFC after:	1 week
2010-06-14 22:02:18 +00:00
Pawel Jakub Dawidek
2aa15ffdab 'unit' can be negative, so use signed type for it.
Found by:	Coverity Prevent
CID:		3731
MFC after:	3 days
2010-06-14 21:58:55 +00:00
Pawel Jakub Dawidek
15725379d0 BIO_DELETE contains range we want to delete and doesn't provide any useful
data, so there is no need to copy it to userland.

MFC after:	3 days
2010-06-14 21:56:24 +00:00
Pawel Jakub Dawidek
f3bd74124a Correct various log messages.
Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-06-14 21:46:48 +00:00
Pawel Jakub Dawidek
96610dd9b6 Fix typos.
MFC after:	3 days
2010-06-14 21:44:58 +00:00
Pawel Jakub Dawidek
328e0f4b04 Initialize gctl_seq for synchronization requests.
Reported by:	hiroshi@soupacific.com
Analysed by:	Mikolaj Golub <to.my.trociny@gmail.com>
Tested by:	hiroshi@soupacific.com, Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	3 days
2010-06-14 21:44:20 +00:00
Pawel Jakub Dawidek
7a716e072e Plug memory leak.
Found by:	Coverity Prevent
CID:		7057
MFC after:	3 days
2010-06-14 21:41:22 +00:00
Pawel Jakub Dawidek
b0dfbe5b27 Plug memory leak.
Found by:	Coverity Prevent
CID:		7056
MFC after:	3 days
2010-06-14 21:37:25 +00:00
Pawel Jakub Dawidek
9f31eddba0 Plug memory leak.
Found by:	Coverity Prevent
CID:		7051
MFC after:	3 days
2010-06-14 21:33:18 +00:00
Pawel Jakub Dawidek
6744284aec Plug memory leaks.
Found by:	Coverity Prevent
CID:		7052, 7053, 7054, 7055
MFC after:	3 days
2010-06-14 21:25:20 +00:00
Michael Tuexen
fc066a6137 * Fix a bug where the length of the ASCONF-ACK was calculated wrong due
to using an uninitialized variable.
* Fix a bug where a NULL pointer was dereferenced when interfaces
  come and go at a high rate.
* Fix a bug where inps where not deregistered from iterators.
* Fix a race condition in freeing an association.
* Fix a refcount problem related to the iterator.
Each of the above bug results in a panic. It shows up when
interfaces come and go at a high rate.

Obtained from: rrs (partly)
MFC after: 3 days
2010-06-14 21:25:07 +00:00
Pawel Jakub Dawidek
9fab3c1b94 Remove macros that are not really needed. The idea was to have them in case
we grow more descriptors, but I'll reconsider readding them once we get there.

Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates
its argument twice.

Found by:	Coverity Prevent
CID:		5243
MFC after:	3 days
2010-06-14 21:18:58 +00:00
Pawel Jakub Dawidek
a58b195e35 Eliminate dead code.
Found by:	Coverity Prevent
CID:		5158
MFC after:	3 days
2010-06-14 21:01:13 +00:00
Jung-uk Kim
c977e11721 Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.
2010-06-14 20:08:26 +00:00
Alan Cox
9ee2165f5d Eliminate checks for a page having a NULL object in vm_pageout_scan()
and vm_pageout_page_stats().  These checks were recently introduced by
the first page locking commit, r207410, but they are not needed.  At
the same time, eliminate some redundant accesses to the page's object
field.  (These accesses should have neen eliminated by r207410.)

Make the assertion in vm_page_flag_set() stricter.  Specifically, only
managed pages should have PG_WRITEABLE set.

Add a comment documenting an assertion to vm_page_flag_clear().

It has long been the case that fictitious pages have their wire count
permanently set to one.  Add comments to vm_page_wire() and
vm_page_unwire() documenting this.  Add assertions to these functions
as well.

Update the comment describing vm_page_unwire().  Much of the old
comment had little to do with vm_page_unwire(), but a lot to do with
_vm_page_deactivate().  Move relevant parts of the old comment to
_vm_page_deactivate().

Only pages that belong to an object can be paged out.  Therefore, it
is pointless for vm_page_unwire() to acquire the page queues lock and
enqueue such pages in one of the paging queues.  Generally speaking,
such pages are immediately freed after the call to vm_page_unwire().
Previously, it was the call to vm_page_free() that reacquired the page
queues lock and removed these pages from the paging queues.  Now, we
will never acquire the page queues lock for this case.  (It is also
worth noting that since both vm_page_unwire() and vm_page_free()
occurred with the page locked, the page daemon never saw the page with
its object field set to NULL.)

Change the panic with vm_page_unwire() to provide a more precise message.

Reviewed by:	kib@
2010-06-14 19:54:19 +00:00
Marcel Moolenaar
91c7875842 Further unbreak powerpc & sparc64. 2010-06-14 19:39:20 +00:00
Ed Schouten
edec9228fa Add Clang to OptionalObsoleteFiles.inc.
This means you can now deinstall Clang by running make delete-old with
WITHOUT_CLANG set.
2010-06-14 19:10:30 +00:00
Bernhard Schmidt
98f4f952f3 Fix TX retry rate handling. tx->linkq is an index to a rate table
beginning with the highest available rate. Currently we always use
54m for the first retry no matter what AMRR has choosen. Fix this
by setting the index to the next lower rate.

Approved by:	rpaulo (mentor)
Tested by:	Brandon Gooch <jamesbrandongooch at gmail.com>
MFC after:	2 weeks
2010-06-14 18:26:10 +00:00
Jaakko Heinonen
3141712daa Update vfs_busy(9) and vfs_unbusy(9) manual pages to better match the
current behaviour of the functions.

Discussed with:	attilio
2010-06-14 17:31:46 +00:00
Roman Divacky
867610d08a Pass the -N flag to linked via -Wl.
Approved by:	ed (mentor)
2010-06-14 17:02:19 +00:00
Rafal Jaworowski
98dbf5572a Temporarily bring back the ARM bootinfo (and make tinderbox happy).
BI will be eliminated for good when powerpc transition to FDT is complete.
2010-06-14 16:05:21 +00:00