Up to [DragonFly] / src / sys / sys
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Move selinfo stuff to the separate header sys/selinfo.h. Make sys/select.h POSIX compatible. Note: Modifications from the original patch. For the moment maintain compatibility with BSD manual pages by ensuring that the prototype for the select() function is declared in both sys/select.h and unistd.h. Submitted-by: Alexey Slynko <email@example.com>
Clean up more #include files. Create an internal __boolean_t so two or three sys/ header files don't have to juggle the type. Use _KERNEL_STRUCTURES in variuos pieces of user code that delve into kvm. Reported-by: Rumko <firstname.lastname@example.org>, walt <email@example.com>
I'm growing tired of having to add #include lines for header files that the include file(s) I really want depend on. Go through nearly all major system include files and add appropriately #ifndef'd #include lines to include all dependant header files. Kernel source files now only need to #include the header files they directly depend on. So, for example, if I wanted to add a SYSCTL to a kernel source file, I would only have to #include <sys/sysctl.h> to bring in the support for it, rather then four or five header files in addition to <sys/sysctl.h>.
Clean up the XIO API and structure. XIO no longer tries to 'track' partial copies into or out of an XIO. It no longer adjusts xio_offset or xio_bytes once they have been initialized. Instead, a relative offset is now passed to API calls to handle partial copies. This makes the API a lot less confusing and makes the XIO structure a lot more flexible, shareable, and more suitable for use by higher level entities (buffer cache, pipe code, upcoming MSFBUF work, etc).
Commit an update to the pipe code that implements various pipe algorithms. Note that the newer algorithms are either experimental or only exist for testing purposes. The default remains the same (sfbuf mode), which is considered to be stable. The code is just too useful not to commit it. Add pmap_qenter2() for installing cpu-localized KVM mappings. Add pmap_page_assertzero() which will be used in a later diagnostic commit.
Enhance the pmap_kenter*() API and friends, separating out entries which only need invalidation on the local cpu against entries which need invalidation across the entire system, and provide a synchronization abstraction. Enhance sf_buf_alloc() and friends to allow the caller to specify whether the sf_buf's kernel mapping is going to be used on just the current cpu or whether it needs to be valid across all cpus. This is done by maintaining a cpumask of known-synchronized cpus in the struct sf_buf Optimize sf_buf_alloc() and friends by removing both TAILQ operations in the critical path. TAILQ operations to remove the sf_buf from the free queue are now done in a lazy fashion. Most sf_buf operations allocate a buf, work on it, and free it, so why waste time moving the sf_buf off the freelist if we are only going to move back onto the free list a microsecond later? Fix a bug in sf_buf_alloc() code as it was being used by the PIPE code. sf_buf_alloc() was unconditionally using PCATCH in its tsleep() call, which is only correct when called from the sendfile() interface. Optimize the PIPE code to require only local cpu_invlpg()'s when mapping sf_buf's, greatly reducing the number of IPIs required. On a DELL-2550, a pipe test which explicitly blows out the sf_buf caching by using huge buffers improves from 350 to 550 MBytes/sec. However, note that buildworld times were not found to have changed. Replace the PIPE code's custom 'struct pipemapping' structure with a struct xio and use the XIO API functions rather then its own.
Import Alan Cox's /usr/src/sys/kern/sys_pipe.c 1.171. This rips out writer-side KVA mappings and replaces them with writer-side vm_page wiring (left intact from before) plus reader-side SF_BUF copies. Import 1.141, which is a simple patch which removes a blocking condition when space is available in the pipe's write buffer which was causing non-blocking I/O select-based writes to spin-wait unnecessarily. 1.171 rips out writer-side KVA mappings and replaces them Import FreeBSD-5.x's uiomove_fromphys(), which sys_pipe.c now uses. This procedure could become very useful in a number of DragonFly subsystems. This greatly improves PIPE performance for the direct-mapped case (moderate to large reads and writes). Additionally, recent scheduler fixes greatly improve PIPE performance for both the direct-mapped and small-buffer cases. NOTE: wired page limits for pipes have not yet been imported, and the heavy use of sf_buf's may require some tuning in the many-pipes case. BLKSIZE BEFORE AFTER MBytes/s MBytes/s Tests on AMD64/3200+ FN85 MB ------- ------ ------ (64KB L1, 1MB L2) 256KB 1900 2200 64KB 1800 2200 16KB 1650 2500-3000 8KB 1400 2300 4KB 1300 1400-1500 (note 1) note 1: The 4KB case is not a direct-write case, the results are due to the scheduler fixes only. Obtained-from: FreeBSD-5.x / FreeBSD's Alan Cox
Implement a pipe KVM cache primarily to reduce unnecessary TLB IPIs between cpcus on MP systems due to continuous KVM allocations.
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most ids have been removed from !lint sections and moved into comment sections.
import from FreeBSD RELENG_4 1.16