]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoFix deadlock between GEOM class unloading and withering. Withering can't
Jaakko Heinonen [Wed, 5 May 2010 18:53:24 +0000 (18:53 +0000)]
Fix deadlock between GEOM class unloading and withering. Withering can't
proceed while g_unload_class() blocks the event thread. Fix this by not
running g_unload_class() as a GEOM event and dropping the topology lock
when withering needs to proceed.

PR: kern/139847
Silence on: freebsd-geom

14 years agoIntroduce hardforce export option (-F) for "zpool export".
Martin Matuska [Wed, 5 May 2010 18:22:29 +0000 (18:22 +0000)]
Introduce hardforce export option (-F) for "zpool export".
When exporting with this flag, zpool.cache remains untouched.

OpenSolaris onnv revision: 8211:32722be6ad3b

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID: 6775357)

14 years agoAcquire the page lock around all remaining calls to vm_page_free() on
Alan Cox [Wed, 5 May 2010 18:16:06 +0000 (18:16 +0000)]
Acquire the page lock around all remaining calls to vm_page_free() on
managed pages that didn't already have that lock held.  (Freeing an
unmanaged page, such as the various pmaps use, doesn't require the page
lock.)

This allows a change in vm_page_remove()'s locking requirements.  It now
expects the page lock to be held instead of the page queues lock.
Consequently, the page queues lock is no longer required at all by callers
to vm_page_rename().

Discussed with: kib

14 years agoMove checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().
Edward Tomasz Napierala [Wed, 5 May 2010 16:44:25 +0000 (16:44 +0000)]
Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().

Reviewed by: kib

14 years agoFix a mistake in r207603. td_rux.rux_runtime still needs conversion.
Konstantin Belousov [Wed, 5 May 2010 16:05:51 +0000 (16:05 +0000)]
Fix a mistake in r207603. td_rux.rux_runtime still needs conversion.

Reported and tested by: nwhitehorn
Pointy hat to: kib
MFC after: 6 days

14 years agoSet SA's natt_type before calling key_mature() in key_add(),
VANHULLEBUS Yvan [Wed, 5 May 2010 08:58:58 +0000 (08:58 +0000)]
Set SA's natt_type before calling key_mature() in key_add(),
as the SA may be used as soon as key_mature() has been done.

Obtained from: NETASQ
MFC after: 1 week

14 years agoUpdate SA's NAT-T stuff before calling key_mature() in key_update(),
VANHULLEBUS Yvan [Wed, 5 May 2010 08:55:26 +0000 (08:55 +0000)]
Update SA's NAT-T stuff before calling key_mature() in key_update(),
as SA may be used as soon as key_mature() has been called.

Obtained from: NETASQ
MFC after: 1 week

14 years ago- fix typo
Daniel Gerzo [Wed, 5 May 2010 08:43:47 +0000 (08:43 +0000)]
- fix typo

14 years agoUse an OBJT_PHYS object and thus PG_UNMANAGED pages to implement the TSB.
Alan Cox [Wed, 5 May 2010 07:47:40 +0000 (07:47 +0000)]
Use an OBJT_PHYS object and thus PG_UNMANAGED pages to implement the TSB.
The TSB is not a pageable structure, so there is no point in using managed
pages.

Reviewed by: kib

14 years agoPush down the acquisition of the page queues lock into vm_page_unwire().
Alan Cox [Wed, 5 May 2010 07:40:54 +0000 (07:40 +0000)]
Push down the acquisition of the page queues lock into vm_page_unwire().

14 years agoFix DDB backtrace involving kernel modules.
Neel Natu [Wed, 5 May 2010 04:37:45 +0000 (04:37 +0000)]
Fix DDB backtrace involving kernel modules.

We can no longer assume that all valid program counter values reside
within the kernel object file.

14 years agoPush down the acquisition of the page queues lock into vm_page_unwire().
Alan Cox [Wed, 5 May 2010 03:45:46 +0000 (03:45 +0000)]
Push down the acquisition of the page queues lock into vm_page_unwire().

Update the comment describing which lock should be held on entry to
vm_page_wire().

Reviewed by: kib

14 years agoAdd support for hardware filters to cxgb(4). The T3 chip can inspect
Navdeep Parhar [Wed, 5 May 2010 00:41:40 +0000 (00:41 +0000)]
Add support for hardware filters to cxgb(4).  The T3 chip can inspect
L2/3/4 headers and can drop or steer packets as instructed.  Filtering
based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac
addr is possible.  Add support in cxgbtool to program these filters.
Some simple examples:

