Commit Graph

179652 Commits

Author SHA1 Message Date
Adrian Chadd
d50e882ab9 Log some more information when the RX buffer allocation failed. 2013-03-18 01:11:52 +00:00
Attilio Rao
774d251d99 Sync back vmcontention branch into HEAD:
Replace the per-object resident and cached pages splay tree with a
path-compressed multi-digit radix trie.
Along with this, switch also the x86-specific handling of idle page
tables to using the radix trie.

This change is supposed to do the following:
- Allowing the acquisition of read locking for lookup operations of the
  resident/cached pages collections as the per-vm_page_t splay iterators
  are now removed.
- Increase the scalability of the operations on the page collections.

The radix trie does rely on the consumers locking to ensure atomicity of
its operations.  In order to avoid deadlocks the bisection nodes are
pre-allocated in the UMA zone.  This can be done safely because the
algorithm needs at maximum one new node per insert which means the
maximum number of the desired nodes is the number of available physical
frames themselves.  However, not all the times a new bisection node is
really needed.

The radix trie implements path-compression because UFS indirect blocks
can lead to several objects with a very sparse trie, increasing the number
of levels to usually scan.  It also helps in the nodes pre-fetching by
introducing the single node per-insert property.

This code is not generalized (yet) because of the possible loss of
performance by having much of the sizes in play configurable.
However, efforts to make this code more general and then reusable in
further different consumers might be really done.

The only KPI change is the removal of the function vm_page_splay() which
is now reaped.
The only KBI change, instead, is the removal of the left/right iterators
from struct vm_page, which are now reaped.

Further technical notes broken into mealpieces can be retrieved from the
svn branch:
http://svn.freebsd.org/base/user/attilio/vmcontention/

Sponsored by:	EMC / Isilon storage division
In collaboration with:	alc, jeff
Tested by:	flo, pho, jhb, davide
Tested by:	ian (arm)
Tested by:	andreast (powerpc)
2013-03-18 00:25:02 +00:00
Jilles Tjoelker
ddd956b0b7 find: Include nanoseconds when comparing timestamps of files.
When comparing to the timestamp of a given file using -newer, -Xnewer and
-newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the
comparison.

The primaries that compare a timestamp of a file to a given value (-Xmin,
-Xtime, -newerXt) continue to compare times in whole seconds.

Note that the default value 0 of vfs.timestamp_precision almost always
causes the nanoseconds part to be 0. However, touch -d can set a timestamp
to the microsecond regardless of that sysctl.

MFC after:	1 week
2013-03-17 22:51:58 +00:00
Ian Lepore
b479b38c0a Eliminate an intermediate buffer and some memcpy() operations, and do
DMA directly to/from the buffers passed in from higher layer drivers.

Reviewed by:	gonzo
2013-03-17 16:31:09 +00:00
Martin Matuska
6cf922c88b Fix typo in sysctl description
Reported by:	Jeremy Chadwick
MFC after:	3 days
2013-03-17 15:53:27 +00:00
Konstantin Belousov
0d3bb4afa8 Remove negative name cache entry pointing to the target name, which
could be instantiated while tdvp was unlocked.

Reported by:	Rick Miller <vmiller at hostileadmin com>
Tested by:	pho
MFC after:	1 week
2013-03-17 15:11:37 +00:00
Gleb Smirnoff
4f67e14304 In m_align() add assertions that mbuf is virgin, similar to assertions
in M_ALIGN(), MH_ALIGN, MEXT_ALIGN() macros.
2013-03-17 07:41:14 +00:00
Gleb Smirnoff
23909ac90d Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for
mbufs with external buffer.
2013-03-17 07:39:45 +00:00
Gleb Smirnoff
7525c48111 In m_megapullup() instead of reserving some space at the end of packet,
m_align() it, reserving space to prepend data.

