Commit Graph

155000 Commits

Author SHA1 Message Date
Pyun YongHyeon
464aa6d5fb 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 >
2010-05-03 00:56:26 +00:00
Alan Cox
b8d36afcfe Add page lock assertions where we access the page's hold_count. 2010-05-02 23:33:10 +00:00
Matt Jacob
5eb6cd0263 Print IR_RESYNC updates informatively.
Obtained from:	pluknet
MFC after:	1 week
2010-05-02 22:48:27 +00:00
Alan Cox
6c56db5c9e Eliminate an assignment that was made redundant by r207410. 2010-05-02 21:04:59 +00:00
Alan Cox
447fe2a4c6 Defer the acquisition of the page and page queues locks in
vm_pageout_object_deactivate_pages().
2010-05-02 20:46:17 +00:00
Alan Cox
f623e55269 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
2010-05-02 20:24:25 +00:00
Marius Strobl
5a8336816e 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.
2010-05-02 19:38:17 +00:00
Alexander Motin
dd48af360f 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.
2010-05-02 19:28:30 +00:00
Konstantin Belousov
a0b8e597e5 Lock the page around hold_count access.
Reviewed by:	alc
2010-05-02 19:25:22 +00:00
Alan Cox
139a0de7f1 Properly synchronize access to the page's hold_count in vfs_vmio_release().
Reviewed by:	kib
2010-05-02 19:10:27 +00:00
Marius Strobl
f6ffc3c26b Remove redundant checking of sc_leaving (uart_intr() already handles this).
Approved by:	marcel
2010-05-02 19:07:19 +00:00
Marius Strobl
a9ef85b792 Remove a soft member which was never used.
Approved by:	marcel
2010-05-02 19:05:57 +00:00
Alan Cox
ac800a8490 Correct an error in r207410: Remove an unlock of a lock that is no longer
held.
2010-05-02 18:09:33 +00:00
Alan Cox
b88b6c9d80 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.
2010-05-02 17:33:46 +00:00
Alan Cox
f6c8c187d4 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
2010-05-02 16:44:06 +00:00
Alexander Motin
205367f9bc Enable PCI busmastering explicitly to be sure. 2010-05-02 14:46:05 +00:00
Marius Strobl
7e9aef235a Add a hack for SPARC64 V CPUs, which set some undocumented bits in the
first data word.
2010-05-02 12:08:15 +00:00
Alexander Motin
da6808c111 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.
2010-05-02 12:07:47 +00:00
Alexander Motin
f930c0db49 Add -d and -f arguments to camcontrol cmd, to execute DMA ATA commands. 2010-05-02 11:36:27 +00:00
Alexander Motin
8caae13f68 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
2010-05-02 04:16:39 +00:00
Alan Cox
9b55fc0429 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
2010-05-02 01:25:03 +00:00
Jilles Tjoelker
8f3bd46654 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
2010-05-01 22:10:45 +00:00
Ryan Stone
04001891bb 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
2010-05-01 22:04:58 +00:00
Jilles Tjoelker
da21952559 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
2010-05-01 22:00:28 +00:00
Ryan Stone
aa1b887b41 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
2010-05-01 21:59:06 +00:00
Martin Matuska
df04ddbaa6 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
2010-05-01 20:44:37 +00:00
Martin Matuska
9ccdc9600e Change description of tunable group vfs.zfs.txg to be more
understandable.

Approved by:	pjd, delphij (mentor)
MFC after:	3 days
2010-05-01 19:53:15 +00:00
Ed Maste
b97e003f42 Search beyond the first 1/8th of inodes.
Submitted by:	jeff
2010-05-01 18:56:45 +00:00
Marko Zec
a83baab6e4 Remove a redundant variable assignment.
Reviewed by:	bz, rwatson
MFC after:	3 days
2010-05-01 18:34:50 +00:00
Warner Losh
a932985f50 Enable AH_RXCFG_SDMAMW_4BYTES option. See NOTES file for why this is
workaround (WAR) is needed.
2010-05-01 16:39:46 +00:00
Warner Losh
7e005410db Put the -current debugging options back into AR71XX. 2010-05-01 16:38:40 +00:00
Warner Losh
bc391cb2ce 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@
2010-05-01 16:36:14 +00:00
Konstantin Belousov
3087dc40a9 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
2010-05-01 14:46:17 +00:00
Konstantin Belousov
6a5baa54fd Remove debugging code that was not used once since commit.
Suggested by:	bde
MFC after:	1 week
2010-05-01 13:15:35 +00:00
Edwin Groothuis
727c128897 Improve usage of tunefs:
Document -j switch in usage() to reflect recent SUJ work.

