]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoFix $ipv6_network_interfaces and set it as AUTO by default.
hrs [Mon, 13 Sep 2010 19:52:04 +0000 (19:52 +0000)]
Fix $ipv6_network_interfaces and set it as AUTO by default.

Based on: changes in r206408 by dougb

13 years agoRevert changes in r206408.
hrs [Mon, 13 Sep 2010 19:51:15 +0000 (19:51 +0000)]
Revert changes in r206408.

Discussed with: dougb, core.5, and core.6

13 years agoRemove the page queues lock around vm_page_undirty() - it is no longer needed.
pjd [Mon, 13 Sep 2010 19:47:09 +0000 (19:47 +0000)]
Remove the page queues lock around vm_page_undirty() - it is no longer needed.

Reviewed by: alc

13 years agoRevert r212370, as it causes a LOR on powerpc. powerpc does a few
mdf [Mon, 13 Sep 2010 18:48:23 +0000 (18:48 +0000)]
Revert r212370, as it causes a LOR on powerpc.  powerpc does a few
unexpected things in copyout(9) and so wiring the user buffer is not
sufficient to perform a copyout(9) while holding a random mutex.

Requested by: nwhitehorn

13 years agoAllow a kernel config to specify a set but empty value via
emaste [Mon, 13 Sep 2010 18:26:34 +0000 (18:26 +0000)]
Allow a kernel config to specify a set but empty value via
'makeoptions OPTION=' for consistency with the make commandline.

Previously 'makeoptions WERROR=' would result in a syntax error; now
it produces the same effect as 'makeoptions WERROR'.  Both forms now
result in 'WERROR=' in the generated Makefile.

13 years agoBump __FreeBSD_version to reflect the userland DTrace changes.
rpaulo [Mon, 13 Sep 2010 17:53:43 +0000 (17:53 +0000)]
Bump __FreeBSD_version to reflect the userland DTrace changes.

Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    param.h

13 years agoAdd a note about userland DTracing.
rpaulo [Mon, 13 Sep 2010 17:49:39 +0000 (17:49 +0000)]
Add a note about userland DTracing.

Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    UPDATING

13 years agoTARGET_64BIT isn't needed anymore, GC it (partial merge from tbemd).
imp [Mon, 13 Sep 2010 16:39:33 +0000 (16:39 +0000)]
TARGET_64BIT isn't needed anymore, GC it (partial merge from tbemd).

13 years agoFix a subtle bug uncovered by the recent one-shot timer import in which
nwhitehorn [Mon, 13 Sep 2010 15:36:42 +0000 (15:36 +0000)]
Fix a subtle bug uncovered by the recent one-shot timer import in which
any spin locks acquired between the enabling of interrupts in
machdep_ap_bootstrap() and the invocation of the scheduler would fail to
have interrupts disabled due to the fake spinlock already held by the
idle thread. sched_throw(NULL) will enable interrupts by itself when
exiting this spinlock, so just let it do that and don't enable interrupts
here.

13 years agoMove to using Makefile.arch to include the proper target-specific programs.
imp [Mon, 13 Sep 2010 15:30:09 +0000 (15:30 +0000)]
Move to using Makefile.arch to include the proper target-specific programs.

13 years agoChange call order to enable interrupts only after timer being programmed.
mav [Mon, 13 Sep 2010 14:25:07 +0000 (14:25 +0000)]
Change call order to enable interrupts only after timer being programmed.

Submitted by: nwhitehorn

13 years agoAdd G_TYPE_MULTI flag, which when set for the given option, will
pjd [Mon, 13 Sep 2010 13:59:28 +0000 (13:59 +0000)]
Add G_TYPE_MULTI flag, which when set for the given option, will
allow the option to be specified multiple times. This will help to
implement things like passing multiple keyfiles to geli(8) instead of
cat(1)ing them all into stdin and reading from there using one '-k -'
option.

13 years ago- Remove gc_argname field. It was introduced for gpart(8), but if I
pjd [Mon, 13 Sep 2010 13:48:18 +0000 (13:48 +0000)]
- Remove gc_argname field. It was introduced for gpart(8), but if I
  understand everything correctly, we don't really need it.
- Provide default numeric value as strings. This allows to simplify
  a lot of code.
- Bump version number.

13 years agosys/mips/rmi/msgring.h - fixes and clean up.
jchandra [Mon, 13 Sep 2010 13:11:50 +0000 (13:11 +0000)]
sys/mips/rmi/msgring.h - fixes and clean up.

