Commit Graph

79264 Commits

Author SHA1 Message Date
Bernhard Schmidt
d8ac0e6633 Rewrite parts of the calibration code which is run while bringing up
the device:
- unobscure some of the code by moving it into its own functions
- get rid of some magic numbers
- create similar structure as the reference driver has, this should
  make further syncs easier
2010-09-19 12:47:41 +00:00
Bernhard Schmidt
0fc7c4008f Group functions used for initial calibration. 2010-09-19 12:39:04 +00:00
Tijl Coosemans
87694be1a6 Indicate that POSIX semaphores are always supported.
Reported by:	avilla
Reviewed by:	davidxu
Approved by:	kib (mentor)
2010-09-19 12:01:50 +00:00
Michael Tuexen
231b700b17 Allow the initial congestion window to be configure
to one MTU. Improve the description.

MFC after: 2 weeks.
2010-09-19 11:57:21 +00:00
Michael Tuexen
f8faf20cf6 Fix a locking issue which shows up when the code is used
on Mac OS X.

MFC after: 2 weeks.
2010-09-19 11:42:16 +00:00
Brian Somers
0f81f3046d Support attaching version 4 metadata
Reviewed by:	pjd
2010-09-19 10:45:53 +00:00
Juli Mallett
77c2091086 Add preliminary support for the Lanner MR-955. It boots multi-user but there
seem to be problems both with the on-board Ethernet interfaces and the em(4)
interfaces on PCI under FreeBSD.

Thanks to Lanner for providing access to hardware.
2010-09-19 09:19:38 +00:00
Juli Mallett
c0b690401a Fix to specify generic bus_add_child. 2010-09-19 09:18:27 +00:00
Juli Mallett
ed48d90907 Don't use memory that can't be direct-mapped on !n64. 2010-09-19 09:18:07 +00:00
Rick Macklem
a212c01aac Fix nfsrv_freeallnfslocks() in the experimental NFSv4 server so that
it frees local locks correctly upon close. In order for
nfsrv_localunlock() to work correctly, the lock can no longer be in
the lockowner's stateid list. As such, nfsrv_freenfslock() has to
be called before nfsrv_localunlock(), to get rid of the lock structure
on the lockowner's stateid list. This only affected operation when
local locks (vfs.newnfs.enable_locallocks=1) are enabled, which is
not the default at this time.

MFC after:	1 week
2010-09-19 01:18:03 +00:00
Rick Macklem
c7aafc24c4 Fix the experimental NFSv4 server so that it performs local VOP_ADVLOCK()
unlock operations correctly. It was passing in F_SETLK instead of
F_UNLCK as the operation for the unlock case. This only affected
operation when local locking (vfs.newnfs.enable_locallocks=1) was enabled.

MFC after:	1 week
2010-09-19 01:05:19 +00:00
Nick Hibma
15dba72121 Cleanup white space and typos. 2010-09-18 22:37:47 +00:00
Jaakko Heinonen
8570d045e5 - For consistency, remove "." and ".." entries from de_dlist before
calling devfs_delete() (and thus possibly dropping dm_lock) in
  devfs_rmdir_empty().
- Assert that we don't return doomed entries from devfs_find(). [1]

Suggested by:	kib [1]
Reviewed by:	kib
2010-09-18 18:37:41 +00:00
Alexander Motin
cfa892b592 Add basic cpu_sleep() support for Marvell SoCs. This drops my SheevaPlug's
heatsink termperature in open air from 49C to 43C when idle.
2010-09-18 16:57:05 +00:00
Konstantin Belousov
0b367bd8c0 Adopt the deferring of object deallocation for the deleted map entries
on map unlock to the lock downgrade and later read unlock operation.

System map entries cannot be backed by OBJT_VNODE objects, no need to
defer deallocation for them. Map entries from user maps do not require
the owner map for deallocation, and can be accumulated in the
thread-local list for freeing when a user map is unlocked.

Move the collection of entries for deferred reclamation into
vm_map_delete(). Create helper vm_map_process_deferred(), that is
called from locations where processing is feasible. Do not process
deferred entries in vm_map_unlock_and_wait() since map_sleep_mtx is
held.