Submitted by:   Alastair Hogge
MFC after:      1 week
2010-05-01 09:05:06 +00:00
Warner Losh
02b9c3f52f 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
2010-05-01 07:25:28 +00:00
Kip Macy
0ce3ba8cd5 Update locking comment above vm_page:
- re-assign page queue lock "Q"
       - assign page lock "P"
       - update several uncommented fields
       - observe that hold_count is now protected by the page lock "P"
2010-05-01 03:41:21 +00:00
Jung-uk Kim
483191871b Reduce MD code further. At least, it compiles on ia64 now (but it is not
connected to build).  The idea/code was shamelessly taken from r207329.
2010-05-01 01:05:07 +00:00
Jung-uk Kim
2083bca542 Do not initialize mutex and return error if it cannot map memory. 2010-05-01 00:36:40 +00:00
Ed Schouten
e1e9ba3370 Remove WNOHANG flag from wait3().
Because script(1) now reliably terminates when the TTY is closed, it may
be the case that the call to wait3() occurs just before the child
process exits. This causes error codes to be ignored.

Just change script(1) to use waitpid() instead of wait3(). This makes it
more portable and prevents the need for a loop, since waitpid() only
returns a specified process.

PR:		bin/146189
Tested by:	amdmi3@, older version
MFC after:	2 weeks
2010-04-30 22:33:49 +00:00
Kip Macy
7bec141b12 push up dropping of the page queue lock to avoid holding it in vm_pageout_flush 2010-04-30 22:31:37 +00:00
Kip Macy
ad0c05daf9 don't call vm_pageout_flush with the page queue mutex held
Reported by: Michael Butler
2010-04-30 21:21:21 +00:00
Kip Macy
6dd8b893d6 - acquire the page lock in vm_contig_launder_page before checking page fields
- release page queue lock before calling vm_pageout_flush
2010-04-30 21:20:14 +00:00
Jilles Tjoelker
524461f158 telnet: Fix infinite loop if local output generates SIGPIPE.
Instead of catching SIGPIPE and jumping out of the signal handler with
longjmp, ignore it and handle write errors to the local output by exiting
from there. I have changed the error message to mention the local output
instead of NetBSD's wrong "Connection closed by foreign host". Write errors
to the network were already handled by exiting immediately and this now
applies to EPIPE too.

The code assumed that SIGPIPE could only be generated by the network
connection; if it was generated by the local output, it would longjmp out of
the signal handler and write an error message which caused another SIGPIPE.

PR:		19773
Obtained from:	NetBSD
MFC after:	1 week
2010-04-30 19:52:35 +00:00
Kip Macy
e8f263195d - don't check hold_count without the page lock held
- don't leak the page lock if m->object is NULL
  (assuming that that check will in fact even be valid when m->object is protected by the page lock)
2010-04-30 19:40:37 +00:00
Pyun YongHyeon
a26a72d90b Marvell 88E8059(Yukon Optima) is now supported. 2010-04-30 19:05:01 +00:00
Pyun YongHyeon
b9ddb8695d Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima.
Tested by:	James LaLagna < jameslalagna <> gmail dot com >
MFC after:	5 days
2010-04-30 19:01:55 +00:00
Pyun YongHyeon
e19bd6ee55 Add basic support for Marvell 88E8059 Yukon Optima.
Tested by:	James LaLagna < jameslalagna <> gmail dot com >
MFC after:	5 days
2010-04-30 18:58:55 +00:00
Pyun YongHyeon
7c8db6fd16 Disable non-ASF packet flushing on Yukon Extreme as vendor's driver
does. Without this change, Yukon Extreme seems to generate lots of
RX FIFO overruns even though controller has available RX buffers.
These excessive RX FIFO overruns generated lots of pause frames
which in turn killed devices plugged into switch. It seems there is
still occasional RX frame corruption on Yukon Extreme but this
change seems to fix the pause frame storm.

Reported by:	jhb
Tested by:	jhb
MFC after:	5 days
2010-04-30 18:04:46 +00:00
Randall Stewart
ad30c76f94 Bug in the memory mapping module. The wrong
physaddr was being used in the macro (1 should be
used not 2)...

Obtained from:	JC
2010-04-30 17:12:20 +00:00