- Remove sync from msgrng_send, sync needs to be called just once before
  sending.
- Fix retry logic - don't reload registers when retrying in message_send,
  also fix check for send pending fail.
- remove unused message_send_block_fast()
- merge message_receive_fast() to message_receive
- style(9) fixes, and comments
- rge and nlge updated for the sys/mips/rmi/msgring.h changes

13 years agoDon't compare thread pointers again.
davidxu [Mon, 13 Sep 2010 11:58:42 +0000 (11:58 +0000)]
Don't compare thread pointers again.

13 years agoFix copy&paste problem.
davidxu [Mon, 13 Sep 2010 11:57:46 +0000 (11:57 +0000)]
Fix copy&paste problem.

13 years agobus_add_child method is needed now.
jchandra [Mon, 13 Sep 2010 11:47:35 +0000 (11:47 +0000)]
bus_add_child method is needed now.

13 years agoacpi_cpu: do not apply P_LVLx_LAT rules to latencies returned by _CST
avg [Mon, 13 Sep 2010 09:51:24 +0000 (09:51 +0000)]
acpi_cpu: do not apply P_LVLx_LAT rules to latencies returned by _CST

ACPI specification sates that if P_LVL2_LAT > 100, then a system doesn't
support C2; if P_LVL3_LAT > 1000, then C3 is not supported.
But there are no such rules for Cx state data returned by _CST.  If a
state is not supported it should not be included into the return
package.  In other words, any latency value returned by _CST is valid,
it's up to the OS and/or user to decide whether to use it.

Submitted by: nork
Suggested by: mav
MFC after: 1 week

13 years agoUpdate symbol.
davidxu [Mon, 13 Sep 2010 09:23:38 +0000 (09:23 +0000)]
Update symbol.

13 years ago- Allow to specify value as const pointers.
pjd [Mon, 13 Sep 2010 08:56:07 +0000 (08:56 +0000)]
- Allow to specify value as const pointers.
- Make optional string values always an empty string.

13 years agobus_add_child: add specialized default implementation that calls panic
avg [Mon, 13 Sep 2010 08:34:20 +0000 (08:34 +0000)]
bus_add_child: add specialized default implementation that calls panic

If a kobj method doesn't have any explicitly provided default
implementation, then it is auto-assigned kobj_error_method.
kobj_error_method is proper only for methods that return error code,
because it just returns ENXIO.
So, in the case of unimplemented bus_add_child caller would get
(device_t)ENXIO as a return value, which would cause the mistake to go
unnoticed, because return value is typically checked for NULL.
Thus, a specialized null_add_child is added.  It would have sufficied
for correctness to return NULL, but this type of mistake was deemed to
be rare and serious enough to call panic instead.

Watch out for this kind of problem with other kobj methods.

Suggested by: jhb, imp
MFC after: 2 weeks

13 years agoSimplify atomic selection
imp [Mon, 13 Sep 2010 07:29:02 +0000 (07:29 +0000)]
Simplify atomic selection

13 years agoPrefer MACHINE_CPUARCH over MACHINE_ARCH
imp [Mon, 13 Sep 2010 07:27:03 +0000 (07:27 +0000)]
Prefer MACHINE_CPUARCH over MACHINE_ARCH

13 years agoRefactor timer management code with priority to one-shot operation mode.
mav [Mon, 13 Sep 2010 07:25:35 +0000 (07:25 +0000)]
Refactor timer management code with priority to one-shot operation mode.
The main goal of this is to generate timer interrupts only when there is
some work to do. When CPU is busy interrupts are generating at full rate
of hz + stathz to fullfill scheduler and timekeeping requirements. But
when CPU is idle, only minimum set of interrupts (down to 8 interrupts per
second per CPU now), needed to handle scheduled callouts is executed.
This allows significantly increase idle CPU sleep time, increasing effect
of static power-saving technologies. Also it should reduce host CPU load
on virtualized systems, when guest system is idle.

There is set of tunables, also available as writable sysctls, allowing to
control wanted event timer subsystem behavior:
  kern.eventtimer.timer - allows to choose event timer hardware to use.
On x86 there is up to 4 different kinds of timers. Depending on whether
chosen timer is per-CPU, behavior of other options slightly differs.
  kern.eventtimer.periodic - allows to choose periodic and one-shot
