summaryrefslogtreecommitdiffstats
path: root/sys/sys
Commit message (Collapse)AuthorAgeFilesLines
...
| * Bump __FreeBSD_version after xz 5.2.2 merge (multithread support).delphij2015-12-221-1/+1
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-173-1/+7
|\ \ | |/
| * MFC r291716, r291724, r291741, r291742ken2015-12-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to those revisions, add this change to a file that is not in head: sys/ia64/include/bus.h: Guard kernel-only parts of the ia64 machine/bus.h header with #ifdef _KERNEL. This allows userland programs to include <machine/bus.h> to get the definition of bus_addr_t and bus_size_t. ------------------------------------------------------------------------ r291716 | ken | 2015-12-03 15:54:55 -0500 (Thu, 03 Dec 2015) | 257 lines Add asynchronous command support to the pass(4) driver, and the new camdd(8) utility. CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and completed CCBs may be retrieved via the CAMIOGET ioctl. User processes can use poll(2) or kevent(2) to get notification when I/O has completed. While the existing CAMIOCOMMAND blocking ioctl interface only supports user virtual data pointers in a CCB (generally only one per CCB), the new CAMIOQUEUE ioctl supports user virtual and physical address pointers, as well as user virtual and physical scatter/gather lists. This allows user applications to have more flexibility in their data handling operations. Kernel memory for data transferred via the queued interface is allocated from the zone allocator in MAXPHYS sized chunks, and user data is copied in and out. This is likely faster than the vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in configurations with many processors (there are more TLB shootdowns caused by the mapping/unmapping operation) but may not be as fast as running with unmapped I/O. The new memory handling model for user requests also allows applications to send CCBs with request sizes that are larger than MAXPHYS. The pass(4) driver now limits queued requests to the I/O size listed by the SIM driver in the maxio field in the Path Inquiry (XPT_PATH_INQ) CCB. There are some things things would be good to add: 1. Come up with a way to do unmapped I/O on multiple buffers. Currently the unmapped I/O interface operates on a struct bio, which includes only one address and length. It would be nice to be able to send an unmapped scatter/gather list down to busdma. This would allow eliminating the copy we currently do for data. 2. Add an ioctl to list currently outstanding CCBs in the various queues. 3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do that. 4. Test physical address support. Virtual pointers and scatter gather lists have been tested, but I have not yet tested physical addresses or scatter/gather lists. 5. Investigate multiple queue support. At the moment there is one queue of commands per pass(4) device. If multiple processes open the device, they will submit I/O into the same queue and get events for the same completions. This is probably the right model for most applications, but it is something that could be changed later on. Also, add a new utility, camdd(8) that uses the asynchronous pass(4) driver interface. This utility is intended to be a basic data transfer/copy utility, a simple benchmark utility, and an example of how to use the asynchronous pass(4) interface. It can copy data to and from pass(4) devices using any target queue depth, starting offset and blocksize for the input and ouptut devices. It currently only supports SCSI devices, but could be easily extended to support ATA devices. It can also copy data to and from regular files, block devices, tape devices, pipes, stdin, and stdout. It does not support queueing multiple commands to any of those targets, since it uses the standard read(2)/write(2)/writev(2)/readv(2) system calls. The I/O is done by two threads, one for the reader and one for the writer. The reader thread sends completed read requests to the writer thread in strictly sequential order, even if they complete out of order. That could be modified later on for random I/O patterns or slightly out of order I/O. camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from the pass(4) driver and also to send request notifications internally. For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR) per CAM CCB on the reading side, and a scatter/gather list (CAM_DATA_SG) on the writing side. In addition to testing both interfaces, this makes any potential reblocking of I/O easier. No data is copied between the reader and the writer, but rather the reader's buffers are split into multiple I/O requests or combined into a single I/O request depending on the input and output blocksize. For the file I/O path, camdd(8) also uses a single buffer (read(2), write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list (readv(2), writev(2), preadv(2), pwritev(2)) on writes. Things that would be nice to do for camdd(8) eventually: 1. Add support for I/O pattern generation. Patterns like all zeros, all ones, LBA-based patterns, random patterns, etc. Right Now you can always use /dev/zero, /dev/random, etc. 2. Add support for a "sink" mode, so we do only reads with no writes. Right now, you can use /dev/null. 3. Add support for automatic queue depth probing, so that we can figure out the right queue depth on the input and output side for maximum throughput. At the moment it defaults to 6. 4. Add support for SATA device passthrough I/O. 5. Add support for random LBAs and/or lengths on the input and output sides. 6. Track average per-I/O latency and busy time. The busy time and latency could also feed in to the automatic queue depth determination. sys/cam/scsi/scsi_pass.h: Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue and fetch asynchronous CAM CCBs respectively. Although these ioctls do not have a declared argument, they both take a union ccb pointer. If we declare a size here, the ioctl code in sys/kern/sys_generic.c will malloc and free a buffer for either the CCB or the CCB pointer (depending on how it is declared). Since we have to keep a copy of the CCB (which is fairly large) anyway, having the ioctl malloc and free a CCB for each call is wasteful. sys/cam/scsi/scsi_pass.c: Add asynchronous CCB support. Add two new ioctls, CAMIOQUEUE and CAMIOGET. CAMIOQUEUE adds a CCB to the incoming queue. The CCB is executed immediately (and moved to the active queue) if it is an immediate CCB, but otherwise it will be executed in passstart() when a CCB is available from the transport layer. When CCBs are completed (because they are immediate or passdone() if they are queued), they are put on the done queue. If we get the final close on the device before all pending I/O is complete, all active I/O is moved to the abandoned queue and we increment the peripheral reference count so that the peripheral driver instance doesn't go away before all pending I/O is done. The new passcreatezone() function is called on the first call to the CAMIOQUEUE ioctl on a given device to allocate the UMA zones for I/O requests and S/G list buffers. This may be good to move off to a taskqueue at some point. The new passmemsetup() function allocates memory and scatter/gather lists to hold the user's data, and copies in any data that needs to be written. For virtual pointers (CAM_DATA_VADDR), the kernel buffer is malloced from the new pass(4) driver malloc bucket. For virtual scatter/gather lists (CAM_DATA_SG), buffers are allocated from a new per-pass(9) UMA zone in MAXPHYS-sized chunks. Physical pointers are passed in unchanged. We have support for up to 16 scatter/gather segments (for the user and kernel S/G lists) in the default struct pass_io_req, so requests with longer S/G lists require an extra kernel malloc. The new passcopysglist() function copies a user scatter/gather list to a kernel scatter/gather list. The number of elements in each list may be different, but (obviously) the amount of data stored has to be identical. The new passmemdone() function copies data out for the CAM_DATA_VADDR and CAM_DATA_SG cases. The new passiocleanup() function restores data pointers in user CCBs and frees memory. Add new functions to support kqueue(2)/kevent(2): passreadfilt() tells kevent whether or not the done queue is empty. passkqfilter() adds a knote to our list. passreadfiltdetach() removes a knote from our list. Add a new function, passpoll(), for poll(2)/select(2) to use. Add devstat(9) support for the queued CCB path. sys/cam/ata/ata_da.c: Add support for the BIO_VLIST bio type. sys/cam/cam_ccb.h: Add a new enumeration for the xflags field in the CCB header. (This doesn't change the CCB header, just adds an enumeration to use.) sys/cam/cam_xpt.c: Add a new function, xpt_setup_ccb_flags(), that allows specifying CCB flags. sys/cam/cam_xpt.h: Add a prototype for xpt_setup_ccb_flags(). sys/cam/scsi/scsi_da.c: Add support for BIO_VLIST. sys/dev/md/md.c: Add BIO_VLIST support to md(4). sys/geom/geom_disk.c: Add BIO_VLIST support to the GEOM disk class. Re-factor the I/O size limiting code in g_disk_start() a bit. sys/kern/subr_bus_dma.c: Change _bus_dmamap_load_vlist() to take a starting offset and length. Add a new function, _bus_dmamap_load_pages(), that will load a list of physical pages starting at an offset. Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios. Allow unmapped I/O to start at an offset. sys/kern/subr_uio.c: Add two new functions, physcopyin_vlist() and physcopyout_vlist(). sys/pc98/include/bus.h: Guard kernel-only parts of the pc98 machine/bus.h header with #ifdef _KERNEL. This allows userland programs to include <machine/bus.h> to get the definition of bus_addr_t and bus_size_t. sys/sys/bio.h: Add a new bio flag, BIO_VLIST. sys/sys/uio.h: Add prototypes for physcopyin_vlist() and physcopyout_vlist(). share/man/man4/pass.4: Document the CAMIOQUEUE and CAMIOGET ioctls. usr.sbin/Makefile: Add camdd. usr.sbin/camdd/Makefile: Add a makefile for camdd(8). usr.sbin/camdd/camdd.8: Man page for camdd(8). usr.sbin/camdd/camdd.c: The new camdd(8) utility. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r291724 | ken | 2015-12-03 17:07:01 -0500 (Thu, 03 Dec 2015) | 6 lines Fix typos in the camdd(8) usage() function output caused by an error in my diff filter script. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r291741 | ken | 2015-12-03 22:38:35 -0500 (Thu, 03 Dec 2015) | 10 lines Fix g_disk_vlist_limit() to work properly with deletes. Add a new bp argument to g_disk_maxsegs(), and add a new function, g_disk_maxsize() tha will properly determine the maximum I/O size for a delete or non-delete bio. Submitted by: will Sponsored by: Spectra Logic ------------------------------------------------------------------------ ------------------------------------------------------------------------ r291742 | ken | 2015-12-03 22:44:12 -0500 (Thu, 03 Dec 2015) | 5 lines Fix a style issue in g_disk_limit(). Noticed by: bdrewery ------------------------------------------------------------------------ Sponsored by: Spectra Logic
| * Bump __FreeBSD_version since r292223 changed the internal interfacermacklem2015-12-141-1/+1
| | | | | | | | | | between the nfsd.ko and nfscommon.ko modules such that they need to be upgraded to-gether.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-271-1/+1
|\ \ | |/
| * Belatedly bump __FreeBSD_version after r291215smh2015-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Due to the change in args for g_dev_setdumpdev by r291215 belatedly bump __FreeBSD_version to allow any potential consumers to check for this, as requested by delphij. This is a direct commit to stable/10 Approved by: so (delphij) Sponsored by: Multiplay
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-241-1/+1
|\ \ | |/
| * MFC r274366:smh2015-11-231-1/+1
| | | | | | | | | | | | | | Add missing privilege check when setting the dump device. Approved by: pjd, secteam (both no objections) Sponsored by: Multiplay
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-232-9/+8
|\ \ | |/
| * MFC r290492:kib2015-11-212-9/+8
| | | | | | | | Move intmax_t and uintmax_t type declarations to sys/_stdint.h.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-163-3/+4
|\ \ | |/
| * MFC r289195:ngie2015-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. Sponsored by: EMC / Isilon Storage Division Conflicts: lib/libarchive/test usr.bin/cpio/test
| * MFC r287235:markj2015-11-131-1/+1
| | | | | | | | Remove weighted page handling from vm_page_advise().
| * MFC r289867:markj2015-11-131-1/+1
| | | | | | | | Remove an erroneous semicolon.
* | Revert "Importing pfSense patch altq_codel.diff"Luiz Otavio O Souza2015-11-111-1/+0
| | | | | | | | | | | | This reverts commit cf3bb1a7166bec431631defe01c8d4e706a99638. TAG: CODEL
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-111-1/+1
|\ \ | |/
| * MFC 289636:jhb2015-11-061-1/+1
| | | | | | | | Switch pl_child_pid from int to pid_t.
* | Merge branch 'stable/10' into develRenato Botelho2015-11-033-2/+6
|\ \ | |/
| * MFC r288366: sdt.h: no need for argtype_list_headavg2015-10-231-1/+1
| |
| * MFC 287386,288949,288993:jhb2015-10-232-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export current system call code and argument count for system call entry and exit events. To preserve the ABI, the new fields are moved to the end of struct thread in these branches (unlike HEAD) and explicitly copied when new threads are created. In addition, the new tests are only added in 10. r287386: Export current system call code and argument count for system call entry and exit events. procfs stop events for system call tracing report these values (argument count for system call entry and code for system call exit), but ptrace() does not provide this information. (Note that while the system call code can be determined in an ABI-specific manner during system call entry, it is not generally available during system call exit.) The values are exported via new fields at the end of struct ptrace_lwpinfo available via PT_LWPINFO. r288949: Fix various edge cases related to system call tracing. - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. r288993: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
* | Merge branch 'stable/10' into develRenato Botelho2015-10-213-2/+7
|\ \ | |/
| * MFC r258909:trasz2015-10-181-1/+1
| | | | | | | | | | | | | | | | Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. Sponsored by: The FreeBSD Foundation
| * MFC r287033:trasz2015-10-181-1/+0
| | | | | | | | | | | | | | After r286237 it should be fine to call vgone(9) on a busy GEOM vnode; remove KASSERT that would prevent forced devfs unmount from working. Sponsored by: The FreeBSD Foundation
| * MFC r289070: Add .gnu.versym VERSYM_HIDDEN flag and related maskemaste2015-10-161-0/+6
| | | | | | | | Sponsored by: The FreeBSD Foundation
* | MFC r275732:Luiz Otavio O Souza2015-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some new modes to OpenCrypto. These modes are AES-ICM (can be used for counter mode), and AES-GCM. Both of these modes have been added to the aesni module. Included is a set of tests to validate that the software and aesni module calculate the correct values. These use the NIST KAT test vectors. To run the test, you will need to install a soon to be committed port, nist-kat that will install the vectors. Using a port is necessary as the test vectors are around 25MB. All the man pages were updated. I have added a new man page, crypto.7, which includes a description of how to use each mode. All the new modes and some other AES modes are present. It would be good for someone else to go through and document the other modes. A new ioctl was added to support AEAD modes which AES-GCM is one of them. Without this ioctl, it is not possible to test AEAD modes from userland. Add a timing safe bcmp for use to compare MACs. Previously we were using bcmp which could leak timing info and result in the ability to forge messages. Add a minor optimization to the aesni module so that single segment mbufs don't get copied and instead are updated in place. The aesni module needs to be updated to support blocked IO so segmented mbufs don't have to be copied. We require that the IV be specified for all calls for both GCM and ICM. This is to ensure proper use of these functions. Obtained from: p4: //depot/projects/opencrypto Relnotes: yes Sponsored by: FreeBSD Foundation Sponsored by: NetGate TAG: IPSEC-HEAD Issue: #4841
* | MFC r272673:Luiz Otavio O Souza2015-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | Add explicit_bzero(3) and its kernel counterpart. Obtained from: OpenBSD MFC after: 2 weeks TAG: IPSEC-HEAD Issue: #4841
* | Revert IPSEC patches.Luiz Otavio O Souza2015-10-201-4/+0
| | | | | | | | | | | | | | | | | | Revert "Importing pfSense patch ipsec-oneshot-dump.diff" This reverts commit d3b775b3db2819bebcac765dca33db7f8f5143c7. TAG: IPSEC-HEAD Issue: #4841
* | Merge branch 'stable/10' into develRenato Botelho2015-10-134-18/+79
|\ \ | |/
| * MFC r288258:kib2015-10-101-3/+4
| | | | | | | | Make the __bitcount*() functions unconditionally available.
| * MFC r288446: Disable suspend during shutdown.cperciva2015-10-081-0/+1
| |
| * MFC r284915:hselasky2015-10-081-14/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the system queue header file fully usable within C++ programs by adding macros to define class lists. This change is backwards compatible for all use within C and C++ programs. Only C++ programs will have added support to use the queue macros within classes. Previously the queue macros could only be used within structures. The queue.3 manual page has been updated to describe the new functionality and some alphabetic sorting has been done while at it. Differential Revision: https://reviews.freebsd.org/D2745 PR: 200827 (exp-run)
| * Belately bump __FreeBSD_version after r288572 which makes a change todelphij2015-10-081-1/+1
| | | | | | | | | | | | zfeature_info. This is a direct commit to stable/10.
* | Merge branch 'stable/10' into develRenato Botelho2015-10-075-3/+51
|\ \ | |/
| * MFC r279433 (by rstone): Implement asprintf in libkernmav2015-10-051-0/+4
| |
| * MFC 283624,283630:jhb2015-10-011-0/+21
| | | | | | | | | | | | Export a list of VM objects in the system via a sysctl. The list can be examined via 'vmstat -o'. It can be used to determine which files are using physical pages of memory and how much each is using.
| * MFC r288000:kib2015-09-271-1/+1
| | | | | | | | Add support for weak symbols to the kernel linkers.
| * MFC r276636: add NT_PPC_VMX note type definitionemaste2015-09-241-0/+1
| |
| * MFC r279698: Update the ELFOSABI_* constants.emaste2015-09-241-0/+2
| | | | | | | | | | | | Two new operating systems have been added in the meantime. ELFOSABI_FENIXOS that uses value 16 (published in the latest draft) and ELFOSABI_CLOUDABI that uses value 17 (to be published in the next draft).
| * MFC r280858: Fill out arm64 dynamic relocation #definesemaste2015-09-241-0/+4
| |
| * MFC r281308: Add R_AARCH64_NONE, the null relocation.emaste2015-09-241-0/+1
| |
| * MFC r275903: Add AArch64 64-bit relocation values.emaste2015-09-241-0/+12
| |
| * MFC r282916: Add ELF machine EM_IAMCU, 32-bit Intel MCUemaste2015-09-241-0/+1
| | | | | | | | It is e_machine 6, which was previously reserved for 486.
| * MFC r285841: Add RISC-V ELF machine type definitionemaste2015-09-241-0/+1
| | | | | | | | | | | | EM_RISCV is now officially registered as e_machine 243. Sponsored by: The FreeBSD Foundation
| * MFC r287886:smh2015-09-241-2/+3
| | | | | | | | | | | | Fix kqueue write events for files > 2GB Sponsored by: Multiplay
* | Merge branch 'stable/10' into develRenato Botelho2015-09-222-3/+6
|\ \ | |/
| * MFC of 281677:mckusick2015-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More accurately collect name-cache statistics in sysctl functions sysctl_debug_hashstat_nchash() and sysctl_debug_hashstat_rawnchash(). These changes are in preparation for allowing changes in the size of the vnode hash tables driven by increases and decreases in the maximum number of vnodes in the system. Reviewed by: kib@ Phabric: D2265 MFC of 287497: Track changes to kern.maxvnodes and appropriately increase or decrease the size of the name cache hash table (mapping file names to vnodes) and the vnode hash table (mapping mount point and inode number to vnode). An appropriate locking strategy is the key to changing hash table sizes while they are in active use. Reviewed by: kib Tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D2265
| * MFC r280957rstone2015-09-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | Fix integer truncation bug in malloc(9) A couple of internal functions used by malloc(9) and uma truncated a size_t down to an int. This could cause any number of issues (e.g. indefinite sleeps, memory corruption) if any kernel subsystem tried to allocate 2GB or more through malloc. zfs would attempt such an allocation when run on a system with 2TB or more of RAM.
* | Merge branch 'stable/10' into develRenato Botelho2015-09-112-4/+1
|\ \ | |/
| * MFC r287309:kib2015-09-061-3/+0
| | | | | | | | | | Remove single-use macros obfuscating malloc(9) and free(9) calls. Style.
| * MFC r286836:delphij2015-08-311-1/+1
| | | | | | | | | | so_vnet is constant after creation and no locking is necessary, document this fact.
OpenPOWER on IntegriCloud