Commit Graph

194553 Commits

Author SHA1 Message Date
mav
75eb8161f4 MFC r258169:
Add ID for Intel Avoton SMBus controller.
2014-01-05 22:53:55 +00:00
mav
2ab2b6ae11 MFC r258168, r258170:
Add some more Intel HDA controller and CODEC IDs.
2014-01-05 22:52:59 +00:00
mav
51a1cf7d15 MFC r258164:
Handle case when ACPI reports HPET device, but does not provide memory
resource for it.  In such case take the address range from the HPET table.

This fixes hpet(4) driver attach on Asrock C2750D4I board.
2014-01-05 22:51:09 +00:00
mav
59357c8a6d MFC r258162:
Add some more IDs for Intel ATA, AHCI and USB controllers.
2014-01-05 22:49:54 +00:00
mav
d0f66a4aef MFC r257932:
Use relaxed (write-only) memory barriers when writing some of queue index
registers (for now on ISP2400+).  We never read those registers back and
AFAIK their semantics does not require any immediate reaction on write.
2014-01-05 22:48:12 +00:00
mav
67d4b65ac1 MFC r257930:
Some more registers access optimizations:
 - Process ATIO queue only if interrupt status tells so;
 - Do not update queue out pointers after each processed command, do it
only once at the end of the loop.
2014-01-05 22:47:12 +00:00
mav
116abbfd1f MFC r257916:
Save one more register read per command by not reading rqstoutrp register
every time.  The purpose of that register is unlikely output queue overflow
detection, so read it only when its last known (and probably stale now)
value signals overflow.
2014-01-05 22:45:46 +00:00
mav
2ef8e6e39b MFC r256893:
Fix memory and references leak due to unfreed path.

Coverity CID:   1109815
2014-01-05 22:43:40 +00:00
mav
97d7cc4f54 MFC r256887:
Fix memory and references leak due to unfreed path.

Coverity CID:   1109817
2014-01-05 22:42:42 +00:00
mav
a5ea679e93 MFC r256826:
Fix several target mode SIMs to not blindly clear ccb_h.flags field of
ATIO CCBs.  Not all CCB flags there belong to them.
2014-01-05 22:40:28 +00:00
mav
eb69a5b0d1 MFC r256705:
Optimize isp(4) to reduce CPU usage, especially in target mode:
 - Remove two excessive and slow register reads from isp_intr().  Instead
of rereading value every time, assume that registers contain what we have
written there.
 - Avoid sequential search through 4096 array elements when looking for
command tag.  Use hash of lists to store active tags separately from free
ones and so greatly speedup the searches.
2014-01-05 22:38:44 +00:00
mav
cebac06b67 MFC r259168:
Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE
(64MB).  Even if we would find one somehow, ZFS kernel code rejects such
devices.  It is funny to look on attempts to read 4 256K vdev labels from
1.44MB floppy, though it is not very practical and quite slow.
2014-01-05 22:14:12 +00:00
mav
0e037d0ee8 MFC r258342:
Reenable vfs.zfs.zio.use_uma for amd64, disabled at r209261.

On machines with seveal CPUs and enough RAM this can easily twice improve
ZFS performance or twice reduce CPU usage.  It was disabled three years
ago due to memory and KVA exhaustion reports, but our VM subsystem got
improved a lot since that time, hopefully enough to make another try.
2014-01-05 22:12:45 +00:00
mav
fe82b61321 MFC r258137:
Introduce allocation cache to store LZ4 compression contexts without kicking
VM subsystem twice for every written record.

Tests on 24-core system show double reduction of CPU time spent on copying
single large well-compressed file.

This patch is not really needed on illumos (while not harm either) since
their memory allocator by default uses caching for all requests up to 128K.
2014-01-05 22:09:18 +00:00
sbruno
1bba01828c MFC r258901:
svn r251516 resized the buf argument a bit too much. Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR:	bin/184405
Submitted by:	jhb
2014-01-05 17:29:53 +00:00
dim
dafd81e458 Revert MFC of r260102 for now, until I can merge the required fix from
head.  This should fix building modules which require -fms-extensions to
compile them with gcc.
2014-01-05 15:39:37 +00:00
glebius
e3ce8ac51c Merge r260188 from head:
Fix regression from r249894. Now we pass "gw" as argument to if_output
  method, thus for multicast case we need it to point at "dst".

PR:		185395
2014-01-05 13:55:33 +00:00
mav
c0b3920273 MFC r258256, r258390:
Fix umastat build on present kernel.
2014-01-04 23:45:55 +00:00
mav
b8172b7691 MFC r258716:
- Add bucket size column to `show uma` DDB command.
 - Add `show umacache` command to show alike stats for cache-only UMA zones.
