kib [Wed, 26 May 2010 19:26:28 +0000 (19:26 +0000)]
MFC r208488:
Fix the double counting of the last process thread td_incruntime
on exit, that is done once in thread_exit() and the second time in
proc_reap(), by clearing td_incruntime.
mjacob [Wed, 26 May 2010 18:56:06 +0000 (18:56 +0000)]
This is an MFC of 208119, 208129
Hook up some wires that were forgotten a few months ago and restore
the zombie device timeout code and the loop down time code and the fabric
hysteresis code.
marius [Wed, 26 May 2010 17:05:54 +0000 (17:05 +0000)]
MFC: r208459, r208511
- Update the sparc64 hardware list regarding machines that will be supported
beginning with 8.1-RELEASE as well as correct some existing entries and
add previously missed ones. [1]
- According to simon@ when referring to a company along a product just to
identify the company one shouldn't use the company trademark. [2]
jkim [Tue, 25 May 2010 20:16:36 +0000 (20:16 +0000)]
MFC: r208320
Add a new build option, MAN_UTILS. This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN. For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.
Note this patch implicitly fixes a documentation bug of src.conf(5), which
says WITHOUT_MAN may be used to not build manual pages while it was also
disabling some utilities for manual pages.
thompsa [Tue, 25 May 2010 02:39:55 +0000 (02:39 +0000)]
MFC r202612
Use the iflladdr_event event to keep the mac address on the vap in sync with
the parent wirless interface. If the user passed in a mac address or it was
autogenerated then flag this to avoid trashing it on update.
thompsa [Tue, 25 May 2010 02:36:06 +0000 (02:36 +0000)]
MFC r202588
Declare a new EVENTHANDLER called iflladdr_event which signals that the L2
address on an interface has changed. This lets stacked interfaces such as
vlan(4) detect that their lower interface has changed and adjust things in
order to keep working. Previously this situation broke at least vlan(4) and
lagg(4) configurations.
The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the
risk of a loop.
PR: kern/142927
Submitted by: Nikolay Denev
MFC r202611
Do not hold the lock over if_setlladdr() as it calls into the interface driver
init routine.
weongyo [Mon, 24 May 2010 21:01:37 +0000 (21:01 +0000)]
MFC r208120:
- fixes a bug that it didn't initialize the ratectl after association;
so ni_txrate returned 0 which is a invalid result.
- The fourth argument of ieee80211_ratectl_tx_complete() could be not
NULL.
Reported by: Gustau P?rez <gperez at entel.upc.edu>
Tested by: Gustau P?rez <gperez at entel.upc.edu>,
Ian FREISLICH <ianf at clue.co.za>
mm [Mon, 24 May 2010 20:09:40 +0000 (20:09 +0000)]
MFC r208472, r208474:
MFC r208472:
Fix zfs receive temporarily changing unchanged stream properties.
Fix possible panic with zfs_enable_datasets.
OpenSolaris onnv revision: 8536:33bd5de3260e [1]
MFC r208474:
Remove kstat.zfs.arcstats.l2_write_bytes_written
The arcstats.l2_write_bytes_written kstat counter introduced
in r205231 was duplicite with vendor's arcstats.l2_write_bytes counter
imported in r208373 (OpenSolaris revision 8582:df9361868dbe)
rstone [Mon, 24 May 2010 19:42:27 +0000 (19:42 +0000)]
MFC r207482
When configuring hwpmc to use the EXT_SNOOP event, only send a default
cachestate qualifier on the Atom processor. Other Intel processors do not
accept a cachestate qualifier and currently hwpmc will return EINVAL if you
try to use the EXT_SNOOP event on those processors
rstone [Mon, 24 May 2010 18:21:42 +0000 (18:21 +0000)]
MFC r207484:
When configuring a system-wide couting PMC, hwpmc was incorrectly logging
process mappings for that PMC. Nothing ever reads pmc logs out of a
counting PMC, so the log buffers were leaked when the PMC was
deconfigured. The process mappings are only useful for sampling PMCs
anyway, so only log the mappings if the PMC is a sampling PMC.
This bug would cause allocating sample-mode PMCs to fail with ENOMEM
after allocating several counting-mode PMCs.
Eventhough r203504 eliminates taste traffic provoked by vdev_geom.c,
ZFS still like to open all vdevs, close them and open them again,
which in turn provokes taste traffic anyway.
I don't know of any clean way to fix it, so do it the hard way - if we can't
open provider for writing just retry 5 times with 0.5 pauses. This should
elimitate accidental races caused by other classes tasting providers created on
top of our vdevs.
Reported by: James R. Van Artsdalen <james-freebsd-fs2@jrv.org>
Reported by: Yuri Pankov <yuri.pankov@gmail.com>
r207937:
I added vfs_lowvnodes event, but it was only used for a short while and now
it is totally unused. Remove it.
r207970:
When there is no memory or KVA, try to help by reclaiming some vnodes.
This helps with 'kmem_map too small' panics.
No objections from: kib
Tested by: Alexander V. Ribchansky <shurik@zk.informjust.ua>
r208142:
The whole point of having dedicated worker thread for each leaf VDEV was to
avoid calling zio_interrupt() from geom_up thread context. It turns out that
when provider is forcibly removed from the system and we kill worker thread
there can still be some ZIOs pending. To complete pending ZIOs when there is
no worker thread anymore we still have to call zio_interrupt() from geom_up
context. To avoid this race just remove use of worker threads altogether.
This should be more or less fine, because I also thought that zio_interrupt()
does more work, but it only makes small UMA allocation with M_WAITOK.
It also saves one context switch per I/O request.
PR: kern/145339
Reported by: Alex Bakhtin <Alex.Bakhtin@gmail.com>
r208147:
Add task structure to zio and use it instead of allocating one.
This eliminates the only place where we can sleep when calling zio_interrupt().
As a side-effect this can actually improve performance a little as we
allocate one less thing for every I/O.
Prodded by: kib
r208148:
Allow to configure UMA usage for ZIO data via loader and turn it on by
default for amd64. On i386 I saw performance degradation when UMA was used,
but for amd64 it should help.
r208166:
Fix userland build by making io_task available only for the kernel and by
providing taskq_dispatch_safe() macro.
mm [Mon, 24 May 2010 06:11:33 +0000 (06:11 +0000)]
MFC r208373:
Update L2ARC code and fix several bugs.
- improve ARC memory consumption (Bug ID 6488341)
- ARC/L2ARC metadata accounting (Bug ID 6748019)
- L2ARC turbo warmup (Bud ID 6748023)
- kstats for ARC content (Bug ID 6748023)
- kstats for evicted bytes from ARC by L2ARC state (Bud ID 6871680)
- fix panic on i386 systems (Bug ID 6821260)
jkim [Mon, 24 May 2010 01:44:30 +0000 (01:44 +0000)]
MFC: r208276
Remove unnecessary pointer increment. A wrong pointer may be passed to
free(9) and it can cause kernel panic when there are multiple graphics
controllers in the system.
marius [Sun, 23 May 2010 16:16:33 +0000 (16:16 +0000)]
MFC: r208349
Change ad_firmware_geom_adjust() to operate on a struct disk * only and
hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust()
to *ata_disk_firmware_geom_adjust() etc now that these are no longer
limited to ad(4). This also allows to maintain a compatibility shim for
pc98_ad_firmware_geom_adjust() for the tier-1 PC98 in stable/8.
marius [Sun, 23 May 2010 11:18:05 +0000 (11:18 +0000)]
MFC: r208341
Update to a config.h created by a file 5.03 configure script. This causes
file.1 to contain the correct version number and SIZEOF_LONG_LONG to be
defined as appropriate, which is crucial for 64-bit big-endian ELF files
to be handled correctly on big-endian systems.
rmacklem [Sun, 23 May 2010 02:55:59 +0000 (02:55 +0000)]
MFC: r208254
Allow the experimental NFSv4 client to use cached attributes
when a write delegation is held. Also, add a missing
mtx_unlock() call for the ACL debugging code.
nwhitehorn [Sun, 23 May 2010 02:31:37 +0000 (02:31 +0000)]
MFC r205497,208364,208405:
Fix a long-standing bug in the PowerPC OFW call function on SMP machines
by forcing all secondary CPUs into a busy wait with interrupts off during
the call. This bug caused ofwdump -a to hang the system.
Following section 8.4 of the Open Firmware PowerPC processor binding,
the firmware is free to overwrite the system interrupt handlers during
OF calls, restoring the OS handlers on exit. On single CPU systems, this
process is invisible to the operating system. On multiple CPU systems,
taking any exception on a secondary CPU while an OF call is in progress
ends with that exception vectored into OF, resulting in a slow movement
of the entire system into firmware context and a machine hang.
nwhitehorn [Sun, 23 May 2010 02:18:40 +0000 (02:18 +0000)]
MFC r208152,208172:
On PowerMac11,2 and (presumably) PowerMac12,1, we need to quiesce the
firmware in order to take over control of the SMU. Without doing this,
the firmware background process doing fan control will run amok as we
take over the system and crash the management chip.
This is limited to these two machines because our kernel is heavily
dependent on firmware accesses, and so quiescing firmware can cause
nasty problems.
nwhitehorn [Sun, 23 May 2010 02:15:31 +0000 (02:15 +0000)]
MFC r208149,208285:
Add support for the U4 PCI-Express bridge chipset used in late-generation
Powermac G5 systems. MSI and several other things are not presently
supported.
The U3/U4 internal device support portions of this change were contributed
by Andreas Tobler.
randi [Fri, 21 May 2010 23:08:53 +0000 (23:08 +0000)]
MFC r198317,206995:
Introduce 'netDev=ANY' support for scripted (install.cfg) installs, which
results in the first ethernet interface with physical link being selected.
marius [Fri, 21 May 2010 19:45:54 +0000 (19:45 +0000)]
MFC: r197362
IEEE Std 1003.1, 2004 Edition states:
"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."
It is unclear whether this also applies to a \n embedded in a
character class. Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.
marius [Fri, 21 May 2010 19:44:23 +0000 (19:44 +0000)]
MFC: r197361
Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
of the y (translate) command.
"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"
marius [Fri, 21 May 2010 19:09:41 +0000 (19:09 +0000)]
MFC: r197352
The transition to Subversion allows us to rename files without
repo-copy hacks.
Remove the test-number prefix from the name of the output files,
so that new test cases can be easily added.
jhb [Fri, 21 May 2010 16:17:08 +0000 (16:17 +0000)]
MFC 208213:
Prevent unloading a kld for a driver that has subinterfaces (vlan and/or
wlan interfaces) from being automatically reloaded via devd shutdown
event handlers.
- Revert part of my previous changes to call ifn_stop on subinterfaces
when an interface is detached. It is better to destroy the interfaces
first so that an 'ifconfig foo0.blah down' doesn't result in ifconfig
auto-loading if_foo.ko. The ifconfig command will not be invoked if
foo0.blah is gone when ifn_stop() is called. Furthermore, it is not
necessary to explicitly invoke ifn_stop() after the subinterface is
destroyed as devd will already do that.
- Pass -n to ifconfig when destroying interfaces so that destroying a
cloned interface does not kldload any drivers.
trasz [Thu, 20 May 2010 18:45:07 +0000 (18:45 +0000)]
MFC r208033:
Make it possible to actually use NFSv4 permission bits with acl_set_perm(3)
and acl_delete_perm(3). It went undetected, because neither setfacl(1)
nor Samba use this routines. D'oh.
alc [Thu, 20 May 2010 16:21:19 +0000 (16:21 +0000)]
MFC r207306
Change vm_object_madvise() so that it checks whether the page is invalid
or unmanaged before acquiring the page queues lock. Neither of these
tests require that lock. Moreover, a better way of testing if the page
is unmanaged is to test the type of vm object. This avoids a pointless
vm_page_lookup().
mm [Thu, 20 May 2010 06:51:48 +0000 (06:51 +0000)]
MFC r208047:
Import OpenSolaris revision 7837:001de5627df3
It includes the following changes:
- parallel reads in traversal code (Bug ID 6333409)
- faster traversal for zfs send (Bug ID 6418042)
- traversal code cleanup (Bug ID 6725675)
- fix for two scrub related bugs (Bug ID 6729696, 6730101)
- fix assertion in dbuf_verify (Bug ID 6752226)
- fix panic during zfs send with i/o errors (Bug ID 6577985)
- replace P2CROSS with P2BOUNDARY (Bug ID 6725680)
gordon [Wed, 19 May 2010 22:03:45 +0000 (22:03 +0000)]
MFC r207981:
Fix a bug due to a type conversion from 64 to 32 bits. The side effect of
this type conversion is the high bits which were used to indicate if a
special character was a literal or special were dropped. As a result, all
special character were treated as special, even if they were supposed to
be literals.
yongari [Wed, 19 May 2010 21:08:38 +0000 (21:08 +0000)]
MFC r208084:
If controller received bad frames make sure to update newly added
RFA. Also drop frames that have either CRC error or alignment
error. Normally bad frames are not received at all. But controllers
running in promiscuous mode will receive bad frames. 82557 will
also receive bad frames to receive VLAN oversized frames.
While I'm here mark RNR condition if driver happen to see RNR in
RFA status and restart RU to receive frames again. Because driver
checks all received frames in RX loop, RNR condition could be set
in the middle of RX processing. Just relying on RNR interrupt was
not enough.
This change fixes "Memory modified after free" issue when fxp(4)
is running as a member of if_bridge(4).
jilles [Wed, 19 May 2010 20:53:21 +0000 (20:53 +0000)]
MFC r208116: Change the commented msgs examples in profile/csh.login
from -f to -q.
Starting something that wants input on login seems strange and can be
dangerous. In some configurations, causing output can be bad, but it is not
as dangerous.
I do not expect this msgs invocation to be uncommented often.
jhb [Wed, 19 May 2010 19:43:49 +0000 (19:43 +0000)]
MFC 207335:
Initialize the callout structure earlier in attach before calling any
routines that can fail since ciss_free() always tries to stop and drain
the callout.
mav [Wed, 19 May 2010 14:50:07 +0000 (14:50 +0000)]
MFC r207536, r207696, r208183:
Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
driver for CAM ATA subsystem. This driver supports same hardware as
atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides
many additional features, such as NCQ, PMP, etc.