Commit Graph

162343 Commits

Author SHA1 Message Date
Artem Belevich
7a3f3cabb1 Stripped '32' suffix from linux systrace module name on i386.
Approved by: avg
2011-04-08 06:27:43 +00:00
Jung-uk Kim
3453537fa5 Use atomic load & store for TSC frequency. It may be overkill for amd64 but
safer for i386 because it can be easily over 4 GHz now.  More worse, it can
be easily changed by user with 'machdep.tsc_freq' tunable (directly) or
cpufreq(4) (indirectly).  Note it is intentionally not used in performance
critical paths to avoid performance regression (but we should, in theory).
Alternatively, we may add "virtual TSC" with lower frequency if maximum
frequency overflows 32 bits (and ignore possible incoherency as we do now).
2011-04-07 23:28:28 +00:00
Glen Barber
cb379161b1 u3g.4:
- remove self-reference in SEE ALSO section (originally was to s/XR/Xr)

cxgbe.4:
- remove blank line
- add closing .El

Reported by:	manlint
MFC after:	3 days
2011-04-07 23:14:33 +00:00
John Baldwin
615d2dffa3 pcb_flags is an int, so use testl rather than testq.
Pointy hat to:	jhb
Submitted by:	jkim
MFC after:	1 week
2011-04-07 23:13:22 +00:00
John Baldwin
1438b4ced1 If a system call does not request a full interrupt return, use a fast
path via the sysretq instruction to return from the system call.  This was
removed in 190620 and not quite fully restored in 195486.  This resolves
most of the performance regression in system call microbenchmarks between
7 and 8 on amd64.

Reviewed by:	kib
MFC after:	1 week
2011-04-07 21:32:25 +00:00
Jung-uk Kim
efd393d539 Remove stale checks for RDTSC support. amd64 must have TSC support anyway. 2011-04-07 21:29:34 +00:00
Jack F Vogel
c31aa19c53 Port of the LRO fix from mxge driver to the generic
LRO code. Thanks to Andrew Gallatin for the change.

MFC after:  7 days
2011-04-07 21:20:26 +00:00
David Christensen
3a1594a579 - Fixed a problem when multiqueue mode was enabled which caused the CQ
chain to be corrupted.
- Removed many console print warnings and replaced with driver maintained
  counters.
- Several style(9) fixes.

MFC after:      One week.
2011-04-07 20:15:36 +00:00
Andrew Gallatin
534e6f47c1 Fix a bug in mxge's LRO which can cause dup acks to
get aggregated & hence prevent TCP from entering
fast retransmit.

Pointed out by: jeff
Reviewed by: gnn
MFC after:	7 days
2011-04-07 13:49:44 +00:00
Adrian Chadd
5e7d0e6482 Add some more OS_MARK probes to the RX DMA setup/teardown code path.
I'm trying to debug the RX DMA path and help the ath9k guys with
"RX dma abort stuck" issue that both our drivers have.
2011-04-07 13:14:51 +00:00
Gabor Kovesdan
b66a823be8 - Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
  in case they add further improvements

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 13:03:35 +00:00
Gabor Kovesdan
d841ecb30d - Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 13:01:03 +00:00
Gabor Kovesdan
acac8baf59 - Replace some strcpy()-family functions with memcpy() ones. It has been
discussed earlier that the extra safeness is not required in these
  cases and we can avoid the overhead by using the more general
  memory copy functions.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 12:52:46 +00:00
Marko Zec
fae147aab3 Properly unref ng_hub nodes on shutdown, so that we don't leak them.
MFC after:	3 days
2011-04-07 11:40:10 +00:00
Alexander Motin
530d535d79 Fix spelling. 2011-04-07 08:32:53 +00:00
Alexander Motin
5b917bfc3f Add one more ID for Marvell 88SE912x chip found on Asus U3S6 card.
Submitted by:	Jonas Jonsson <fatbrain@gmail.com>
2011-04-07 08:28:53 +00:00
Alexander Motin
f513d14ca4 Make ada(4) driver to control device write cache, same as ata(4) does.
Add kern.cam.ada.write_cache sysctl/tunable to control it alike hw.ata.wc.
2011-04-07 08:17:53 +00:00
Navdeep Parhar
bd0d62016a Modify read/write ioctls to work with 64 bit registers too.
MFC after:	3 days
2011-04-07 07:10:42 +00:00
Jeff Roberson
59343c7b98 - Don't invalidate jnewblks immediately upon discovering that the block
will be removed.  Permit the journal to proceed so that we don't leave
   a rollback in a cg for a very long time as this can cause terrible perf
   problems in low memory situations.