2014-01-04 23:43:18 +00:00
mav
00fb1dac34 MFC r258693:
Make UMA to not blindly force offpage slab header allocation for large
(> PAGE_SIZE) zones.  If zone is not multiple to PAGE_SIZE, there may
be enough space for the header at the last page, so we may avoid extra
header memory allocation and hash table update/lookup.

ZFS creates bunch of odd-sized UMA zones (5120, 6144, 7168, 10240, 14336).
This change gives good use to at least some of otherwise lost memory there.
2014-01-04 23:42:24 +00:00
mav
91cfd3a7cc MFC r258691:
Don't count bucket allocation failures for UMA zones as their own failures.
There are good reasons for this to happen, such as recursion prevention, etc.
and they are not fatal since buckets are just an optimization mechanism.
Real bucket allocation failures are any way counted by the bucket zones
themselves, and we don't need double accounting there.
2014-01-04 23:40:47 +00:00
mav
3ff6064c46 MFC r258340, r258497:
Implement mechanism to safely but slowly purge UMA per-CPU caches.

This is a last resort for very low memory condition in case other measures
to free memory were ineffective.  Sequentially cycle through all CPUs and
extract per-CPU cache buckets into zone cache from where they can be freed.
2014-01-04 23:39:39 +00:00
mav
4f2347ab59 MFC r258338:
Grow UMA zone bucket size also on lock congestion during item free.

Lock congestion is the same, whether it happens on alloc or free, so
handle it equally.  Now that we have back pressure, there is no problem
to grow buckets a bit faster.  Any way growth is much slower then in 9.x.
2014-01-04 23:38:06 +00:00
mav
363e273d8f MFC r258337:
Add two new UMA bucket zones to store 3 and 9 items per bucket.

These new buckets make bucket size self-tuning more soft and precise.
Without them there are buckets for 1, 5, 13, 29, ... items.  While at
bigger sizes difference about 2x is fine, at smallest ones it is 5x and
2.6x respectively.  New buckets make that line look like 1, 3, 5, 9, 13,
29, reducing jumps between steps, making algorithm work softer, allocating
and freeing memory in better fitting chunks.  Otherwise there is quite a
big gap between allocating 128K and 5x128K of RAM at once.
2014-01-04 23:37:01 +00:00
mav
a5fd15da70 MFC r258336:
Implement soft pressure on UMA cache bucket sizes.

Every time system detects low memory condition decrease bucket sizes for
each zone by one item.  As result, higher memory pressure will push to
smaller bucket sizes and so smaller per-CPU caches and so more efficient
memory use.

Before this change there was no force to oppose buckets growth as result
of practically inevitable zone lock conflicts, and after some run time
per-CPU caches could consume enough RAM to kill the system.
2014-01-04 23:35:34 +00:00
mav
afcf784d4c MFC r259232:
Create own free list for each of the first 32 possible allocation sizes.
In case of 4K allocation quantum that means for allocations up to 128K.

With growth of memory fragmentation these lists may grow to quite a large
sizes (tenths and hundreds of thousands items).  Having in one list items
of different sizes in worst case may require full linear list traversal,
that may be very expensive.  Having lists for items of single size means
that unless user specify some alignment or border requirements (that are
very rare cases) first item found on the list should satisfy the request.

While running SPEC NFS benchmark on top of ZFS on 24-core machine with
84GB RAM this change reduces CPU time spent in vmem_xalloc() from 8%
and lock congestion spinning around it from 20% to invisible levels.
And that all is by the cost of just 26 more pointers per vmem instance.

If at some point our kernel will start to actively use KVA allocations
with odd sizes above 128K, something may need to be done to bigger lists
also.
2014-01-04 23:31:34 +00:00
dim
04ce9320a8 MFC r260112:
In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.
2014-01-04 23:12:01 +00:00
dim
df316577ae MFC r260111:
For sys/ofed/drivers/infiniband/hw/mlx4/mcg.c, disable warning about
unused variables for now.
2014-01-04 23:00:56 +00:00
dim
1740bd87f0 MFC r260104:
For sys/ofed/drivers/infiniband/core/cm.c, disable warning about unused
functions for now.
2014-01-04 22:13:16 +00:00
dim
385c846a94 MFC r260095:
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.
2014-01-04 22:00:07 +00:00
dim
3a06a5ceae MFC r260103:
In sys/amd64/amd64/pmap.c, remove static function pmap_is_current(),
which has been unused since r189415.