operation mode. In periodic mode, current timer hardware taken as the only
source of time for time events. This mode is quite alike to previous kernel
behavior. One-shot mode instead uses currently selected time counter
hardware to schedule all needed events one by one and program timer to
generate interrupt exactly in specified time. Default value depends of
chosen timer capabilities, but one-shot mode is preferred, until other is
forced by user or hardware.
  kern.eventtimer.singlemul - in periodic mode specifies how much times
higher timer frequency should be, to not strictly alias hardclock() and
statclock() events. Default values are 2 and 4, but could be reduced to 1
if extra interrupts are unwanted.
  kern.eventtimer.idletick - makes each CPU to receive every timer interrupt
independently of whether they busy or not. By default this options is
disabled. If chosen timer is per-CPU and runs in periodic mode, this option
has no effect - all interrupts are generating.

As soon as this patch modifies cpu_idle() on some platforms, I have also
refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions
(if supported) under high sleep/wakeup rate, as fast alternative to other
methods. It allows SMP scheduler to wake up sleeping CPUs much faster
without using IPI, significantly increasing performance on some highly
task-switching loads.

Tested by: many (on i386, amd64, sparc64 and powerc)
H/W donated by: Gheorghe Ardelean
Sponsored by: iXsystems, Inc.

13 years agoPrefer MACHINE_CPUARCH to MACHINE_ARCH unless there's a good reason...
imp [Mon, 13 Sep 2010 07:22:14 +0000 (07:22 +0000)]
Prefer MACHINE_CPUARCH to MACHINE_ARCH unless there's a good reason...

13 years agoPS_DEAD state needs not be checked because _thr_find_thread() has already
davidxu [Mon, 13 Sep 2010 07:18:00 +0000 (07:18 +0000)]
PS_DEAD state needs not be checked because _thr_find_thread() has already
checked it.

13 years agoUse MACHINE_CPUARCH as appropriate
imp [Mon, 13 Sep 2010 07:16:48 +0000 (07:16 +0000)]
Use MACHINE_CPUARCH as appropriate
Define __KLD_SHARED to be yes or no depending on if the target uses shared
binaries for klds or not (this also eliminates 4 uses of MACHINE_ARCH).

13 years agoIt turns out that TARGET_CPUARCH doesn't buy us much here, if anything, but
imp [Mon, 13 Sep 2010 07:15:01 +0000 (07:15 +0000)]
It turns out that TARGET_CPUARCH doesn't buy us much here, if anything, but
costs us another copy of the transform.  Revert it.

# Maybe makefile.inc1 should set TARGET_CPUARCH for the cross-tools, but
# it doesn't now.  That would solve problems in other places too.

Submitted by: jmallet@

13 years agoConvert thread list lock from mutex to rwlock.
davidxu [Mon, 13 Sep 2010 07:03:01 +0000 (07:03 +0000)]
Convert thread list lock from mutex to rwlock.

13 years agoDoh! two last second refactoring typos crept in. Fix.
imp [Mon, 13 Sep 2010 06:50:07 +0000 (06:50 +0000)]
Doh! two last second refactoring typos crept in.  Fix.

13 years agoRevert r212513 and reimplement the search order to be ARCH, CPUARCH
imp [Mon, 13 Sep 2010 06:35:35 +0000 (06:35 +0000)]
Revert r212513 and reimplement the search order to be ARCH, CPUARCH

13 years agoAdd tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver
mav [Mon, 13 Sep 2010 06:32:56 +0000 (06:32 +0000)]
Add tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver
should provide if there is sufficient hardware. Default is 1.

13 years agoThe functions in sys/mips/mips/psraccess.S can be implemented with
jchandra [Mon, 13 Sep 2010 05:03:37 +0000 (05:03 +0000)]
The functions in sys/mips/mips/psraccess.S can be implemented with
mips_rd_status/mips_wr_status.  Implement them in mips/include/cpufunc.h,
and remove psraccess.S.

Reviewed by: neel, imp

13 years agoThis is exactly the same as the .else, so remove it.
imp [Mon, 13 Sep 2010 04:23:23 +0000 (04:23 +0000)]
This is exactly the same as the .else, so remove it.

13 years agoOoops! Shouldn't have committed this
imp [Mon, 13 Sep 2010 02:26:36 +0000 (02:26 +0000)]
Ooops!  Shouldn't have committed this

