summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_uio.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the check for vm_map_remove() error.kib2011-03-281-1/+1
| | | | | Pointed out by: alc MFC after: 2 weeks
* Trim white spaces, adjust style.kib2011-03-281-10/+12
| | | | MFC after: 2 weeks
* Handle zero length in copyout_unmap().kib2011-03-281-0/+3
| | | | | Submitted by: John Wehle <john feith com> MFC after: 2 weeks
* Promote ksyms_map() and ksyms_unmap() to general facilitykib2011-03-281-0/+49
| | | | | | | copyout_map() and copyout_unmap() interfaces. Submitted by: John Wehle <john feith com>, nox MFC after: 2 weeks
* Remove the uio_yield prototype and symbol. This function has beenmdf2011-02-081-7/+0
| | | | | | | | | misnamed since it was introduced and should not be globally exposed with this name. The equivalent functionality is now available using kern_yield(curthread->td_user_pri). The function remains undocumented. Bump __FreeBSD_version.
* Based on discussions on the svn-src mailing list, rework r218195:mdf2011-02-081-24/+2
| | | | | | | | | | | | | | | | | | | | | | - entirely eliminate some calls to uio_yeild() as being unnecessary, such as in a sysctl handler. - move should_yield() and maybe_yield() to kern_synch.c and move the prototypes from sys/uio.h to sys/proc.h - add a slightly more generic kern_yield() that can replace the functionality of uio_yield(). - replace source uses of uio_yield() with the functional equivalent, or in some cases do not change the thread priority when switching. - fix a logic inversion bug in vlrureclaim(), pointed out by bde@. - instead of using the per-cpu last switched ticks, use a per thread variable for should_yield(). With PREEMPTION, the only reasonable use of this is to determine if a lock has been held a long time and relinquish it. Without PREEMPTION, this is essentially the same as the per-cpu variable.
* Put the general logic for being a CPU hog into a new functionmdf2011-02-021-6/+17
| | | | | | | | | | should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield(). Change several checks for a magic number of iterations to use should_yield() instead. MFC after: 1 week
* Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), andalc2010-05-081-3/+0
| | | | | | | | | | | vm_page_try_to_free(). Consequently, push down the page queues lock into pmap_enter_quick(), pmap_page_wired_mapped(), pmap_remove_all(), and pmap_remove_write(). Push down the page queues lock into Xen's pmap_page_is_mapped(). (I overlooked the Xen pmap in r207702.) Switch to a per-processor counter for the total number of pages cached.
* Acquire the page lock around all remaining calls to vm_page_free() onalc2010-05-051-0/+2
| | | | | | | | | | | | | managed pages that didn't already have that lock held. (Freeing an unmanaged page, such as the various pmaps use, doesn't require the page lock.) This allows a change in vm_page_remove()'s locking requirements. It now expects the page lock to be held instead of the page queues lock. Consequently, the page queues lock is no longer required at all by callers to vm_page_rename(). Discussed with: kib
* Decompose the most lousy named file in sys/kern; kern_subr.c.ed2010-02-211-0/+478
Although this file has historically been used as a dumping ground for random functions, nowadays it only contains functions related to copying bits {from,to} userspace and hash table utility functions. Behold, subr_uio.c and subr_hash.c.
OpenPOWER on IntegriCloud