Drop all tcp/80 traffic coming from the subnet specified.
# cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop

Steer all incoming UDP traffic to qset 0.
# cxgbtool cxgb2 filter 1 type udp queue 0 action pass

Steer all tcp traffic from 192.168.1.1 to qset 1.
# cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass

Drop fragments.
# cxgbtool cxgb2 filter 3 type frag action drop

List all filters.
# cxgbtool cxgb2 filter list
index         SIP                DIP     sport dport VLAN PRI P/MAC type Q
    0     192.168.1.0/24         0.0.0.0     *    80    0 0/1 */*    tcp -
    1         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*    udp 0
    2     192.168.1.1/32         0.0.0.0     *     *    0 0/1 */*    tcp 1
    3         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*   frag -
16367         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*      * *

MFC after: 2 weeks

14 years agoAdd IFCAP_LINKSTATE to cxgb's capabilities.
Navdeep Parhar [Tue, 4 May 2010 23:55:08 +0000 (23:55 +0000)]
Add IFCAP_LINKSTATE to cxgb's capabilities.

MFC after: 3 days

14 years agoWhen VLAN hardware tagging is disabled, make sure to disable VLAN
Pyun YongHyeon [Tue, 4 May 2010 22:24:19 +0000 (22:24 +0000)]
When VLAN hardware tagging is disabled, make sure to disable VLAN
checksum offloading as well as TSO over VLAN.

Reported by: jhb

14 years agoFree entire mbuf chain instead of the first mbuf.
Pyun YongHyeon [Tue, 4 May 2010 21:23:59 +0000 (21:23 +0000)]
Free entire mbuf chain instead of the first mbuf.

14 years agoRemove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules
Xin LI [Tue, 4 May 2010 19:58:55 +0000 (19:58 +0000)]
Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules
available, they were removed due to NEEDSGIANT.

While I'm there, add if_et which was missed quite a while ago.

MFC after: 2 weeks

14 years agoEnable multi-descriptor transmisstion for fragmented mbufs. There
Pyun YongHyeon [Tue, 4 May 2010 19:04:51 +0000 (19:04 +0000)]
Enable multi-descriptor transmisstion for fragmented mbufs. There
is no more need to defragment mbufs. After transmitting the
multi-fragmented frame, the controller updates only the first
descriptor of multi-descriptor transmission so it's driver's
responsibility to clear OWN bits of remaining descriptor of
multi-descriptor transmission. It seems the controller behaves much
like jme(4) controllers in descriptor handling.

Tested by: xclin <xclin <> cs dot nctu dot edu dot tw >

14 years agoEnable "zfs list" to list explicitly requested snapshots.
Martin Matuska [Tue, 4 May 2010 17:44:40 +0000 (17:44 +0000)]
Enable "zfs list" to list explicitly requested snapshots.

Partial import of OpenSolaris onnv revision:
8415:8809e849f63e

PR: kern/146297
Submitted by: myself
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6758338)
MFC after: 2 weeks

14 years agoSpeed up ZFS list operation with objset prefetching.
Martin Matuska [Tue, 4 May 2010 17:40:24 +0000 (17:40 +0000)]
Speed up ZFS list operation with objset prefetching.

Partial import of OpenSolaris onnv revisions:
8415:8809e849f63e, 10474:0e96dd3b905a

PR: kern/146297
Submitted by: myself
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 638692967553896847118)
MFC after: 2 weeks

14 years agoRemove clearing RxHashTable2 register. The register is reprogrammed
Pyun YongHyeon [Tue, 4 May 2010 17:34:00 +0000 (17:34 +0000)]
Remove clearing RxHashTable2 register. The register is reprogrammed
in sge_rxfilter().

14 years agoFix deadlock during zfs receive.
Martin Matuska [Tue, 4 May 2010 17:30:07 +0000 (17:30 +0000)]
Fix deadlock during zfs receive.

OpenSolaris onnv revision: 9299:8809e849f63e

PR: kern/146296
Submitted by: myself
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 67838186826836)
MFC after: 1 week