Reviewed by:	alc, rstone (previous versions)
Tested by:	pho
MFC after:	2 weeks
2010-09-18 15:03:31 +00:00
Alexander Motin
afc1cdb92d Clear timer interrupt status before calling callback, not after it,
This fixes timer interrupt losses, fatal in one-shot mode.
2010-09-18 13:44:39 +00:00
Robert Watson
adb6aa9ab9 With reworking of the socket life cycle in 7.x, the need for a "sotryfree()"
was eliminated: all references to sockets are explicitly managed by sorele()
and the protocols.  As such, garbage collect sotryfree(), and update
sofree() comments to make the new world order more clear.

MFC after:	3 days
Reported by:	Anuranjan Shukla <anshukla at juniper dot net>
2010-09-18 11:18:42 +00:00
Andriy Gapon
19b8a6dbc1 kern.sched.topology_spec sysctl: use step of 1 for group levels numeration
This is just a cosmetic change for prettier output.
'indent' variable/parameter serves two purposes: it specifies whitespace
indentation level and also implies cpu group level/depth.
It would have been better to split those two uses,
but for now just a simple change.

MFC after:	1 week
2010-09-18 11:16:43 +00:00
Alexander Motin
d3979248ac Restore pre-r212778 optimization, skipping timer reprogramming when it is
not neccessary. It allows to avoid time counter jump of up to 1/18s, when
base frequency slightly tuned via machdep.i8254_freq sysctl.
Fix few style things.

Suggested by:	bde
2010-09-18 07:36:43 +00:00
Alexander Motin
8e860de4bf When global timer used at SMP system, update nextevent field on BSP before
sending IPI to other CPUs. Otherwise, other CPUs will try to honor stale
value, programming timer for zero interval. If timer is fast enough,
it caused extra interrupt before timer correctly reprogrammed by BSP.
2010-09-18 07:18:30 +00:00
Juli Mallett
e61d3369bf Fix octusb build. 2010-09-18 00:58:44 +00:00
Jung-uk Kim
a90b8833d2 Rework r210248. Although it fixed most of problems, it did not fix one
particular edge case where X-axis resolution is not multiple of font width.
Now we just advance enough scan lines, then deduct a partial scan line.
It is more intuitive than the previous code.  Apply the same wisdom to EGA
and VGA planar renderers for consistency.

Reported by:	David DEMELIER (demelier dot david at gmail dot com)
2010-09-17 23:09:31 +00:00
Pawel Jakub Dawidek
1d09a9b999 Before VirtualBox is fixed, mark with #ifdef what has to be done to make
it possible to boot from ZFS RAIDZ for example from within VirtualBox.
The problem with VirtualBox is that its BIOS reports only one disk present.
If we choose to ignore this report, we can find all the disks available.
We can't have this work-around to be turned on by default, because some broken
BIOSes report true when it comes to number of disks, but present the same disk
multiple times.
2010-09-17 22:59:15 +00:00
Pawel Jakub Dawidek
701c50988f Remove magic value. 2010-09-17 22:51:45 +00:00
Andre Oppermann
ed42031102 Rearrange the TSO code to make it more readable and to clearly
separate the decision logic, of whether we can do TSO, and the
calculation of the burst length into two distinct parts.

Change the way the TSO burst length calculation is done. While
TSO could do bursts of 65535 bytes that can't be represented in
ip_len together with the IP and TCP header. Account for that and
use IP_MAXPACKET instead of TCP_MAXWIN as base constant (both
have the same value of 64K). When more data is available prevent
less than MSS sized segments from being sent during the current
TSO burst.

Add two more KASSERTs to ensure the integrity of the packets.

Tested by:	Ben Wilber <ben-at-desync com>
MFC after:	10 days
2010-09-17 22:05:27 +00:00
Kenneth D. Merry
0b883cf6b4 Fix a couple of mps problems.
When the driver is completely saturated with commands (1024 in the
case of the SAS2008 in my test system), I/O stops.  If we tell CAM
that we have one less command slot than we have actually allocated,
everything works fine.  We also need a few extra command slots to
allow for aborts and other task management commands to be sent down.