13 years agoMF tbemd: Move to using Makefile.arch to select what to build.
imp [Mon, 13 Sep 2010 02:25:21 +0000 (02:25 +0000)]
MF tbemd: Move to using Makefile.arch to select what to build.

Reviewed by: arch@ (no objection)

13 years agoMerge from tbemd: Move to using Makefile.arch to control what's build.
imp [Mon, 13 Sep 2010 02:23:03 +0000 (02:23 +0000)]
Merge from tbemd: Move to using Makefile.arch to control what's build.

Reviewed by: (arch@, no objection)

13 years agoMerge from tbemd: use Makefile.arch to control building.
imp [Mon, 13 Sep 2010 02:21:07 +0000 (02:21 +0000)]
Merge from tbemd: use Makefile.arch to control building.

Reviewed by: arch@ (many times, no objection)

13 years agoMFtbemd: use MACHINE_CPUARCH
imp [Mon, 13 Sep 2010 02:05:42 +0000 (02:05 +0000)]
MFtbemd: use MACHINE_CPUARCH

13 years agoUse :T:Micc here like everywhere else we test icc
imp [Mon, 13 Sep 2010 02:02:20 +0000 (02:02 +0000)]
Use :T:Micc here like everywhere else we test icc

13 years agoMFtbemd: Move to using MACHINE_CPUARCH, now that it is safe.
imp [Mon, 13 Sep 2010 01:44:56 +0000 (01:44 +0000)]
MFtbemd: Move to using MACHINE_CPUARCH, now that it is safe.

13 years agoInclude FreeBSD svn tag
imp [Mon, 13 Sep 2010 01:44:07 +0000 (01:44 +0000)]
Include FreeBSD svn tag

13 years agoMerge from tbemd, with a small amount of rework:
imp [Mon, 13 Sep 2010 01:43:10 +0000 (01:43 +0000)]
Merge from tbemd, with a small amount of rework:
For all libthr contexts, use ${MACHINE_CPUARCH}
for all libc contexts, use ${MACHINE_ARCH} if it exists, otherwise use
${MACHINE_CPUARCH}
Move some common code up a layer (the .PATH statement was the same in
all the arch submakefiles).

# Hope she hasn't busted powerpc64 with this...

13 years agoMerge from tbemd:
imp [Mon, 13 Sep 2010 01:29:51 +0000 (01:29 +0000)]
Merge from tbemd:
Add directory names directly and sort at the end.
Include bsd.arch.inc.mk so we can, in the future, more easily make arch
dependent changes in /bin (unlikely, but is needed for symmetry).

13 years agomerge powerpc and powerpc64 now that we use TARGET_CPUARCH
imp [Mon, 13 Sep 2010 01:20:53 +0000 (01:20 +0000)]
merge powerpc and powerpc64 now that we use TARGET_CPUARCH

13 years agoMove to using TARGET_CPUARCH instead of TARGET_ARCH.
imp [Mon, 13 Sep 2010 01:00:48 +0000 (01:00 +0000)]
Move to using TARGET_CPUARCH instead of TARGET_ARCH.

13 years agoUse TARGET_CPUARCH instead of TARGET_ARCH here. Define TARGET_CPUARCH
imp [Mon, 13 Sep 2010 00:57:48 +0000 (00:57 +0000)]
Use TARGET_CPUARCH instead of TARGET_ARCH here.  Define TARGET_CPUARCH
based on TARGET_ARCH.  Use TARGET_ARCH still for a powerpc64 test.
Futureproof for coming mipsel/mipseb and arm/armeb rename.

13 years agosh: Add __dead2 to two functions that do not return.
jilles [Sun, 12 Sep 2010 22:00:31 +0000 (22:00 +0000)]
sh: Add __dead2 to two functions that do not return.

Apart from helping static analyzers, this also appears to reduce the size of
the binary slightly.

13 years agoIn pmap_remove_all(), do not decrease pm_stats.wired_count if the mapping was
cognet [Sun, 12 Sep 2010 20:46:32 +0000 (20:46 +0000)]
In pmap_remove_all(), do not decrease pm_stats.wired_count if the mapping was
wired, as it's been done later in pmap_nuke_pv().

Submitted by: Mark Tinguely

13 years agoDo not fork nfsiod directly from the vop methods. This causes LORs between
kib [Sun, 12 Sep 2010 19:06:08 +0000 (19:06 +0000)]
Do not fork nfsiod directly from the vop methods. This causes LORs between
vnode lock and several locks needed during fork, like fd lock.