14 years agoMake sure to check whether driver is running before processing
Pyun YongHyeon [Tue, 4 May 2010 17:12:36 +0000 (17:12 +0000)]
Make sure to check whether driver is running before processing
received frames. Also check driver has valid ifp pointer before
calling msk_stop() in device_shutdown handler. While I'm here
remove unnecessary accesses to interrupt mask registers in
device_shutdown handler because driver puts the controller into
reset state.
With these changes, msk(4) now survive from heavy RX traffic(1byte
UDP frame) while reboot is in progress.

Reported by: Mark Atkinson < atkin901 <> gmail dot com >

14 years agoDrop driver lock before exiting from interrupt handler.
Pyun YongHyeon [Tue, 4 May 2010 17:02:34 +0000 (17:02 +0000)]
Drop driver lock before exiting from interrupt handler.

Submitted by: jhb
MFC after: 3 days

14 years agoDoh! Add another new file forgotten by the importer of edwin@'s tftp
Warner Losh [Tue, 4 May 2010 17:00:18 +0000 (17:00 +0000)]
Doh!  Add another new file forgotten by the importer of edwin@'s tftp
improvements.

MFC after: 1 week
Pointy Hat: imp-o-rama...

14 years ago- Remove more dead code[1]. Since r207330, we only need to check division
Jung-uk Kim [Tue, 4 May 2010 16:56:59 +0000 (16:56 +0000)]
- Remove more dead code[1].  Since r207330, we only need to check division
by zero of the second argument 'from'.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.

Pointed out by: Andrew Reilly (areilly at bigpond dot net dot au)[1]
MFC after: 3 days

14 years agoAdd page locking to the vm_page_cow* functions.
Alan Cox [Tue, 4 May 2010 15:55:41 +0000 (15:55 +0000)]
Add page locking to the vm_page_cow* functions.

Push down the acquisition and release of the page queues lock into
vm_page_wire().

Reviewed by: kib

14 years agoAdd a case to make sure that internal audit records get converted
Christian S.J. Peron [Tue, 4 May 2010 15:29:07 +0000 (15:29 +0000)]
Add a case to make sure that internal audit records get converted
to BSM format for lpathconf(2) events.

MFC after: 2 weeks

14 years agoBring in new files from edwin's tftp
Warner Losh [Tue, 4 May 2010 13:07:40 +0000 (13:07 +0000)]
Bring in new files from edwin's tftp

14 years agoRestore historical behaviour of only executing chflags on files that exist.
Ed Maste [Tue, 4 May 2010 11:34:13 +0000 (11:34 +0000)]
Restore historical behaviour of only executing chflags on files that exist.
This eliminates cosmetic errors of the form "chflags: ...: No such file or
directory" during an installworld to an empty destination.

14 years agoAdd support run services_mkdb(8).
Norikatsu Shigemura [Tue, 4 May 2010 11:25:04 +0000 (11:25 +0000)]
Add support run services_mkdb(8).

Approved by: dougb, imp (mentor)
Reviewed by: ume
MFC after: 2 weeks

14 years agoAdd support for FA626TE.
Kevin Lo [Tue, 4 May 2010 10:14:05 +0000 (10:14 +0000)]
Add support for FA626TE.
Tested on GM8181 development board.

14 years agoGo ahead and merge the work edwin@ on tftpd into the tree. It is a
Warner Losh [Tue, 4 May 2010 06:19:19 +0000 (06:19 +0000)]
Go ahead and merge the work edwin@ on tftpd into the tree.  It is a
lot better than what's in the tree now.  Edwin tested it at a prior
employer, but can't test it today.  I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work.  Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
          Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>

14 years agoGo ahead and merge the work edwin@ on tftpd into the tree. It is a
Warner Losh [Tue, 4 May 2010 06:13:17 +0000 (06:13 +0000)]
Go ahead and merge the work edwin@ on tftpd into the tree.  It is a
lot better than what's in the tree now.  Edwin tested it at a prior
employer, but can't test it today.  I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work.  Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
          Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>

14 years agoFix typo in comment.
Konstantin Belousov [Tue, 4 May 2010 06:06:01 +0000 (06:06 +0000)]
Fix typo in comment.

MFC after: 3 days

14 years agoRemove a comment that merely repeats code.
Konstantin Belousov [Tue, 4 May 2010 06:04:33 +0000 (06:04 +0000)]
Remove a comment that merely repeats code.

Submitted by: bde
MFC after: 1 week

14 years agoDocument RUSAGE_THREAD.
Konstantin Belousov [Tue, 4 May 2010 06:01:25 +0000 (06:01 +0000)]
Document RUSAGE_THREAD.