This needs more investigation to determine the root cause, but for
now this fixes things in my testing.

mps.c:		Change a printf() to mps_printf().

mps_sas.c:	Subtract 5 command slots when we tell CAM how many
		commands we can handle.

		Add some commented-out logic to print the contents
		the CDBs for timed-out commands.  This can help
		in debugging devices that are timing out.  This
		will be uncommented once I bring some CAM changes in.

Reported by:	Andrew Boyer <aboyer at averesystems dot com>
2010-09-17 21:53:56 +00:00
Michael Tuexen
99ddc825f3 Fix a bug where the wrong PR-SCTP policy was considered.
While there, use always the same code for the check of
TTL expiration.

MFC after: 2 weeks.
2010-09-17 19:20:39 +00:00
Michael Tuexen
dcfc062535 Make the initial congestion window configurable via sysctl.
MFC after: 2 weeks.
2010-09-17 18:53:07 +00:00
Michael Tuexen
25a2a18706 * Implement initial version of send buffer splitting.
* Make send/recv buffer splitting switchable via sysctl.
* While there: Fix some comments.
2010-09-17 16:20:29 +00:00
Warner Losh
5ff4999243 By popular demand, kill all the non GIANT related interrupt messages.
They are confusing and add little value.

Reviewed by:	jhb@
2010-09-17 16:05:25 +00:00
Jayachandran C.
c42040571e Fixes for XLR network accelerator driver (nlge).
- Process some tx done messages in the transmit path, to ensure that
  the XLR NA tx done FIFO does not overflow.
- Add a message ring handler API to process atmost a given number of
  messages from a specified bucket mask. This will be used to process
  the tx done messages
- Add a callout to restart transmit in the case transmit gets blocked.
- Update enable_msgring_int() and disable_msgring_int(), remove unused
  args and make static.

Obtained from:	Sriram Gorti (srgorti at netlogicmicro dot com)
2010-09-17 10:28:10 +00:00
David E. O'Brien
59b3a4ebb5 Correct some non-code typos. 2010-09-17 09:14:40 +00:00
Andriy Gapon
0b750af1b1 amd64: reduce VM_KMEM_SIZE_SCALE to 1 allowing kernel to use more memory
KVA space is abundant on amd64, so there is no reason to limit kernel
map size to a fraction of available physical memory.  In fact, it could
be larger than physical memory.

This should help with memory auto-tuning for ZFS and shouldn't affect
other workloads.
This should reduce number of circumstances for "kmem_map too small"
panics, but probably won't eliminate them entirely due to potential kmem
fragmentation.

In fact, you might want/need to limit maximum ARC size after this commit
if you need to resrve more memory for applications.

This change was discussed on arch@ and nobody said "don't do it".

MFC after:	6 weeks
2010-09-17 07:36:32 +00:00
Andriy Gapon
9d5eb9aa5d zfs arc_reclaim_needed: fix typo in mismerge in r212780
PR:		kern/146410, kern/138790
MFC after:	3 weeks
X-MFC with:	r212780
2010-09-17 07:34:50 +00:00
Andriy Gapon
921d3fd122 zfs+sendfile: advance uio_offset upon reading as well
Picked from analogous code in tmpfs.

MFC after:	1 week
2010-09-17 07:20:20 +00:00
Andriy Gapon
44532bc5cd zfs arc_reclaim_needed: remove redundant checks for arc_c_max and arc_c_max
Those checks are not present in upstream code and they are enforced in
actual calculations of delta by which ARC size can be grown or should be
reduced.

MFC after:	3 weeks
2010-09-17 07:17:38 +00:00
Andriy Gapon
7c1353491f zfs arc_reclaim_needed: more reasonable threshold for available pages
vm_paging_target() is not a trigger of any kind for pageademon, but
rather a "soft" target for it when it's already triggered.
Thus, trying to keep 2048 pages above that level at the expense of ARC
was simply driving ARC size into the ground even with normal memory
loads.
Instead, use a threshold at which a pagedaemon scan is triggered, so
that ARC reclaiming helps with pagedaemon's task, but the latter still
recycles active and inactive pages.