Instead, schedule the task to be executed in the taskqueue context. We
still waiting for the fork to finish, but the context of the thread
executing the task does not make real LORs with our vnode lock.

Submitted by: pluknet at gmail com
Reviewed by: jhb
Tested by: pho
MFC after: 3 weeks

13 years agoIn backup_kernel(), support backing up subdirectories and handle files
jh [Sun, 12 Sep 2010 18:53:44 +0000 (18:53 +0000)]
In backup_kernel(), support backing up subdirectories and handle files
with spaces correctly.

Approved by: cperciva
MFC after: 1 month

13 years agoAdding an address on an interface also requires the loopback route to
qingli [Sun, 12 Sep 2010 18:04:47 +0000 (18:04 +0000)]
Adding an address on an interface also requires the loopback route to
that address be installed.

PR: kern/150481
Submitted by: Ingo Flaschberger <if at xip.at>
MFC after: 5 days

13 years agoAdd DF_1_LOADFLTR.
kib [Sun, 12 Sep 2010 17:55:56 +0000 (17:55 +0000)]
Add DF_1_LOADFLTR.

MFC after: 3 days

13 years agoI believe the majority of Gregorian calendars would agree the current
gjb [Sun, 12 Sep 2010 17:53:36 +0000 (17:53 +0000)]
I believe the majority of Gregorian calendars would agree the current
year is 2010, not 2005.

Approved by: keramida (mentor)
Pointy hat to: gjb
MFC after: 1 week

13 years agoFix typo.
kib [Sun, 12 Sep 2010 17:53:31 +0000 (17:53 +0000)]
Fix typo.

MFC after: 3 days

13 years agoRewording and typo fixes in newfs(8).
gjb [Sun, 12 Sep 2010 17:50:07 +0000 (17:50 +0000)]
Rewording and typo fixes in newfs(8).

PR: 150490
Submitted by: Eitan Adler <foreignuser at eitanadler com>
Additional fixes by: Warren Block <wblock at wonkity com>, keramida
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoCheck for undefined weak symbols during PLT binding on powerpc64, and do
nwhitehorn [Sun, 12 Sep 2010 17:04:51 +0000 (17:04 +0000)]
Check for undefined weak symbols during PLT binding on powerpc64, and do
not attempt to copy NULL function descriptors. This fixes LD_BIND_NOW on
powerpc64 after r211706.

Reviewed by: kib

13 years agoList low-level Blowfish ECB module in the SRCS. It looks like it was dropped
ivoras [Sun, 12 Sep 2010 16:28:26 +0000 (16:28 +0000)]
List low-level Blowfish ECB module in the SRCS. It looks like it was dropped
by accident (and it would be inconvenient to implement it otherwise because it
uses internal non-published headers).

MFC after: 1 week

13 years agoGive a chance to the target binary to run the ctors by waiting until it
rpaulo [Sun, 12 Sep 2010 15:59:14 +0000 (15:59 +0000)]
Give a chance to the target binary to run the ctors by waiting until it
has reached main(). This allows plockstat to work.

Sponsored by: The FreeBSD Foundation

13 years agoRevamp locking a bit. This fixes three problems:
rpaulo [Sun, 12 Sep 2010 14:12:16 +0000 (14:12 +0000)]
Revamp locking a bit. This fixes three problems:
* processes now can't go away while we are inserting probes (fixes a panic)
* if a trap happens, we won't be holding the process lock (fixes a hang)
* fix a LOR between the process lock and the fasttrap bucket list lock

Thanks to kib for pointing some problems.
Sponsored by: The FreeBSD Foundation

13 years agoBump date from r212440.
gjb [Sun, 12 Sep 2010 14:04:54 +0000 (14:04 +0000)]
Bump date from r212440.

Approved by: keramida (mentor)
MFC after: 1 week

13 years agoBump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and
gjb [Sun, 12 Sep 2010 14:04:05 +0000 (14:04 +0000)]
Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and
r212438, repectively.

Approved by: keramida (mentor)
MFC after: 1 week

13 years agoInstead of storing last event timestamp, store the next event timestamp.
mav [Sun, 12 Sep 2010 11:11:53 +0000 (11:11 +0000)]
Instead of storing last event timestamp, store the next event timestamp.
It corrects handling of the first event offset in emulated periodic mode.