Reviewed by: bde
MFC after: 1 week

14 years agoUse td_rux.rux_runtime for ki_runtime instead of redoing calculation.
Konstantin Belousov [Tue, 4 May 2010 06:00:39 +0000 (06:00 +0000)]
Use td_rux.rux_runtime for ki_runtime instead of redoing calculation.

Submitted by: bde
MFC after: 1 week

14 years agoImplement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks
Konstantin Belousov [Tue, 4 May 2010 05:55:37 +0000 (05:55 +0000)]
Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks
information for thread to allow calcru1() (re)use.

Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1].
The ruxagg_locked() function no longer clears thread ticks nor
td_incruntime.

Requested by: attilio [1]
Discussed with: attilio, bde
Reviewed by: bde
Based on submission by: Alexander Krizhanovsky <ak natsys-lab com>
MFC after: 1 week
X-MFC-Note: td_rux shall be moved to the end of struct thread

14 years agoAdd lock assertions.
Alan Cox [Tue, 4 May 2010 05:55:19 +0000 (05:55 +0000)]
Add lock assertions.

14 years agoMove definition of struct rusage_ext before struct thread.
Konstantin Belousov [Tue, 4 May 2010 05:47:17 +0000 (05:47 +0000)]
Move definition of struct rusage_ext before struct thread.

MFC after: 1 week

14 years agoMake address assignment via ipv6_prefix_IF work again
Doug Barton [Tue, 4 May 2010 01:46:58 +0000 (01:46 +0000)]
Make address assignment via ipv6_prefix_IF work again

14 years agoUpdate GRANDPARENTED text to match the contents of tzdata/factory r19879.
Ed Maste [Mon, 3 May 2010 22:32:26 +0000 (22:32 +0000)]
Update GRANDPARENTED text to match the contents of tzdata/factory r19879.
This eliminates "warning: time zone abbreviation differs from POSIX" on
installworld to an empty filesystem.

Reviewed by: edwin
MFC after: 1 week

14 years agoSun GigaSwift Ethernet 1.0 MMF work with r207585 in place.
Marius Strobl [Mon, 3 May 2010 20:59:27 +0000 (20:59 +0000)]
Sun GigaSwift Ethernet 1.0 MMF work with r207585 in place.

14 years ago- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
Marius Strobl [Mon, 3 May 2010 20:57:16 +0000 (20:57 +0000)]
- Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
  on Cassini using the external PCS SERDES otherwise unaligned access
  traps and other strange effects happen with some machines. Don't touch
  the MIF which is unused in that case either. These changes require the
  PHY type to use to be determined via the OFW device tree or from the
  VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
  and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.

These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.

PR: 144867

14 years agoLock the page around vm_page_activate() and vm_page_deactivate() calls
Konstantin Belousov [Mon, 3 May 2010 20:31:13 +0000 (20:31 +0000)]
Lock the page around vm_page_activate() and vm_page_deactivate() calls
where it was missed. The wrapped fragments now protect wire_count with
page lock.

Reviewed by: alc

14 years agoHandle busy status of the page in a way expected for pager_getpage().
Konstantin Belousov [Mon, 3 May 2010 19:19:58 +0000 (19:19 +0000)]
Handle busy status of the page in a way expected for pager_getpage().
Flush requested page, unbusy other pages, do not clear m->busy.

Reviewed by: alc
MFC after: 1 week

14 years agoOn sparc64 obtain the initiator ID from the Open Firmware device tree
Marius Strobl [Mon, 3 May 2010 18:39:40 +0000 (18:39 +0000)]
On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.

Approved by: mjacob

14 years agoDo not encode more than CTF_MAX_VLEN(1023) enum members.
Alexander Kabaev [Mon, 3 May 2010 18:04:17 +0000 (18:04 +0000)]
Do not encode more than CTF_MAX_VLEN(1023) enum members.

CTF can not represent enums with more than CTF_MAX_VLEN members, but
ctfconvert will happily ignore that limitation and create CTF section no
other tool can interpret.

This change is different from similar change from upstream, which just
returns an error if big enum is encountered.  Doing that means that
every FreeBSD kernel with compiled in hwpmc will have no useable CTF
information due to pmc_event enum having 1236+ members.

14 years agoAcquire the page lock around vm_page_wire() in vm_page_grab().
Alan Cox [Mon, 3 May 2010 17:55:32 +0000 (17:55 +0000)]
Acquire the page lock around vm_page_wire() in vm_page_grab().