Reviewed by:	mav
2013-03-17 07:37:10 +00:00
Rui Paulo
dd85724bc9 Fix a typo in a comment. 2013-03-17 07:28:17 +00:00
Joel Dahl
9ca6ee33d0 Remove EOL whitespace accidentally introduced in r248393. 2013-03-17 06:57:25 +00:00
Joel Dahl
c65b9b0bd9 Move example to EXAMPLES. 2013-03-17 06:54:04 +00:00
Joel Dahl
d04158c3c6 Move example to EXAMPLES. 2013-03-17 06:36:04 +00:00
Andrew Turner
de5b074bf5 In the uart module build ofw_bus_if.h on arm along with sparc64 as LINT
fails when built locally without it.
2013-03-17 06:33:49 +00:00
Ian Lepore
33ff10ea55 Add a macro that gets the physical address of a memory mapped device
register from a bus space resource.

Note that this macro is just for ARM, and is intended to have a short
lifespan.  The DMA engines in some SoCs need the physical address of a
memory-mapped device register as one of the arguments for the transfer.
Several scattered ad-hoc solutions have been converted to use this macro,
which now also serves to mark the places where a more complete fix needs
to be applied (after that fix has been designed).
2013-03-17 03:04:43 +00:00
Andrew Turner
b3a9841934 Link libgcc_s against compiler-rt on ARM EABI. This allows us to use all of
the symbols in compiler-rt, including the ones not available in the old
libgcc. This fixes the build with clang which generates calls to funstions
that are missing from libgcc_s.
2013-03-17 01:03:41 +00:00
Andrew Turner
b1d3e6da67 The -mno-apcs-frame argument is unavaliable on clang, also ignore it there. 2013-03-17 00:56:17 +00:00
Pawel Jakub Dawidek
943c3bb968 Require CAP_SEEK if both O_APPEND and O_TRUNC flags are absent.
In other words we don't require CAP_SEEK if either O_APPEND or O_TRUNC flag is
given, because O_APPEND doesn't allow to overwrite existing data and O_TRUNC
requires CAP_FTRUNCATE already.

Sponsored by:	The FreeBSD Foundation
2013-03-16 23:19:13 +00:00
Pawel Jakub Dawidek
b48fdae147 Update the tests now that absence of the O_APPEND flag requires CAP_SEEK
capability. Add some more tests.

Sponsored by:	The FreeBSD Foundation
2013-03-16 23:13:49 +00:00
Andrew Turner
69d758b4b8 Add __aeabi_memset to libkern, implemented using memset, as clang may
generate calls to it.
2013-03-16 23:11:55 +00:00
Pawel Jakub Dawidek
ac978022d3 The mode argument for open(2)/openat(2) only makes sense if the O_CREAT flag
was given.

Sponsored by:	The FreeBSD Foundation
2013-03-16 23:10:40 +00:00
Joel Dahl
b16958a100 Add a couple of examples.
Obtained from:	OpenBSD
2013-03-16 22:53:38 +00:00
Neel Natu
3f23d3ca9f Fix the '-Wtautological-compare' warning emitted by clang for comparing the
unsigned enum type with a negative value.

Obtained from:	NetApp
2013-03-16 22:53:05 +00:00
Pawel Jakub Dawidek
136cbf84ef Add a note to the HISTORY section about lchflags(2) being introduced in
FreeBSD 5.0.
2013-03-16 22:44:14 +00:00
Neel Natu
61592433eb Allow vmm stats to be specific to the underlying hardware assist technology.
This can be done by using the new macros VMM_STAT_INTEL() and VMM_STAT_AMD().
Statistic counters that are common across the two are defined using VMM_STAT().

Suggested by:	Anish Gupta
Discussed with:	grehan
Obtained from:	NetApp
2013-03-16 22:40:20 +00:00
Sergey Kandaurov
99f23359a5 Fix version in the .Fx macro.
Reported by:	<deeptech71@gmail.com>
2013-03-16 22:37:56 +00:00
Pawel Jakub Dawidek
d6b2bd0bc9 Style: Whitespace fixes. 2013-03-16 22:37:30 +00:00
Pawel Jakub Dawidek
1ea67dd9e5 Style: Remove redundant space. 2013-03-16 22:36:24 +00:00
Joel Dahl
d1cd5e7cf3 Cross-reference gvinum(8) instead of vinum(8). 2013-03-16 22:02:47 +00:00
Joel Dahl
b63e03632c Remove reference to vinum(4). The manual page was removed in r248370. 2013-03-16 21:50:06 +00:00
Joel Dahl
0ac77cbf8f Hide version string under verbose.
Approved by:	mav
2013-03-16 17:57:00 +00:00
Gleb Smirnoff
aa8bd99d99 - Replace compat macros with function calls. 2013-03-16 08:58:28 +00:00
Gleb Smirnoff
c95be8b536 - Replace compat macros with function calls.
- Remove superfluous cleaning of m_len after allocating.