13 years agoATAPI DMA does not seem to work completely reliably on Shasta controllers,
nwhitehorn [Sat, 11 Sep 2010 22:09:16 +0000 (22:09 +0000)]
ATAPI DMA does not seem to work completely reliably on Shasta controllers,
especially in conjunction with ATA_CAM, so disable it for now.

13 years agoMentions cases when bwi(4) driver should be used that it only wrote
weongyo [Sat, 11 Sep 2010 21:49:28 +0000 (21:49 +0000)]
Mentions cases when bwi(4) driver should be used that it only wrote
about chipset type instead of card names because it's not easy to sort
names what cards use these chipsets.

Pointed by: imp

13 years agoDo not print "frequency 0 Hz", when frequency is unknown.
mav [Sat, 11 Sep 2010 20:18:15 +0000 (20:18 +0000)]
Do not print "frequency 0 Hz", when frequency is unknown.

13 years agoAdd missing pointer increment to sbuf_cat.
kan [Sat, 11 Sep 2010 19:42:50 +0000 (19:42 +0000)]
Add missing pointer increment to sbuf_cat.

13 years agoChange OF_interpret() to also take an array of cell_t (missed in r209801).
marius [Sat, 11 Sep 2010 18:55:00 +0000 (18:55 +0000)]
Change OF_interpret() to also take an array of cell_t (missed in r209801).

Reviewed by: nwhitehorn

13 years agosh: Fix exit status if return is used within a loop condition.
jilles [Sat, 11 Sep 2010 15:07:40 +0000 (15:07 +0000)]
sh: Fix exit status if return is used within a loop condition.

13 years agosh: Apply variable assignments left-to-right in bltinlookup().
jilles [Sat, 11 Sep 2010 14:15:50 +0000 (14:15 +0000)]
sh: Apply variable assignments left-to-right in bltinlookup().

Example:
  HOME=foo HOME=bar cd

13 years agoProtect mnt_syncer with the sync_mtx. This prevents a (rare) vnode leak
kib [Sat, 11 Sep 2010 13:06:06 +0000 (13:06 +0000)]
Protect mnt_syncer with the sync_mtx. This prevents a (rare) vnode leak
when mount and update are executed in parallel.

Encapsulate syncer vnode deallocation into the helper function
vfs_deallocate_syncvnode(), to not externalize sync_mtx from vfs_subr.c.

Found and reviewed by: jh (previous version of the patch)
Tested by: pho
MFC after: 3 weeks

13 years agoAvoid a LOR (sleepable after non-sleepable) in
rpaulo [Sat, 11 Sep 2010 12:58:31 +0000 (12:58 +0000)]
Avoid a LOR (sleepable after non-sleepable) in
fasttrap_tracepoint_enable().

Sponsored by: The FreeBSD Foundation

13 years agoRevert changes of 'assure' to 'ensure' made in r211936.
brucec [Sat, 11 Sep 2010 10:49:56 +0000 (10:49 +0000)]
Revert changes of 'assure' to 'ensure' made in r211936.

Approved by: rrs (mentor)

13 years agoDisable debug by default.
rpaulo [Sat, 11 Sep 2010 10:16:15 +0000 (10:16 +0000)]
Disable debug by default.

Sponsored by: The FreeBSD Foundation

13 years agoAdd a comment describing where to include bsd.dtrace.mk.
rpaulo [Sat, 11 Sep 2010 10:11:59 +0000 (10:11 +0000)]
Add a comment describing where to include bsd.dtrace.mk.

Sponsored by: The FreeBSD Foundation

13 years agoFix the build after r212453. IPI_STATCLOCK declaration is still needed
mav [Sat, 11 Sep 2010 09:53:33 +0000 (09:53 +0000)]
Fix the build after r212453. IPI_STATCLOCK declaration is still needed
for build, though not really used.

Submitted by: andreast

13 years agoMake a link for pthread_timedjoin_np.
davidxu [Sat, 11 Sep 2010 09:26:36 +0000 (09:26 +0000)]
Make a link for pthread_timedjoin_np.

13 years agokill() does queue signal now.
davidxu [Sat, 11 Sep 2010 08:15:18 +0000 (08:15 +0000)]
kill() does queue signal now.

13 years agomake acpi_hp device a child of acpi_wmi
avg [Sat, 11 Sep 2010 08:09:14 +0000 (08:09 +0000)]
make acpi_hp device a child of acpi_wmi

to properly reflect dependency between the devices/drivers