Assert that the page lock is held in vm_page_wire().

14 years agoIt makes more sense for the object-based backend allocator to use OBJT_PHYS
Alan Cox [Mon, 3 May 2010 17:35:31 +0000 (17:35 +0000)]
It makes more sense for the object-based backend allocator to use OBJT_PHYS
objects instead of OBJT_DEFAULT objects because we never reclaim or pageout
the allocated pages.  Moreover, they are mapped with pmap_qenter(), which
creates unmanaged mappings.

Reviewed by: kib

14 years agoAcquire the page lock around vm_page_unwire(). For consistency, extend the
Alan Cox [Mon, 3 May 2010 16:55:50 +0000 (16:55 +0000)]
Acquire the page lock around vm_page_unwire().  For consistency, extend the
scope of the object lock in agp_i810.c.  (In this specific case, the scope
of the object lock shouldn't matter, but I don't want to create a bad
example that might be copied to a case where it did matter.)

Reviewed by: kib

14 years agoAcquire the page lock around vm_page_unwire() and vm_page_wire().
Alan Cox [Mon, 3 May 2010 16:41:11 +0000 (16:41 +0000)]
Acquire the page lock around vm_page_unwire() and vm_page_wire().

Reviewed by: kib

14 years agoWhen destroying a vnet, shut down all netgraph nodes tied to that vnet
Marko Zec [Mon, 3 May 2010 16:08:24 +0000 (16:08 +0000)]
When destroying a vnet, shut down all netgraph nodes tied to that vnet
before proceeding with dismantling other protocol domains.

This change only affects options VIMAGE builds.

Reviewed by: julian, bz
MFC after: 3 days

14 years agoNeither the page lock nor the page queues lock is required to unwire and
Alan Cox [Mon, 3 May 2010 15:51:59 +0000 (15:51 +0000)]
Neither the page lock nor the page queues lock is required to unwire and
free a VM_ALLOC_NOOBJ page.  (Such pages are unmanaged.)

14 years agoStyle and comment adjustements.
Konstantin Belousov [Mon, 3 May 2010 14:30:49 +0000 (14:30 +0000)]
Style and comment adjustements.

Suggested and reviewed by: bde
MFC after: 3 days

14 years ago- #ifdef out the cliplist part, skype seems like using an uninitialized
Alexander Leidinger [Mon, 3 May 2010 14:19:58 +0000 (14:19 +0000)]
- #ifdef out the cliplist part, skype seems like using an uninitialized
  variable and can cause problems, without the cliplist handling it works
  without problems
- improve the cliplist error handling
- fix VIDIOCGTUNER and VIDIOCSMICROCODE (still no hardware available to test)

Submitted by: J.R. Oldroyd <jr@opal.com>
X-MFC after: soon (together with all the v4l stuff)

14 years agoBump .Dd date.
Xin LI [Mon, 3 May 2010 09:49:42 +0000 (09:49 +0000)]
Bump .Dd date.

Forgotten by: delphij

14 years agoCode indent according to style(9).
Martin Matuska [Mon, 3 May 2010 07:39:51 +0000 (07:39 +0000)]
Code indent according to style(9).

PR: bin/146186
Submitted by: myself
Approved by: delphij (mentor)
MFC after: 2 weeks

14 years agoAdd new tunable 'net.link.ifqmaxlen' to set default send interface
Maxim Sobolev [Mon, 3 May 2010 07:32:50 +0000 (07:32 +0000)]
Add new tunable 'net.link.ifqmaxlen' to set default send interface
queue length. The default value for this parameter is 50, which is
quite low for many of today's uses and the only way to modify this
parameter right now is to edit if_var.h file. Also add read-only
sysctl with the same name, so that it's possible to retrieve the
current value.

MFC after: 1 month

14 years agoImplement the no_user_check option to pam_krb5.
Martin Matuska [Mon, 3 May 2010 07:32:24 +0000 (07:32 +0000)]
Implement the no_user_check option to pam_krb5.

This option is available in the Linux implementation of pam_krb5
and allows to authorize a user not known to the local system.

Ccache is not used as we don't have a secure uid/gid for the cache file.

Usable for authentication of external kerberos users (e.g Active Directory)
via PAM from applications like Cyrus saslauthd, PHP or perl.