Tested by:      pho
2011-04-07 03:19:10 +00:00
Jung-uk Kim
d521c6b9c4 Implement atomic_load_acq_64(9) and atomic_store_rel_64(9) for i386. These
functions are implemented with CMPXCHG8B instruction where it is available,
i. e., all Pentium-class and later processors.  Note this instruction is
also used for atomic_store_rel_64() because a simple XCHG-like instruction
for 64-bit memory access does not exist, unfortunately.  If the processor
lacks the instruction, i. e., 80486-class CPUs, two 32-bit load/store are
performed with interrupt temporarily disabled, assuming it does not support
SMP.  Although this assumption may be little naive, it is true in reality.
This implementation is inspired by Linux.
2011-04-06 23:59:59 +00:00
Xin LI
22f2616bd7 Update arcmsr(4) to vendor version 1.20.00.21. This release primarily
improves command timeout handling.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	Ching-Lung Huang <ching2048 areca com tw>
MFC after:	2 months
2011-04-06 20:54:26 +00:00
Ulrich Spörlein
cebea500a0 Regenerate after r220401. It turns out makeman is clever about implied
flags, so remove that part from WITHOUT_CXX again.

This is only partially regenerated, as the entries for FDT and GPIO seem to
have switched their default state, too.
2011-04-06 20:19:07 +00:00
Ulrich Spörlein
b3eb927f6e Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
WITHOUT_CLANG.

Don't build clang bootstrap/build-tools depending on this flag. We also
keep gperf, devd and libstdc++ around to prevent foot-shooting and to
make this a two-way street.
2011-04-06 20:08:23 +00:00
Edward Tomasz Napierala
722581d9e6 Add RACCT_NOFILE accounting.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-04-06 19:13:04 +00:00
Edward Tomasz Napierala
b1fb5f9c8d Style fix.
Submitted by:	jhb@
2011-04-06 19:08:50 +00:00
Edward Tomasz Napierala
3bcf74459f Add accounting for SysV-related resources.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-04-06 18:11:24 +00:00
Roman Divacky
a2e53e9621 Move getc() body before xgetc() so gcc does not emit a warning about function
having no body.

Approved by:    jhb
2011-04-06 17:54:12 +00:00
John Baldwin
e806d352d2 Fix several places to ignore processes that are not yet fully constructed.
MFC after:	1 week
2011-04-06 17:47:22 +00:00
Roman Divacky
ae1f5a71f2 Mark getc() as inline, this has no effect on gcc but helps clang.
Approved by:    jhb
2011-04-06 17:29:40 +00:00
Edward Tomasz Napierala
8caddd81e2 Add ucred pointer to the SysV-related memory structures. This is required
for racct.

Note that after this commit, ipcs(1) needs to be rebuilt.  Otherwise, it will
fail with "ipcs: sysctlbyname: kern.ipc.msqids: Cannot allocate memory".

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-04-06 16:59:54 +00:00
Edward Tomasz Napierala
f497cda257 In vm_daemon(), do not skip processes stopped with SIGSTOP. 2011-04-06 16:27:04 +00:00
Edward Tomasz Napierala
099e7e950f Add RACCT_RSS.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-04-06 16:24:24 +00:00
Andrew Gallatin
3cae73118e Implement mxge_init()
This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
did not bring the interface into a RUNNING state, like it does on
most (all?) other FreeBSD NIC drivers.

Thanks to gnn for mentioning the bug, and yongari for pointing out that
ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

MFC after: 7 days
2011-04-06 15:45:32 +00:00
Glen Barber
66e0e139ee Correct 'list scan' description in the examples. The previous description
was incorrect - 'list scan' does not actually do a scan, but instead lists
the results of the background 'scan' cache.

Submitted by:	Fabian Keil (freebsd-listen of fabiankeil de) (via email)
Discussed with:	bschmidt
MFC after:	3 days
2011-04-06 11:20:54 +00:00
David Christensen
07a558f997 - Removed multiple console error messages and replaced with statistic
counters to reduce spew.
- Fixed a TSO problem when an mbuf contains both header and payload in
  the same cluster.

MFC after:	One week.
2011-04-05 22:13:33 +00:00
Jilles Tjoelker
2973057493 Allow strerror(0) and strerror_r(0, ...).
Of course, strerror_r() may still fail with ERANGE.

Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.

PR:		standards/151316
MFC after:	1 week
2011-04-05 21:56:05 +00:00
Jack F Vogel
cf696f26c9 Important update for the igb driver:
- Add the change made in em to the actual unrefreshed number
    of descriptors is used as a basis in rxeof on the way out
    to determine if more refresh is needed. NOTE: there is a
    difference in the ring setup in igb, this is not accidental,
    it is necessitated by hardware behavior, when you reset the
    newer adapters it will not let you write RDH, it ALWAYS sets
    it to 0. Thus the way em does it is not possible.
  - Change the sysctl handling of flow control, it will now make
    the change dynamically when the variable setting changes rather
    than requiring a reset.
  - Change the eee sysctl naming, validation found the old unintuitive :)
  - Last but not least, some important performance tweaks in the TX
    path, I found that UDP behavior could be drastically hindered or
    improved with just small changes in the start loop. What I have
    here is what testing has shown to be the best overall. Its interesting
    to note that changing the clean threshold to start at a full half of
    the ring, made a BIG difference in performance.  I hope that this
    will prove to be advantageous for most workloads.