PR: kern/147858
Suggested by: jhb
Tested by: Maciej Suszko <maciej@suszko.eu>
MFC after: 1 week

13 years agoSparc64 uses dummy cpu_idle() method. It's CPUs never sleeping. Tell
mav [Sat, 11 Sep 2010 07:24:10 +0000 (07:24 +0000)]
Sparc64 uses dummy cpu_idle() method. It's CPUs never sleeping. Tell
scheduler that it doesn't need to use IPI to "wake up" CPU.

13 years agoMerge some SCHED_ULE features to SCHED_4BSD:
mav [Sat, 11 Sep 2010 07:08:22 +0000 (07:08 +0000)]
Merge some SCHED_ULE features to SCHED_4BSD:
- Teach SCHED_4BSD to inform cpu_idle() about high sleep/wakeup rate to
choose optimized handler. In case of x86 it is MONITOR/MWAIT. Also it
will be needed to bypass forthcoming idle tick skipping logic to not
consume resources on events rescheduling when it won't give any benefits.
- Teach SCHED_4BSD to wake up idle CPUs without using IPI. In case of x86,
when MONITOR/MWAIT is active, it require just single memory write. This
doubles performance on some heavily switching test loads.

13 years agoUpdate PowerPC event timer code to use new event timers infrastructure.
mav [Sat, 11 Sep 2010 04:45:51 +0000 (04:45 +0000)]
Update PowerPC event timer code to use new event timers infrastructure.

Reviewed by: nwitehorn
Tested by: andreast
H/W donated by: Gheorghe Ardelean

13 years agoThis patch applies one of the two fixes suggested by
rmacklem [Fri, 10 Sep 2010 23:49:33 +0000 (23:49 +0000)]
This patch applies one of the two fixes suggested by
zack.kirsch at isilon.com for a race between nfsrv_freeopen()
and nfsrv_getlockfile() in the experimental NFS server that
he found during testing. Although nfsrv_freeopen() holds a
sleep lock on the lock file structure when called with
cansleep != 0, nfsrv_getlockfile() could still search the
list, once it acquired the NFSLOCKSTATE() mutex. I believe
that acquiring the mutex in nfsrv_freeopen() fixes the race.

MFC after: 2 weeks

13 years agoNote O_SYNC and O_NOFOLLOW flags in dbopen(3) since r190497.
gjb [Fri, 10 Sep 2010 23:24:55 +0000 (23:24 +0000)]
Note O_SYNC and O_NOFOLLOW flags in dbopen(3) since r190497.

PR: 150030
Submitted by: Janne Snabb snabb at epipe com
Patch by: Janne Snabb
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoAdd RETURN VALUES section to devclass_get_maxunit(9).
gjb [Fri, 10 Sep 2010 23:22:01 +0000 (23:22 +0000)]
Add RETURN VALUES section to devclass_get_maxunit(9).

PR: 149979
Submitted by: gcooper
Patch by: gcooper
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoFix the NFSVNO_CMPFH() macro in the experimental NFS server so
rmacklem [Fri, 10 Sep 2010 23:18:45 +0000 (23:18 +0000)]
Fix the NFSVNO_CMPFH() macro in the experimental NFS server so
that it works correctly for ZFS file handles. It is possible to
have two ZFS file handles that differ only in the bytes in the
fid_reserved field of the generic "struct fid" and comparing the
bytes in fid_data didn't catch this case. This patch changes the
macro to compare all bytes of "struct fid".

Tested by: gull at gull.us
MFC after: 2 weeks

13 years agoAdd EINVAL to list of possible return values for cpuset_getaffinity(2).
gjb [Fri, 10 Sep 2010 23:15:05 +0000 (23:15 +0000)]
Add EINVAL to list of possible return values for cpuset_getaffinity(2).

PR: 149978
Submitted by: gcooper
Patch by: gcooper
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoDon't exit kern_jail_set without freeing options when enforce_statfs
jamie [Fri, 10 Sep 2010 21:45:42 +0000 (21:45 +0000)]
Don't exit kern_jail_set without freeing options when enforce_statfs
has an illegal value.

MFC after: 3 days

13 years agoMark the sbuf_overflowed(9) manpage as obsolete since it has been
mdf [Fri, 10 Sep 2010 20:42:41 +0000 (20:42 +0000)]
Mark the sbuf_overflowed(9) manpage as obsolete since it has been
renamed.