PR: bin/146186
Submitted by: myself
Approved by: deplhij (mentor)
MFC after: 2 weeks

14 years agoThe pages allocated by kmem_alloc_attr() and kmem_malloc() are unmanaged.
Alan Cox [Mon, 3 May 2010 07:08:16 +0000 (07:08 +0000)]
The pages allocated by kmem_alloc_attr() and kmem_malloc() are unmanaged.
Consequently, neither the page lock nor the page queues lock is needed to
unwire and free them.

14 years agoAssert that the page queues lock is held in vm_page_remove() and
Alan Cox [Mon, 3 May 2010 07:00:50 +0000 (07:00 +0000)]
Assert that the page queues lock is held in vm_page_remove() and
vm_page_unwire() only if the page is managed, i.e., pageable.

14 years agoThis is the first step in transitioning responsibility for synchronizing
Alan Cox [Mon, 3 May 2010 05:41:50 +0000 (05:41 +0000)]
This is the first step in transitioning responsibility for synchronizing
access to the page's wire_count from the page queues lock to the page lock.

Submitted by: kmacy

14 years agoFix wrong dma tag usage. Previously it used TX descriptor ring dma
Pyun YongHyeon [Mon, 3 May 2010 00:56:26 +0000 (00:56 +0000)]
Fix wrong dma tag usage. Previously it used TX descriptor ring dma
tag which should be TX mbuf dma tag.

Reported by: xclin <xclin <> cs dot nctu dot edu dot tw >

14 years agoAdd page lock assertions where we access the page's hold_count.
Alan Cox [Sun, 2 May 2010 23:33:10 +0000 (23:33 +0000)]
Add page lock assertions where we access the page's hold_count.

14 years agoPrint IR_RESYNC updates informatively.
Matt Jacob [Sun, 2 May 2010 22:48:27 +0000 (22:48 +0000)]
Print IR_RESYNC updates informatively.

Obtained from: pluknet
MFC after: 1 week

14 years agoEliminate an assignment that was made redundant by r207410.
Alan Cox [Sun, 2 May 2010 21:04:59 +0000 (21:04 +0000)]
Eliminate an assignment that was made redundant by r207410.

14 years agoDefer the acquisition of the page and page queues locks in
Alan Cox [Sun, 2 May 2010 20:46:17 +0000 (20:46 +0000)]
Defer the acquisition of the page and page queues locks in
vm_pageout_object_deactivate_pages().

14 years agoSimplify vm_fault(). The introduction of the new page lock renders a bit of
Alan Cox [Sun, 2 May 2010 20:24:25 +0000 (20:24 +0000)]
Simplify vm_fault().  The introduction of the new page lock renders a bit of
cleverness by vm_fault() to avoid repeatedly releasing and reacquiring the
page queues lock pointless.

Reviewed by: kib, kmacy

