Commit Graph

196183 Commits

Author SHA1 Message Date
markj
2bf1f15393 MFC r262669:
When our linker merges .SUNW_dof sections from multiple files, it simply
concatenates the DOF tables into one section. Previously, the USDT init
code in drti.o would only look at the first table in the DOF section; with
this change, it iterates over all the tables, passing each DOF table to
the kernel.

PR:	186821
2014-07-29 18:31:27 +00:00
marius
6b4298527d MFC: r269051
Copying pages via temporary mappings in the !DMAP case of pmap_copy_pages()
involves updating the corresponding page tables followed by accesses to the
pages in question. This sequence is subject to the situation exactly described
in the "AMD64 Architecture Programmer's Manual Volume 2: System Programming"
rev. 3.23, "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore,
issuing the INVLPG right after modifying the PTE bits is crucial (see also
r269050, MFCed to stable/10 in r269235).
For the amd64 PMAP code, the order of instructions was already correct. The
above fact still is worth documenting, though.

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Reviewed by:	alc
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-07-29 13:11:37 +00:00
marius
4f9788cb2b MFC: r269050
- Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the "AMD64
  Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23,
  "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956 and later on carried
  over to pmap_copy_pages() derived from the former, while all other places
  in the i386 PMAP code use the correct order of instructions in this regard.
  Fixing the latter breakage solves the problem of data corruption seen with
  unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
  However, this might also fix similar corruption reported for virtualized
  environments.
- In pmap_copy_pages(), correctly set the cache bits on the source page being
  copied. This change is thought to be a NOP for the real world, though. [2]

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Submitted by:	kib [2]
Reviewed by:	alc, kib
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-07-29 13:08:37 +00:00
mav
e6ff5c766b MFC r269122:
Fix infinite loop, when doing WRITE SAME on file-backed LUN.
2014-07-29 07:40:14 +00:00
pluknet
2dfd8b7dad MFC r268727 (by delphij):
Add a bandaid to fix GCC build (on sparc64 et al).
2014-07-29 07:36:38 +00:00
delphij
971decf64b MFC r268979:
Don't save entropy inside jails.

As of r126744, we no longer feed the entropy device in jails upon
start, and collecting them is no longer useful.

PR:		conf/126744
Submitted by:	Eugene Grosbein <eugen grosbein net> (with minor changes)
Approved by:	so (des)
2014-07-29 06:00:16 +00:00
delphij
2c88e211d5 MFC r268720: MFV r268714:
Improve extreme rewind import.

When doing an "extreme rewind" import ("zpool import -XF"), we attempt
to verify all data in the pool, essentially scrubbing the entire pool.
The problem is that spa_load_verify_cb() issues an unbounded number of
concurrent scrub i/os.  This can lead to all of memory being used for
these zio's, wedging the system. Like normal scrub, we need to put a
cap on the number of outstanding i/os, and have the traverse thread
block when we reach this cap.

For this purpose the cap can be very large (10,000) to optimize the
elevator algorithm.  Three kernel tunables have been added:

	vfs.zfs.spa_load_verify_maxinflight
	vfs.zfs.spa_load_verify_metadata
	vfs.zfs.spa_load_verify_data

The latter two tunables controls whether metadata and/or user data
when doing extreme rewind.

Make 'zpool import -T' imply scrub.

Make zpool import -T <txg> accept hexadecimal values for the txg when
prefixed with 0x.

Skip txg's for which there is no uberblock when doing extreme rewind.

Skip reading all user data twice by skipping prefetches when doing
extreme rewinds as we do not access via the ARC.

Illumos issues:
  4970 need controls on i/o issued by zpool import -XF
  4971 zpool import -T should accept hex values
  4972 zpool import -T implies extreme rewind, and thus a scrub
  4973 spa_load_retry retries the same txg
  4974 spa_load_verify() reads all data twice
2014-07-29 05:49:16 +00:00
delphij
12df8077a6 MFC r268713: MFV r268702:
Add missing *_destroy() calls in various places with ZFS.

Illumos issue:
  4975 missing mutex_destroy() calls in zfs
2014-07-29 05:41:54 +00:00
trasz
24c4578f54 MFC r269088:
Fix ctl(4) kldload failure that manifested like this:

link_elf_obj: symbol icl_pdu_new_bhs undefined

PR:		192031
Submitted by:	Nils Beyer (earlier version)
Sponsored by:	FreeBSD Foundation
2014-07-28 22:25:27 +00:00
jfv
00e682104e MFC of R267935: Sync the E1000 shared code to Intel internal, and
more importantly add new I218 adapter support to em.
2014-07-28 21:11:18 +00:00
marcel
37a9f7be2f MFC r268236,268264,268524,268646,268802,269021:
This brings VHD support to mkimg(1); both dynamic and fixed file formats.
Dynamic VHD and VMDK file images are now sparsely written, meaning that
"free" sectors do not occupy space.