MFC in a week.
2011-04-05 21:55:43 +00:00
Kirk McKusick
4c821a3978 Be far more persistent in reclaiming blocks and inodes before giving
up and declaring a filesystem out of space. Especially necessary when
running on a small filesystem. With this improvement, it should be
possible to use soft updates on a small root filesystem.

Kudos to: Peter Holm
Testing by: Peter Holm
MFC: 2 weeks
2011-04-05 21:26:05 +00:00
Edward Tomasz Napierala
1ba5ad4210 Add accounting for most of the memory-related resources.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-04-05 20:23:59 +00:00
Edward Tomasz Napierala
c98fe0a557 Add missing stubs. 2011-04-05 19:50:34 +00:00
Ulrich Spörlein
3c502f4006 Fix buildworld -DMODULES_WITH_WORLD 2011-04-05 19:41:18 +00:00
David E. O'Brien
1e3f14466b * Add the readline(3) API to libedit. The libedit versions of
{readline,history}.h are in /usr/include/edit so as to not conflict with
  the GNU libreadline versions.  To use the libedit readline(3) one should
  add "-I/usr/include/edit" to their Makefile
  (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree).

* Enable its use in the BSD licensed utilities that support readline(3).

* To make it easier to sync libedit development with NetBSD, histedit.h
  is moved into libedit's directory as history shows shown we keep merging
  it into that location.

Obtained from:	NetBSD
Sponsored by:	Juniper Networks
2011-04-05 18:41:01 +00:00
Jung-uk Kim
9abd8cd05b Lower the bar for ACPI-fast on real machines slightly. Empirical evidences
show that there are perfectly working PM timers with occasional "hiccups",
probably because of an SMI.  Now we ignore the maximum if it happens once in
the test loop and the width is small enough.  Also, relax normal width a bit
to count in a boundary case.
2011-04-05 18:40:19 +00:00
Pyun YongHyeon
f5459d4cad Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780.
Unlike other controllers which have more advanced jumbo support,
these controllers have one send ring, one standard receive producer
ring and one receive return ring. In order to receive jumbo frames
on the controllers, driver now will increase Rx buffer size to 9k.
Two Rx modes are supported on these controllers and I chose
standard Rx BDs over extended Rx BDs. The extended Rx BD mode
allows up to 4 segmentations for each Rx BDs such that kernel does
not have to allocate large buffer of contiguous memory for
receiving. The extended Rx BD mode is already used on controllers
that have separate jumbo receive ring. However, using extended Rx
BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256
entries which in turn may reduce the performance.  Also UMA backed
page allocator for jumbo frame returns contiguous memory so using
extended Rx BD has no advantage on FreeBSD unless highly customized
local allocator implemented in driver is used.
To use jumbo buffers in standard receive ring, Rx buffer allocation
handler was changed to allocate MJUM9BYTES sized mbuf.

PR:		kern/155192
Tested by:	Vijay Singh <vijju.singh <> gmail dot com>
Submitted by:	mjacob (initial version)
2011-04-05 17:41:54 +00:00
Adrian Chadd
c5d5272355 Make the alq log path tunable 2011-04-05 16:14:54 +00:00
Adrian Chadd
179d23212e * re-enable marker stuff, I accidentally disabled it during debugging
* correct arg check
2011-04-05 16:12:38 +00:00
Adrian Chadd
0a74f776db Flesh out a simple tool to print the ALQ dump generated by the HAL. 2011-04-05 15:11:09 +00:00
John Baldwin
8b22f43d9d Add the ability to manage the state of write caching when the battery
back-up is missing or dead.  The current state of this field is reported
in 'mfiutil cache <volume>' and can be adjusted via
'mfiutil cache <volume> bad-bbu-write-cache <enable|disable>'.  This
setting should generally be disabled to avoid data loss.

MFC after:	1 week
2011-04-05 14:19:05 +00:00
Attilio Rao
8b927d7b7e Extend the DDB command "watchdog" with the ability to specify a timeout
value.

The timeout is expressed in the form T(N) = (2^N * nanoseconds) and can
be easilly extracted from the watchdog interface as a WD_TO_* macro.
That new functionality is supposed to fix re-entering the kernel from DDB
re-enabling the watchdog again (previously disabled) and also offer the
possibility to break for deadlocked DDB commands.

Please note that retro-compatibility is retained.

Sponsored by:	Sandvine Incorporated
Approved by:	des
MFC after:	10 days
2011-04-05 14:15:58 +00:00
Yoshihiro Takahashi
c3e05ae05d MFi386: revision 220337
Build boot2 with -mregparm=3.
2011-04-05 13:48:53 +00:00