Noticed by: jhb

13 years ago"freebsd-update fetch -r NEWRELEASE" is meaningless and probably a typo
cperciva [Fri, 10 Sep 2010 20:20:28 +0000 (20:20 +0000)]
"freebsd-update fetch -r NEWRELEASE" is meaningless and probably a typo
for "freebsd-update upgrade -r NEWRELEASE".  Error out and suggest what
the user probably meant.

Submitted by: James Seward
MFC after: 1 month

13 years agoAdd warning about freebsd-update upgrade needing lots of disk space.
cperciva [Fri, 10 Sep 2010 19:23:59 +0000 (19:23 +0000)]
Add warning about freebsd-update upgrade needing lots of disk space.

Submitted by: jpaetzel
MFC after: 1 month

13 years agoRemind the user that he needs to run 'freebsd-update install' to install
cperciva [Fri, 10 Sep 2010 19:20:52 +0000 (19:20 +0000)]
Remind the user that he needs to run 'freebsd-update install' to install
new bits after downloading them using 'freebsd-update upgrade'.

Submitted by: bapt
MFC after: 1 month

13 years agoAdd real dependancies on the uuencoded firmwares.
obrien [Fri, 10 Sep 2010 18:19:38 +0000 (18:19 +0000)]
Add real dependancies on the uuencoded firmwares.
Now when one does 'make kernel ; make kernel' the second invocation
only does:  `kernel.ko' is up to date.
rather than reproduce all the .fw files and relink the kernel.

13 years agoFix bugs introduced in the previous rev:
rpaulo [Fri, 10 Sep 2010 17:44:11 +0000 (17:44 +0000)]
Fix bugs introduced in the previous rev:
* add a phatom target for the DTRACEOBJS
* when invoking DTrace, don't add DTRACEOBJS to the command line.

Sponsored by: The FreeBSD Foundation

13 years agoFix typo in previous commit.
rpaulo [Fri, 10 Sep 2010 17:00:48 +0000 (17:00 +0000)]
Fix typo in previous commit.

13 years agoReplace sbuf_overflowed() with sbuf_error(), which returns any error
mdf [Fri, 10 Sep 2010 16:42:16 +0000 (16:42 +0000)]
Replace sbuf_overflowed() with sbuf_error(), which returns any error
code associated with overflow or with the drain function.  While this
function is not expected to be used often, it produces more information
in the form of an errno that sbuf_overflowed() did.

13 years agoAdd bsd.dtrace.mk. This allows userland programs and libraries to
rpaulo [Fri, 10 Sep 2010 16:27:09 +0000 (16:27 +0000)]
Add bsd.dtrace.mk. This allows userland programs and libraries to
define USDT probes on a provider.d file and then use this new make
infrastructure to build the corresponding header file and object file.

This will only take effect when the user defines WITH_DTRACE when building.

Sponsored by: The FreeBSD Foundation

13 years agoCheck the existence of a 'beforelinking' target and make the resulting
rpaulo [Fri, 10 Sep 2010 16:21:09 +0000 (16:21 +0000)]
Check the existence of a 'beforelinking' target and make the resulting
program or library depend on that before doing the final linking. This
will be needed by DTrace.

Sponsored by: The FreeBSD Foundation

13 years agoAdd the DTRACE variable that points to the executable.
rpaulo [Fri, 10 Sep 2010 16:19:58 +0000 (16:19 +0000)]
Add the DTRACE variable that points to the executable.

Sponsored by: The FreeBSD Foundation

13 years agoMFp4 (//depot/projects/mps/...)
ken [Fri, 10 Sep 2010 15:03:56 +0000 (15:03 +0000)]
MFp4 (//depot/projects/mps/...)

Bring in a driver for the LSI Logic MPT2 6Gb SAS controllers.

This driver supports basic I/O, and works with SAS and SATA drives and
expanders.

Basic error recovery works (i.e. timeouts and aborts) as well.

Integrated RAID isn't supported yet, and there are some known bugs.

So this isn't ready for production use, but is certainly ready for
testing and additional development.  For the moment, new commits to this
driver should go into the FreeBSD Perforce repository first
(//depot/projects/mps/...) and then get merged into -current once
they've been vetted.

This has only been added to the amd64 GENERIC, since that is the only
architecture I have tested this driver with.

Submitted by: scottl
Discussed with: imp, gibbs, will
Sponsored by: Yahoo, Spectra Logic Corporation