Relnotes: yes
2014-07-28 02:07:16 +00:00
kib
920342975e MFC r268766:
Do not ignore error from tmpfs_alloc_vp().
2014-07-28 01:25:49 +00:00
kib
12dac89c4e MFC r268617:
Rework the tmpfs unmount.
2014-07-28 01:23:59 +00:00
kib
20a6651181 MFC r268615:
Add OBJ_TMPFS_NODE flag.

MFC r268616:
Set the OBJ_TMPFS_NODE flag for vm_object of VREG tmpfs node.

MFC r269053:
Correct assertion. tmpfs vm object is always at the bottom of
the shadow chain.
2014-07-28 01:21:02 +00:00
kib
d2764792a7 MFC r268614:
Use tmpfs_vn_get_ino_gen() to handle the races with reclaim in tmpfs
dotdot lookup.
2014-07-28 01:16:07 +00:00
kib
86ba2f30ea MFC r268613:
Style.  Add comment about lock mode.
2014-07-28 01:14:25 +00:00
kib
36fc0d1d01 MFC r268612:
Add helper helper vfs_write_suspend_umnt().

Fix the bug in the FFS unmount, when suspension failed, the ufs
extattrs were not reinitialized.
2014-07-28 01:11:29 +00:00
kib
2ac333b7af MFC r268611:
Replace goto's with the return.
2014-07-28 01:08:43 +00:00
kib
eb32c3f0ff MFC r268610:
Add convenience macro to assert tmpfs node lock.
2014-07-28 01:06:36 +00:00
kib
8c4ee72725 MFC r268609:
Add some assertions for the code handling vm_object for tmpfs vnode.
2014-07-28 01:04:33 +00:00
kib
1a878ba1c0 MFC r268608:
The tmpfs_link() must not dereference the filesystem-specific data for
a vnode until it is verified that the vnode indeed belongs to tmpfs mount.
2014-07-28 01:01:20 +00:00
kib
e0e54a97de MFC r268607:
In kern_linkat(), avoid passing doomed vnode to the VOP.
2014-07-28 00:57:28 +00:00
kib
49b4c6d03e MFC r268606:
Generalize vn_get_ino() to allow filesystems to use custom vnode
producer. Convert inline copies of vn_get_ino() in msdosfs and cd9660
into the uses of vn_get_ino_gen().
2014-07-28 00:53:26 +00:00
kib
35e4a7c8ff MFC r268605:
Remove code separator lines which do not conform to style(9).
2014-07-28 00:43:42 +00:00
kib
979b1ce80a MFC r269081:
Fix typo.
2014-07-27 18:08:47 +00:00
mav
7219c9daf2 MFC r269058:
Fix build with QUEUE_MACRO_DEBUG.
2014-07-27 08:02:24 +00:00
pfg
26a3b70214 MFC r269016:
Fix mismatch.
2014-07-26 02:41:18 +00:00
ian
3a58a39d52 MFC r268401, r268495:
Pending interrupt status is cleared by writing to the ISR, not the data reg.

  Use named constant rather than '0' to access the reset controller register.
2014-07-25 23:36:39 +00:00
ian
67c03a1145 MFC r266565, r266651:
Map device memory using PTE_DEVICE attributes, and also ensure that the
  shared flag is set on normal-memory mappings made via pmap_kenter() for SMP.

  The "shared flag" part of this change isn't obvious from the diff, here's
  the deal... by using the array of preformatted page table entry templates
  instead of constructing the PTE from scratch, we automatically get the
  right attribute bits set for both caching and shared.

  Fix whitespace glitches.
2014-07-25 23:29:55 +00:00
ian
0adc7b49f4 MFC r263373, r268402
Add a way to apply CFLAGS only when building the given architecture.  This
  is useful primarily on a system used for cross-building, when you have a
  set of flags to apply to the TARGET_ARCH being cross-built but don't want
  those settings applied to building the cross-tools or other components that
  run on the build host machine.

  Support CXXFLAGS.${MACHINE_ARCH} as well as CFLAGS.  This allows different
  C++ options for toolchain versus target when cross-building.
2014-07-25 23:21:36 +00:00
ian
d599f4ba1e MFC r261530
Set the malloc alignment to 64 bytes on platforms that use the U-Boot API
  device drivers.  Recent versions of u-boot run with the MMU enabled, and
  require DMA-based I/O to be aligned to cache line boundaries.