14 years agoAdd support for SPARC64 V (and where it already makes sense for other
Marius Strobl [Sun, 2 May 2010 19:38:17 +0000 (19:38 +0000)]
Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.

14 years agoImport mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
Alexander Motin [Sun, 2 May 2010 19:28:30 +0000 (19:28 +0000)]
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.

14 years agoLock the page around hold_count access.
Konstantin Belousov [Sun, 2 May 2010 19:25:22 +0000 (19:25 +0000)]
Lock the page around hold_count access.

Reviewed by: alc

14 years agoProperly synchronize access to the page's hold_count in vfs_vmio_release().
Alan Cox [Sun, 2 May 2010 19:10:27 +0000 (19:10 +0000)]
Properly synchronize access to the page's hold_count in vfs_vmio_release().

Reviewed by: kib

14 years agoRemove redundant checking of sc_leaving (uart_intr() already handles this).
Marius Strobl [Sun, 2 May 2010 19:07:19 +0000 (19:07 +0000)]
Remove redundant checking of sc_leaving (uart_intr() already handles this).

Approved by: marcel

14 years agoRemove a soft member which was never used.
Marius Strobl [Sun, 2 May 2010 19:05:57 +0000 (19:05 +0000)]
Remove a soft member which was never used.

Approved by: marcel

14 years agoCorrect an error in r207410: Remove an unlock of a lock that is no longer
Alan Cox [Sun, 2 May 2010 18:09:33 +0000 (18:09 +0000)]
Correct an error in r207410: Remove an unlock of a lock that is no longer
held.

14 years agoIt makes no sense for vm_page_sleep_if_busy()'s helper, vm_page_sleep(),
Alan Cox [Sun, 2 May 2010 17:33:46 +0000 (17:33 +0000)]
It makes no sense for vm_page_sleep_if_busy()'s helper, vm_page_sleep(),
to unconditionally set PG_REFERENCED on a page before sleeping.  In many
cases, it's perfectly ok for the page to disappear, i.e., be reclaimed by
the page daemon, before the caller to vm_page_sleep() is reawakened.
Instead, we now explicitly set PG_REFERENCED in those cases where having
the page persist until the caller is awakened is clearly desirable.  Note,
however, that setting PG_REFERENCED on the page is still only a hint,
and not a guarantee that the page should persist.

14 years agoThis change addresses the race condition that was introduced by the previous
Alan Cox [Sun, 2 May 2010 16:44:06 +0000 (16:44 +0000)]
This change addresses the race condition that was introduced by the previous
revision, r207450, to this file.  Specifically, between dropping the page
queues lock in vm_contig_launder() and reacquiring it in
vm_contig_launder_page(), the page may be removed from the active or
inactive queue.  It could be wired, freed, cached, etc.  None of which
vm_contig_launder_page() is prepared for.

Reviewed by: kib, kmacy

14 years agoEnable PCI busmastering explicitly to be sure.
Alexander Motin [Sun, 2 May 2010 14:46:05 +0000 (14:46 +0000)]
Enable PCI busmastering explicitly to be sure.

14 years agoAdd a hack for SPARC64 V CPUs, which set some undocumented bits in the
Marius Strobl [Sun, 2 May 2010 12:08:15 +0000 (12:08 +0000)]
Add a hack for SPARC64 V CPUs, which set some undocumented bits in the
first data word.

14 years agoMake SATA XPT negotiate and enable some additional SATA features, such as:
Alexander Motin [Sun, 2 May 2010 12:07:47 +0000 (12:07 +0000)]
Make SATA XPT negotiate and enable some additional SATA features, such as:
 - device initiated power management (some devices support only this way);
 - Automatic Partial to Slumber Transition (more power saving);
 - DMA auto-activation (expected to slightly improve performance).
More features could be added later, when hardware supports.

14 years agoAdd -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands.
Alexander Motin [Sun, 2 May 2010 11:36:27 +0000 (11:36 +0000)]
Add -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands.

14 years agoAdd xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in
Alexander Motin [Sun, 2 May 2010 04:16:39 +0000 (04:16 +0000)]
Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in
usual operation, but required in some conditions to make queue running
after being shrinked.

MFC after: 3 days

14 years agoCorrect an error of omission in r206819. If VMFS_TLB_ALIGNED_SPACE is
Alan Cox [Sun, 2 May 2010 01:25:03 +0000 (01:25 +0000)]
Correct an error of omission in r206819.  If VMFS_TLB_ALIGNED_SPACE is
specified to vm_map_find(), then retry the vm_map_findspace() if
vm_map_insert() fails because the aligned space is already partly used.

Reported by: Neel Natu

14 years agopathchk(1): Fix the example so it allows arbitrary pathnames.
Jilles Tjoelker [Sat, 1 May 2010 22:10:45 +0000 (22:10 +0000)]
pathchk(1): Fix the example so it allows arbitrary pathnames.

Spaces and various other characters in pathnames are not passed through
literally by xargs in its default mode. Instead, use find . -exec ... {} +

Although the -- argument is not strictly required here, add it anyway to
avoid surprises when modifying the code to find -f -somedir ...

MFC after: 1 week

14 years agoWhen configuring a system-wide couting PMC, hwpmc was incorrectly logging process...
Ryan Stone [Sat, 1 May 2010 22:04:58 +0000 (22:04 +0000)]
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.

Approved by: jkoshy (mentor)
MFC after: 2 weeks

14 years agopathchk: Add the new POSIX -P option.
Jilles Tjoelker [Sat, 1 May 2010 22:00:28 +0000 (22:00 +0000)]
pathchk: Add the new POSIX -P option.

This option checks for empty pathnames and components starting with '-'.
Our -p option also checks for the latter, which remains the case.

MFC after: 1 week

14 years agoWhen configuring hwpmc to use the EXT_SNOOP event, only send a default cachestate...
Ryan Stone [Sat, 1 May 2010 21:59:06 +0000 (21:59 +0000)]
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

Approved by: jkoshy (mentor)
MFC after: 2 weeks

14 years agoAdd sysctl and loader tunable vfs.zfs.txg.write_limit_override.
Martin Matuska [Sat, 1 May 2010 20:44:37 +0000 (20:44 +0000)]
Add sysctl and loader tunable vfs.zfs.txg.write_limit_override.
This tunable improves fine-tuning of ZFS write throttling.

PR: kern/146108
Suggested by: Nikolay Denev <ndenev at gmail.com>
Approved by: pjd, delphij (mentor)
MFC after: 2 weeks

14 years agoChange description of tunable group vfs.zfs.txg to be more
Martin Matuska [Sat, 1 May 2010 19:53:15 +0000 (19:53 +0000)]
Change description of tunable group vfs.zfs.txg to be more
understandable.

Approved by: pjd, delphij (mentor)
MFC after: 3 days

14 years agoSearch beyond the first 1/8th of inodes.
Ed Maste [Sat, 1 May 2010 18:56:45 +0000 (18:56 +0000)]
Search beyond the first 1/8th of inodes.

Submitted by: jeff

14 years agoRemove a redundant variable assignment.
Marko Zec [Sat, 1 May 2010 18:34:50 +0000 (18:34 +0000)]
Remove a redundant variable assignment.

Reviewed by: bz, rwatson
MFC after: 3 days

14 years agoEnable AH_RXCFG_SDMAMW_4BYTES option. See NOTES file for why this is
Warner Losh [Sat, 1 May 2010 16:39:46 +0000 (16:39 +0000)]
Enable AH_RXCFG_SDMAMW_4BYTES option.  See NOTES file for why this is
workaround (WAR) is needed.

14 years agoPut the -current debugging options back into AR71XX.
Warner Losh [Sat, 1 May 2010 16:38:40 +0000 (16:38 +0000)]
Put the -current debugging options back into AR71XX.

14 years agoThe Atheros AR71xx CPUs, when paired with the AR5212 parts, has a bug
Warner Losh [Sat, 1 May 2010 16:36:14 +0000 (16:36 +0000)]
The Atheros AR71xx CPUs, when paired with the AR5212 parts, has a bug
that generates a fatal bus trap.  Normally, the chips are setup to do
128 byte DMA bursts, but when on this CPU, they can only safely due
4-byte DMA bursts due to this bug.  Details of the exact nature of the
bug are sketchy, but some can be found at
https://forum.openwrt.org/viewtopic.php?pid=70060 on pages 4, 5 and 6.
There's a small performance penalty associated with this workaround,
so it is only enabled when needed on the Atheros AR71xx platforms.

Unfortunately, this condition is impossible to detect at runtime
without MIPS specific ifdefs.  Rather than cast an overly-broad net
like Linux/OpenWRT dues (which enables this workaround all the time on
MIPS32 platforms), we put this option in the kernel for just the
affected machines.  Sam didn't like this aspect of the patch when he
reviewed it, and I'd love to hear sane proposals on how to fix it :)

Reviewed by: sam@

14 years agoExtract thread_lock()/ruxagg()/thread_unlock() fragment into utility
Konstantin Belousov [Sat, 1 May 2010 14:46:17 +0000 (14:46 +0000)]
Extract thread_lock()/ruxagg()/thread_unlock() fragment into utility
function ruxagg_tlock().
Convert the definition of kern_getrusage() to ANSI C.

Submitted by: Alexander Krizhanovsky <ak natsys-lab com>
MFC after: 1 week

14 years agoRemove debugging code that was not used once since commit.
Konstantin Belousov [Sat, 1 May 2010 13:15:35 +0000 (13:15 +0000)]
Remove debugging code that was not used once since commit.

Suggested by: bde
MFC after: 1 week

14 years agoImprove usage of tunefs:
Edwin Groothuis [Sat, 1 May 2010 09:05:06 +0000 (09:05 +0000)]
Improve usage of tunefs:

Document -j switch in usage() to reflect recent SUJ work.

Submitted by:   Alastair Hogge
MFC after:      1 week

14 years agosparc64, and possibly other architectures, pads the length of the
Warner Losh [Sat, 1 May 2010 07:25:28 +0000 (07:25 +0000)]
sparc64, and possibly other architectures, pads the length of the
section holding the config file to sh_addralign bytes using NULs.
This bogusly triggers an assert.  Break out of the loop when we hit an
NUL within that many bytes of the end.

MFC after: 3 days