PR:		kern/146410, kern/138790
MFC after:	3 weeks
2010-09-17 07:14:07 +00:00
Alexander Motin
9500655e5a Add one-shot mode support to attimer (i8254) event timer.
Unluckily, using one-shot mode is impossible, when same hardware used for
time counting. Introduce new tunable hint.attimer.0.timecounter, setting
which to 0 disables i8254 time counter and allows one-shot mode. Note,
that on some systems there may be no other reliable enough time counters,
so this tunable should be used with understanding.
2010-09-17 04:48:50 +00:00
Neel Natu
2f78c3e5a0 Get rid of the unnecessary redirection of 'is_cacheable_mem()' to
'is_physical_memory()' through a macro.

Implement 'is_cacheable_mem()' directly instead.
2010-09-17 02:20:12 +00:00
Neel Natu
db1a9b7dfb Get rid of unused macros. 2010-09-17 02:14:21 +00:00
Andrew Thompson
08e58cc093 Make a note of which platforms the mac strings come from.
Suggested by:	adrian
2010-09-17 01:13:48 +00:00
Andrew Thompson
3441a301f2 Use getenv to find the mac address since it could be in the bootloader
environment or command line and under different names.
2010-09-17 01:09:12 +00:00
Ed Maste
dbb34a64a0 Use device_printf where possible, and otherwise at least include the
driver name in printf strings.

Reported by:	Mark Johnston
2010-09-16 23:33:24 +00:00
Kenneth D. Merry
63feedfd46 MFp4 (//depot/projects/mps/...):
According to the MPT2 spec, task management commands are
serialized, and so no I/O should start while task management
commands are active.

So, to comply with that, freeze the SIM queue before we send any
task management commands (abort, target reset, etc.) down to the
IOC.  We unfreeze the queue once the task management command
completes.

It isn't clear from the spec whether multiple simultaneous task
management commands are supported.  Right now it is possible to
have multiple outstanding task management commands, especially in
the abort case.  Multiple outstanding aborts do complete
successfully, so it may be supported.

We also don't yet have any recovery mechanism (e.g. reset the IOC)
if the task management command fails.
2010-09-16 22:54:56 +00:00
Andre Oppermann
1c18314d17 Remove the TCP inflight bandwidth limiter as announced in r211315
to give way for the pluggable congestion control framework.  It is
the task of the congestion control algorithm to set the congestion
window and amount of inflight data without external interference.

In 'struct tcpcb' the variables previously used by the inflight
limiter are renamed to spares to keep the ABI intact and to have
some more space for future extensions.

In 'struct tcp_info' the variable 'tcpi_snd_bwnd' is not removed to
preserve the ABI.  It is always set to 0.

In siftr.c in 'struct pkt_node' the variable 'snd_bwnd' is not removed
to preserve the ABI.  It is always set to 0.

These unused variable in the various structures may be reused in the
future or garbage collected before the next release or at some other
point when an ABI change happens anyway for other reasons.

No MFC is planned.  The inflight bandwidth limiter stays disabled by
default in the other branches but remains available.
2010-09-16 21:06:45 +00:00
Xin LI
9ed03f0231 status bits should be &'ed against status to be really functional.
Reported by:	Jike Song
Reviewed by:	yongari
MFC after:	1 week
2010-09-16 21:06:23 +00:00
Jayachandran C.
bb15db8f16 RMI security accelerator driver update.
- Compile fixes for 9.0, the previous version of this driver was
  for FreeBSD 6.
- Add virtual address field in OperationDescriptor_t, we cannot use
  MIPS_PHYS_TO_KSEG0 on physical address.
- Fixes for new message ring API
- Remove unused sys/mips/rmi/dev/sec/stats.h
- Whitespace fixes
2010-09-16 20:23:22 +00:00
Jung-uk Kim
01b36cb089 Remove an unnecessary hack from ACPICA 20100915 (r212761). 2010-09-16 20:11:40 +00:00
Jung-uk Kim
42fecd1294 Merge ACPICA 20100915. 2010-09-16 20:08:00 +00:00
Jayachandran C.
f718138698 Update rge.h for r212758 - stats incremented using xlr_ldaddwu should be
unsigned int.
2010-09-16 19:25:24 +00:00