Sponsored by:	Nginx, Inc.
2013-03-16 08:57:36 +00:00
Gleb Smirnoff
5368b81eb0 Contrary to what the deleted comment said, the m_move_pkthdr()
will not smash the M_EXT and data pointer, so it is safe to
pass an mbuf with external storage procuded by m_getcl() to
m_move_pkthdr().

Reviewed by:	andre
Sponsored by:	Nginx, Inc.
2013-03-16 08:55:21 +00:00
Gleb Smirnoff
80daa4713c Belatedly remove the vinum(4) manual page. The vinum
manager is absent in FreeBSD since 6.0-RELEASE.

Reviewed by:	joel
2013-03-16 08:51:47 +00:00
Neel Natu
1e7d750c75 Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index
wraparound is handled correctly.

The gory details are available here:
http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html

This fixes a regression introduced in r247871.

Pointed out by:	Bruce Evans, Chris Torek
2013-03-16 05:40:29 +00:00
Andrew Turner
a2dee2ad37 Add END to ARM libkern assembly functions 2013-03-16 04:08:01 +00:00
Andrew Turner
5cc8d54ca0 Move the __aeabi_unwind_cpp_pr{0,1,2} functions to libkern so they can be
referenced in a non-debug kernel.
2013-03-16 04:06:49 +00:00
Andrew Turner
2ecc0d987b The compiler argument -mno-apcs-frame has no meaning when using EABI as we
will use aapcs frames, not apcs frames.
2013-03-16 03:57:46 +00:00
Andrew Turner
f8cd79f38b Implement the required but unused __aeabi_unwind_cpp_* functions in the
trampoline kernel.
2013-03-16 03:50:27 +00:00
Andrew Turner
a2e01abec7 Fix the indentation for a few commands that were missed or incorrectly
indented in r248362.
2013-03-16 03:21:25 +00:00
Andrew Turner
462018c56b Adjust the indentation of the trampoline compilation to make the commands
easier to follow.
2013-03-16 03:15:24 +00:00
Andrew Turner
573447b6a5 Add an END macro to ARM. This is mostly used to tell gas where the bounds
of the functions are when creating the EABI unwind tables.
2013-03-16 02:48:49 +00:00
Pawel Jakub Dawidek
c9cea47007 Sort syscalls properly. 2013-03-15 23:00:13 +00:00
Jilles Tjoelker
d70ad6f2d0 sh: Recognize "--" and explicitly reject options in wait builtin.
If syntactically invalid job identifiers are to be taken as jobs that exited
with status 127, this should not apply to options, so that we can add
options later if need be.
2013-03-15 20:29:31 +00:00
Adrian Chadd
cd4f1ba89f Why'd I keep this here? remove it entirely now. 2013-03-15 20:22:20 +00:00
Joel Dahl
e9e3a1ab1f Add a few examples.
Obtained from:	OpenBSD
2013-03-15 20:12:54 +00:00
Adrian Chadd
302868d914 Fix two bugs:
* when pulling frames off of the TID queue, the ATH_TID_REMOVE()
  macro decrements the axq_depth field.  So don't do it twice.

* in ath_tx_comp_cleanup_aggr(), bf wasn't being reset to bf_first
  before walking the buffer list to complete buffers; so those buffers
  will leak.
2013-03-15 20:00:08 +00:00
Ryan Stone
8de2c77bb3 Add support for Exar XR17V358 8-port serial device to puc(4)
Reviewed by:	marius
Sponsored by:	Sandvine Inc.
MFC after:	1 week
2013-03-15 19:58:44 +00:00
Konstantin Belousov
aed5a114d7 Separate the copyright lines and the informational block by a blank line.
Requested by:	joel
MFC after:	2 weeks
2013-03-15 14:01:37 +00:00