2014-07-25 23:12:22 +00:00
pfg
414a4cb931 MFC r268985, r269001:
Avoid possible cast degradation.

Assign iov_len first, avoiding the cast to uio_resid
(int in stdio) from degrading the value.

Small cosmetical fix while here.
2014-07-25 03:24:00 +00:00
np
103bd6e167 MFC r268640 and r268989.
r268640:
Allow multi-byte reads in the private CHELSIO_T4_GET_I2C ioctl.  The
firmware allows up to 48B to be read this way but the driver limits
itself to 8B at a time to remain compatible with old cxgbetool
binaries.

r268989:
Add missing newline to an error message.
2014-07-25 00:30:55 +00:00
dim
f9d311d90a MFC r268957:
Run mtree for BSD.tests.dist during make xdev-install, if the tests are
enabled (which they are in the default configuration).  Otherwise, it
will fail because ${XDDESTDIR}/usr/include/atf-c does not exist.
2014-07-24 20:16:45 +00:00
kib
59960de643 MFC r268466:
Calculate the amount of resident pages by looking in the objects chain
backing the region. Add a knob to disable the residency calculation at
all.

MFC r268490:
Unconditionally initialize addr to handle the case of changed map
timestamp while the map is unlocked.

MFC r268711:
Change the calculation of the kinfo_vmentry field kve_private_resident
to reflect its name.

MFC r268712:
Followup to r268466.
- Move the code to calculate resident count into separate function.
  It reduces the indent level and makes the operation of
  vmmap_skip_res_cnt tunable more clear.
- Optimize the calculation of the resident page count for map entry.
  Skip directly to the next lowest available index and page among the
  whole shadow chain.
- Restore the use of pmap_incore(9), only to verify that current
  mapping is indeed superpage.
- Note the issue with the invalid pages.
2014-07-24 16:33:29 +00:00
kib
d7d6313cf4 MFC r267213 (by alc):
Add a page size field to struct vm_page.

Approved by:	alc
2014-07-24 16:29:44 +00:00
mav
bc8d80ff4e MFC r268457 (by pluknet):
Fix typos.
2014-07-24 15:49:28 +00:00
mav
e65da97c90 MFC r268289:
Fix minor copy-paste bug in r268284.
2014-07-24 15:48:18 +00:00
mav
70c3d88292 MFC r267612 (by trasz):
Get rid of unneccessary argument.
2014-07-24 15:42:32 +00:00
mav
26b69cce3d MFC r267609 (by trasz):
Improve code a little; no functional changes.
2014-07-24 15:41:16 +00:00
mav
15ff7e1d3a MFC r267608 (by trasz):
Use proper term in debug messages.
2014-07-24 15:38:49 +00:00
mav
0a10281b81 MFC r266169 (by trasz):
Remove unused variable.
2014-07-24 15:37:31 +00:00
mav
65d6dfa894 MFC r267613 (by trasz):
Implement redirection handling in initiator.
2014-07-24 15:31:45 +00:00
emaste
c739145ff0 MFC r268947: Hide syscons-specific workaround under DEV_SC 2014-07-24 15:18:19 +00:00
mav
2fab8ef49d MFC r268420:
Remove IO_SYNC flag when writing extended file attributes on ZFS.

While it is possible to create and write file, modify its permissions, etc.
without ever doing sync, it looks odd that it is required for setting
extended file attributes on ZFS.  UFS does not do sync there too.

Samba uses those extended attributes to store some its data, and doing it
synchronously by many times reduces file creation performance for systems
without SLOG device.
2014-07-24 14:55:45 +00:00
emaste
3c9102634e MFC r258471: Don't abort SMAP processing after an entry of length 0
Length 0 is not special and should just be skipped.  This is the same
  behaviour as i386.

Sponsored by:	The FreeBSD Foundation
2014-07-24 14:24:27 +00:00
kib
f8748c4ec3 MFC r268660:
Make amd64 pmap_copy_pages() functional for pages not mapped by DMAP.
2014-07-24 10:45:52 +00:00
kib
8d73e435bf MFC r268384:
When the lock was stolen from us, retry the whole lock sequence in kernel,
instead of returning EINTR.
2014-07-24 10:43:15 +00:00
kevlo
0922bc9cde MFC r268825:
Remove deprecated definition "m_act".

Suggested by:	adrian, glebius
2014-07-24 06:03:45 +00:00
kevlo
f112206e5a MFC r268787:
Deprecate m_act.  Use m_nextpkt always.
2014-07-24 06:02:03 +00:00