Reviewed by:	alc
2014-01-04 21:45:52 +00:00
dim
6f23e4f462 MFC r260057:
In sys/dev/scc, remove unused static function scc_setmreg().  While
here, invoke scc_getmreg() in two more places where it can be used.

Reviewed by:	marcel
2014-01-04 21:32:53 +00:00
dim
b5bbabfb5f MFC r260056:
In sys/dev/vxge/vxgehal/vxgehal-ring.c, #if 0 an unused static function.
2014-01-04 21:23:49 +00:00
dim
5e502f56a4 MFC r260055:
In sys/dev/usb/wlan/if_urtw.c, #if 0 a static const variable, which has
been unused since r198194.
2014-01-04 21:18:54 +00:00
glebius
a19f1f1902 Merge r258690 by mav from head:
Fix bug introduced at r252226, when udata argument passed to bucket_alloc()
  was used without making sure first that it was really passed for us.

  On some of my systems this bug made user argument passed by ZFS code to
  uma_zalloc_arg() unexpectedly block UMA per-CPU caches for those zones.
2014-01-04 19:51:57 +00:00
dim
d612a2323c MFC r260054:
In sys/dev/tpm/tpm.c, #if 0 an unused static function.
2014-01-04 19:13:25 +00:00
dim
641c7c0871 MFC r260048:
In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].
2014-01-04 19:04:53 +00:00
dim
a29e1060a5 MFC r260042:
Remove superfluous old-style rcsid[] from if_my.c.  There is already an
__FBSDID() at the top of the file.
2014-01-04 18:58:18 +00:00
dim
98319f939f MFC r260040:
In sys/dev/mcd/mcd.c, mark the static const COPYRIGHT string as __used,
so it ends up in the object file, and no warnings are emitted about it
being actually unused.
2014-01-04 18:53:31 +00:00
dim
a0f0f71f55 MFC r260038:
In sys/dev/en/midway.c, #if 0 an unused static function.
2014-01-04 18:48:29 +00:00
dim
66ceef72b9 MFC r260039:
Turn off warnings about unused variables for a bunch of files under
contrib/ipfilter.
2014-01-04 18:33:28 +00:00
dim
d1cdc4fc9a MFC r260026:
Disable warning about unused functions for ieee80211_crypto.c and
ieee80211_mesh.c for now.
2014-01-04 18:24:45 +00:00
dim
83ddc49dd1 MFC r260025:
Disable warning about unused functions for ar9300_reset.c for now.
2014-01-04 18:19:53 +00:00
dim
d67626df70 MFC r260019:
For some files under sys/dev/drm2/i915, turn off warnings about unused
functions and variables, since they are contributed code.
2014-01-04 17:59:40 +00:00
dim
7a170f6d98 MFC r260020:
For sys/dev/drm2/radeon, only use -fms-extensions with gcc.  This flag
is only to stop gcc complaining about anonymous unions, which clang does
not do.  For clang 3.4 however, -fms-extensions enables the Microsoft
__wchar_t type, which clashes with our own types.h.

MFC r260102:

Similar to r260020, only use -fms-extensions with gcc, for all other
modules which require this flag to compile.  Use a GCC_MS_EXTENSIONS
variable, defined in kern.pre.mk, which can be used to easily supply the
flag (or not), depending on the compiler type.
2014-01-04 17:54:06 +00:00
dim
dfba73dcd1 MFC r260017:
Mark unused static inline functions defined by the PCTRIE_DEFINE() macro
as __unused, so warnings about them are avoided.
2014-01-04 17:36:13 +00:00
dim
110965f5ae MFC r260016:
Remove superfluous old-style rcsid[] from if_sk.c.  There is already an
__FBSDID() at the top of the file.
2014-01-04 17:33:05 +00:00
dim
1e7deba555 MFC r260003:
In libiconv_modules, surround unused static _citrus_XXX_pack_state() and
_citrus_XXX_unpack_state() functions with #if 0, for now.
2014-01-04 17:27:43 +00:00
dim
bc58f2ef55 MFC r260015:
In libc++'s type_traits header, avoid warnings (activated by our use of
-Wsystem-headers) about potential keyword compatibility problems, by
adding a __libcpp prefix to the applicable identifiers.

Upstream is still debating about this, but we need it now, to be able to
import clang 3.4.
2014-01-04 17:22:53 +00:00
peter
85b22fcc3d Revert r258396 : teach iconv about a WCHAR_T pseudo-type 2014-01-03 23:36:03 +00:00