summaryrefslogtreecommitdiff
path: root/vm
AgeCommit message (Collapse)Author
2013-03-06Fix typomplaneta/gsoc12/review_v1Maksym Planeta
2013-03-06Fix compiler errors and warningMaksym Planeta
At this moment gnumach at least compiles. Was unable to test it because it requires another glibc version that is not currently installed.
2013-03-06Fix possible bugs for normal and sequential policies when values for ↵Maksym Planeta
readahead were choosen not very sane
2013-03-06Fix variable names in commentMaksym Planeta
2013-03-06Implement pageout for sequential policyMaksym Planeta
2013-03-06Fix errors done in commit 34100aMaksym Planeta
2013-02-20Remove unused parameters for unimplemented functionMaksym Planeta
2013-02-20Add commit that describes purpose of default policyMaksym Planeta
2013-02-18Fix minor style issuesMaksym Planeta
2013-02-18Remove VM_ADVICE_KEEPMaksym Planeta
2012-11-07Fix bug in cleanup after error.mplaneta/gsoc12/reviewMaksym Planeta
* vm/vm_fault.c (vm_cleanup_after_error): Alter only page structure. (vm_fault_page): Cleanup object after error.
2012-10-28Add processing of page faults in clusteres in Mach kernelMaksym Planeta
Earlier, when page fault occurred, control reached the function vm_fault_page, that determined the reason of the fault and if the reason was appropriate, kernel asked a pager for data that should be stored in that single page. The main idea behind this commit is to determine and than request not only one page, but a bunch of them. Almost all work is done in function vm_fault_page, but to keep the size of this function there was added a bunch of helper functions for internal use in vm_fault_page. * i386/intel/read_fault.c (intel_read_fault): New prototype of vm_fault_page requires supplying of map entry in which fault occurred, so change function appropriately. * vm/vm_fault.h (vm_fault_page): Update function prototype. * vm/vm_fault.c (min): New macro. (vm_fault_state_t): New field. (vm_advice_table): New table where parameters for types of memory advice are stored. (map_function_parameter_t): New union for internal use. (vm_mark_for_pagein): New function for internal use. (vm_mark_for_unlock): Likewise. (vm_free_after_error): Likewise. (vm_cleanup_after_error): Likewise. (vm_calculate_clusters): Likewise. (dont_request_page): Likewise. (dont_unlock_page): Likewise. (vm_for_every_page): Likewise. (vm_fault_page): Function has been changed to request data in clusters. Its prototype has been changed to supply to this function information regarding memory entry where page fault occurred. (vm_fault): Function has been changed to supply function vm_fault_page with information regarding memory entry where page fault occurred. (vm_fault_unwire): Function changed to call vm_fault_page with new prototype. (vm_fault_copy): Likewise. * vm/vm_map.c (vm_map_copyin_page_list): Function changed to call vm_fault_page with new prototype. * vm/vm_object.c (vm_object_copy_slowly): Function changed to call vm_fault_page with new prototype.
2012-10-28Add special treatment in memory_object_data_error RPC.Maksym Planeta
This commit add possibility for server to inform kernel that server has no some data requested by kernel. This possibility should be used when kernel asks for cluster of data, but server can't return all the data. * include/mach/kern_return.h (KERN_NO_DATA): New macro. Using this value server may notify kernel that not all data in requested by kernel cluster are available at the moment. * vm/memory_object.c (memory_object_data_error): Add special treatment for error code KERN_NO_DATA.
2012-10-28Update debugging functions to make them inform caller about memory advice.Maksym Planeta
* include/mach_debug/vm_info.h (vm_region_info_t): Add memory advice that is applied to region's information structure. (vm_object_info_t): Add memory advice that is applied to object's information structure. * vm/vm_debug.c (mach_vm_region_info): Function changed to inform caller about memory advice. (mach_vm_object_info): Likewise.
2012-10-28Add RPC that supplies user with general information regarding memory advice.Maksym Planeta
Current implementation of vm_get_advice_info returns only maximal possible size of cluster to be asked. This information is used by default pager, because it can't rely on allocating of memory during processing requests from kernel. That's why default pager allocates buffers, where it stores data to be returned to kernel, beforehand for each thread. So, information provided by vm_get_advice_info tells the default pager size of this buffer. * include/mach/mach.defs (vm_get_advice_info): New ipc definition. * vm/vm_user.c (vm_get_advice_info): New function.
2012-10-28Add IPC functions that allow user to manipulate with memory advice.Maksym Planeta
* include/mach/mach_types.defs (vm_advice_t): New type definition. * include/mach/mach.defs (vm_advise): New RPC definition. (memory_object_set_advice): Likewise. (memory_object_get_advice): Likewise. * kern/ipc_mig.c (syscall_vm_advice): New function. This is optimization function for RPC that is processed by kernel. * kern/syscall_sw.c (syscall_vm_advice): Add function prototype. (mach_trap_table): Add syscall_vm_advice to trap table. * vm/memory_object.c (memory_object_set_advice): New function. Sets memory advice for memory object. (memory_object_get_advice): New function. Returns memory advice of memory object. * vm/vm_user.c (vm_advise): New function. Wrapper for vm_map_advice. * vm/vm_map.h (vm_map_advice): Add function prototype. * vm/vm_map.c (vm_map_advice): New function. Sets memory advice for memory range.
2012-10-08Add memory advice attribute to memory object and entry.Maksym Planeta
* include/mach/vm_advice.h: New file with some definitions used for making memory advice. (vm_advice_t): Enumeration that is used to denote memory advice. (VM_ADVICE_MAX_READAHEAD): New macro, that denotes maximal size of cluster to be read. (struct vm_advice_entry): Structure that keeps number of pages to be read before and after the page where fault occurred for some specific memory advice. * Makefrag.am (include_mach_HEADERS): Add file vm_advice.h. * include/mach/mach_types.h: Include header mach/vm_advice.h. * vm/vm_map.h: Include mach/vm_advice.h. (struct vm_map_entry): Add advice to map entry attributes. * vm/vm_map.c (vm_map_find_entry): Add advice to new entry template. (vm_map_enter): Likewise. * vm/vm_object.h: Include mach/vm_advice.h. (struct vm_object): Add advice to memory object attributes. * vm/vm_object.c (vm_object_bootstrap): Add advice to object template.
2012-04-27Augment VM maps with a red-black treeRichard Braun
* vm/vm_map.c: Add #include <kern/rbtree.h>. (vm_map_setup): Initialize the map red-black tree. (vm_map_entry_cmp_lookup): New function. (vm_map_entry_cmp_insert): Likewise. (_vm_map_entry_link): Insert map entry in the red-black tree. (_vm_map_entry_unlink): Remove map entry from the red-black tree. (vm_map_lookup_entry): Rework the way the VM map hint is used, and replace the linear search with a binary search tree lookup. (vm_map_copy_insert): Move map entries from the map copy tree to the destination map tree. (vm_map_copyin): Initialize the map copy red-black tree. * vm/vm_map.h: Add #include <kern/rbtree.h>. (vm_map_entry): Add `tree_node' member. (vm_map_header): Add `tree' member.
2012-03-09Use unsigned long for addresses and sizesSamuel Thibault
TODO: remonter formats * i386/include/mach/i386/vm_types.h (vm_offset_t): Define to unsigned long. (signed32_t): Define to signed int. (unsigned32_t): Define to unsigned int. * i386/include/mach/sa/stdarg.h (__va_size): Use sizeof(unsigned long)-1 instead of 3. * include/mach/port.h (mach_port_t): Define to vm_offset_t instead of natural_t. * include/sys/types.h (size_t): Define to unsigned long instead of natural_t. * linux/src/include/asm-i386/posix_types.h (__kernel_size_t): Define to unsigned long. (__kernel_ssize_t): Define to long. * linux/src/include/linux/stddef.h (size_t): Define to unsigned long. * device/dev_pager.c (dev_pager_hash): Cast port to vm_offset_t insted of natural_t. (device_pager_data_request): Fix format. * device/ds_routines.c (ds_no_senders): Fix format. * i386/i386/io_map.c (io_map): Likewise. * i386/i386at/autoconf.c (take_dev_irq): Likewise. * i386/i386at/com.c (comattach): Likewise. * i386/i386at/lpr.c (lprattach): Likewise. * i386/i386at/model_dep.c (mem_size_init, mem_size_init, c_boot_entry): Likewise. * i386/intel/pmap.c (pmap_enter): Likewise. * ipc/ipc_notify.c (ipc_notify_port_deleted, ipc_notify_msg_accepted, ipc_notify_dead_name): Likewise. * ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Likewise. * kern/ipc_kobject.c (ipc_kobject_destroy): Likewise. * kern/slab.c (kalloc_init): Likewise. * vm/vm_fault.c (vm_fault_page): Likewise. * vm/vm_map.c (vm_map_pmap_enter): Likewise. * xen/block.c (device_read): Likewise. * device/net_io.c (bpf_match): Take unsigned long * instead of unsigned int *. (bpf_do_filter): Make mem unsigned long instead of long. * i386/i386/ktss.c (ktss_init): Cast pointer to unsigned long instead of unsigned. * i386/i386/pcb.c (stack_attach, switch_ktss): Cast pointers to long instead of int. * i386/i386/trap.c (dump_ss): Likewise. * ipc/ipc_hash.c (IH_LOCAL_HASH): Cast object to vm_offset_t. * ipc/mach_msg.c (mach_msg_receive, mach_msg_receive_continue): Cast kmsg to vm_offset_t instead of natural_t. * kern/pc_sample.c (take_pc_sample): Cast to vm_offset_t instead of natural_t. * kern/boot_script.c (sym, arg): Set type of `val' field to long instead of int. (create_task, builtin_symbols, boot_script_parse_line, boot_script_define_function): Cast to long instead of int. * kern/bootstrap.c (bootstrap_create): Likewise. * kern/sched_prim.c (decl_simple_lock_data): Likewise. * kern/printf.c (vsnprintf): Set size type to size_t. * kern/printf.h (vsnprintf): Likewise. * vm/vm_map.h (kentry_data_size): Fix type to vm_size_t. * vm/vm_object.c (vm_object_pmap_protect_by_page): Fix size parameter type to vm_size_t.
2012-03-08Move kentry_data_size initial value to headerSamuel Thibault
* vm/vm_map.h (KENTRY_DATA_SIZE): Define macro. * vm/vm_map.c (kentry_data_size): Initialize to KENTRY_DATA_SIZE.
2011-12-17Remove arbitrary limits used by the zone systemRichard Braun
The zone allocator could limit the size of its zones to an arbitrary value set at zinit() time. There is no such parameter with the slab module. As a result of removing those limits, the kern/mach_param.h header becomes empty, and is simply removed altogether. * Makefrag.am (libkernel_a_SOURCES): Remove kern/mach_param.h. * i386/i386/fpu.c: Remove #include <kern/mach_param.h>. * i386/i386/machine_task.c: Likewise. * i386/i386/pcb.c: Likewise. * ipc/ipc_init.c: Likewise. (ipc_space_max): Remove variable. (ipc_tree_entry_max): Likewise. (ipc_port_max): Likewise. (ipc_pset_max): Likewise. * ipc/ipc_init.h (IPC_ZONE_TYPE): Remove macro. (ipc_space_max): Remove extern declaration. (ipc_tree_entry_max): Likewise. (ipc_port_max): Likewise. (ipc_pset_max): Likewise. * ipc/ipc_hash.c (ipc_hash_init): Don't use ipc_tree_entry_max to compute ipc_hash_global_size. * ipc/ipc_marequest.c: Remove #include <kern/mach_param.h>. (ipc_marequest_max): Remove variable. (ipc_marequest_init): Don't use ipc_marequest_max to compute ipc_marequest_size. (ipc_marequest_info): Return (unsigned int)-1 in maxp. * kern/act.c: Remove #include <kern/mach_param.h>. * kern/mach_clock.c: Likewise. * kern/priority.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * vm/memory_object_proxy.c: Likewise. * vm/vm_fault.c: Likewise.
2011-12-17Fix kern/kalloc.h includesRichard Braun
* device/dev_pager.c: Remove #include <kern/kalloc.h>. * i386/i386/io_perm.c: Add #include <kern/kalloc.h>. * kern/bootstrap.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/pc_sample.c: Likewise. * kern/processor.c: Likewise. * kern/server_loop.ch: Likewise. * kern/thread.c: Likewise. * linux/dev/glue/block.c: Likewise. * linux/dev/glue/net.c: Likewise. * vm/vm_map.c: Likewise. * xen/block.c: Likewise. * xen/net.c: Likewise. * xen/store.c: Likewise.
2011-12-17Adjust VM initializationRichard Braun
Unlike the zone allocator, the slab code can't be fed with an initial chunk of memory. Some VM objects used early during startup now have to be statically allocated, and kernel map entries need a special path to avoid recursion when being allocated. * vm/vm_map.c (vm_submap_object_store): New variable. (vm_submap_object): Point to vm_submap_object_store. (kentry_data_size): Initialize to arbitrary value. (kentry_count): Remove variable. (kentry_pagealloc): New function. (vm_map_setup): Likewise. (vm_map_create): Replace initialization with a call to vm_map_setup(). * vm/vm_map.h (vm_map_setup): New prototype. * vm/vm_kern.c (kernel_map_store): New variable. (kernel_map): Point to kernel_map_store. (kmem_suballoc): Remove function. Replaced with... (kmem_submap): New function. (kmem_init): Call vm_map_setup() instead of vm_map_create(). * vm/vm_kern.h (kmem_suballoc): Remove prototype. (kmem_submap): New prototype. * vm/vm_object.c (kernel_object_store): New variable. (kernel_object): Point to kernel_object_store. (vm_object_template): Change type from vm_object_t to struct vm_object. (_vm_object_setup): New function. (_vm_object_allocate): Replace initialization with a call to _vm_object_setup(). (vm_object_bootstrap): Don't allocate vm_object_template, and use it as a structure instead of a pointer. Initialize kernel_object and vm_submap_object with _vm_object_setup() instead of _vm_object_allocate(). * vm/vm_resident.c (vm_page_bootstrap): Don't initialize kentry_data_size. * device/ds_routines.c (device_io_map_store): New variable. (device_io_map): Point to device_io_map_store. (mach_device_init): Call kmem_submap() instead of kmem_suballoc(). * ipc/ipc_init.c (ipc_kernel_map_store): New variable. (ipc_kernel_map): Point to ipc_kernel_map_store.
2011-12-17Adjust the kernel to use the slab allocatorRichard Braun
* device/dev_lookup.c: Replace zalloc header, types and function calls with their slab counterparts. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/io_req.h: Likewise. * device/net_io.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_perm.c: Likewise. * i386/i386/machine_task.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/task.h: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/pmap.h: Remove #include <kernel/zalloc.h>. * include/mach_debug/mach_debug.defs (host_zone_info): Replace routine declaration with skip directive. (host_slab_info): New routine declaration. * include/mach_debug/mach_debug_types.defs (zone_name_t) (zone_name_array_t, zone_info_t, zone_info_array_t): Remove types. (cache_info_t, cache_info_array_t): New types. * include/mach_debug/mach_debug_types.h: Replace #include <mach_debug/zone_info.h> with <mach_debug/slab_info.h>. * ipc/ipc_entry.c: Replace zalloc header, types and function calls with their slab counterparts. * ipc/ipc_entry.h: Likewise. * ipc/ipc_init.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/ipc_table.c (kalloc_map): Remove extern declaration. * kern/act.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/kalloc.h: Add #include <vm/vm_types.h>. (MINSIZE): Remove definition. (kalloc_map): Add extern declaration. (kget): Remove prototype. * kern/mach_clock.c: Adjust comment. * kern/processor.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/startup.c: Remove #include <kernel/zalloc.h>. * kern/task.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/thread.c: Likewise. * vm/memory_object_proxy.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_init.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_page.h: Remove #include <kernel/zalloc.h>. * vm/vm_pageout.c: Replace zalloc header, types and function calls with their slab counterparts. * vm/vm_resident.c: Likewise. (zdata, zdata_size): Remove declarations. (vm_page_bootstrap): Don't steal memory for the zone system.
2011-09-06Further prototyping work for memory_object_proxy.c functions.Thomas Schwinge
* vm/memory_object_proxy.h: Add #includes. (memory_object_proxy_lookup): New declaration. * vm/memory_object_proxy.c: #include <vm/memory_object_proxy.h>. * vm/vm_user.c: Likewise. (memory_object_proxy_lookup): Drop declaration. Parts based on a patch by Fridolín Pokorný <fridolin.pokorny@gmail.com>.
2011-09-05Free memory used by boot modulesSamuel Thibault
* vm/vm_resident.c (pmap_startup): Warn when some pages could not be included in the allocator due to bad estimation. * kern/bootstrap.c: Include <vm/pmap.h>. (bootstrap_create): Call vm_page_create on bootstrap modules content.
2011-09-03Add prototypes for memory_object_proxy.c functionsFridolín Pokorný
* vm/memory_object_proxy.h: Add file. * vm/vm_init.c: Include <vm/memory_object_proxy.h>. * kern/ipc_kobject.c: Likewise. * Makefile.am (libkernel_a_SOURCES): Add vm/memory_object_proxy.h.
2011-09-02Remove long obsolete RPC routinesGuillem Jover
* kern/compat_xxx_defs.h: Remove file. * Makefrag.am (libkernel_a_SOURCES): Remove `kern/compat_xxx_defs.h'. * include/mach/mach_types.defs (xxx_emulation_vector_t): Remove type. * device/device.srv: Do not simport <kern/compat_xxx_defs.h>. * kern/mach.srv: Likewise. * kern/mach_host.srv: Likewise. * include/device/device.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (xxx_device_set_status, xxx_device_get_status) (xxx_device_set_filter): Replace routine declarations with skip directives. * include/mach/mach.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (xxx_memory_object_lock_request, xxx_task_get_emulation_vector) (xxx_task_set_emulation_vector, xxx_host_info, xxx_slot_info) (xxx_cpu_control, xxx_task_info, xxx_thread_get_state) (xxx_thread_set_state, xxx_thread_info): Replace routine declarations with skip directive. * include/mach/mach_host.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (yyy_host_info, yyy_processor_info, yyy_processor_control) (xxx_processor_set_default_priv, yyy_processor_set_info): Replace routine declarations with skip directive. * kern/ipc_host.c (xxx_processor_set_default_priv): Remove function. * kern/machine.c (xxx_host_info, xxx_slot_info) (xxx_cpu_control): Likewise. * kern/syscall_emulation.c (xxx_task_set_emulation_vector) (xxx_task_get_emulation_vector): Likewise. * vm/memory_object.c (xxx_memory_object_lock_request): Likewise.
2011-08-27Initialize the new map entry when it's a projected bufferGuillem Jover
* vm/vm_map.c (vm_map_fork): Call vm_map_entry_create for projected_on buffers too.
2011-08-27Remove unused variablesGuillem Jover
* vm/memory_object_proxy.c (memory_object_create_proxy): Remove unused `kr' variable. * linux/dev/glue/block.c (free_buffer): Remove unused `i' variable. (register_blkdev): Remove unused `err' variable. (unregister_blkdev): Likewise. (bread): Likewise. (init_partition): Likewise. * linux/dev/glue/net.c (device_write): Likewise.
2011-08-27Add header for printf prototypeGuillem Jover
* vm/memory_object_proxy.c: Include <kern/printf.h>.
2011-05-09Do not warn on vm_map_enter with fixed address failingSamuel Thibault
* vm/vm_map.c (vm_map_enter): Warn about missing room in map only if anywhere is set.
2011-04-22Warn once when part of the kernel is lacking spaceSamuel Thibault
* ipc/ipc_entry.c (ipc_entry_get, ipc_entry_grow_table): Warn when returning KERN_NO_SPACE. * vm/vm_map.c (vm_map_find_entry, vm_map_enter, vm_map_copyout, vm_map_copyout_page_list): Warn when returning KERN_NO_SPACE.
2011-04-20Warn once when part of the kernel is lacking memorySamuel Thibault
* kern/printf.h (printf_once): New macro. * ipc/mach_port.c (mach_port_names, mach_port_get_set_status): Warn when returning KERN_RESOURCE_SHORTAGE. * vm/vm_kern.c: Include printf.h. (kmem_alloc, kmem_realloc, kmem_alloc_wired, kmem_alloc_aligned, kmem_alloc_pageable): Warn when failing. * vm/vm_resident.c (vm_page_grab_contiguous_pages): Warn when returning KERN_RESOURCE_SHORTAGE.
2009-12-21Add a SoftDebugger functionSamuel Thibault
* kern/debug.h (SoftDebugger): Add prototype. * kern/debug.c (Debugger): Move code invoking debugging trap to... (SoftDebugger): ... new function. Print the passed message. * kern/lock_mon.c (decl_simple_lock_data, retry_bit_lock): Call SoftDebugger instead of Debugger. * device/ds_routines.c (ds_device_open, device_read, device_read_inband): Call SoftDebugger instead of Debugger. * i386/i386at/model_dep.c (c_boot_entry): Call SoftDebugger instead of Debugger. * kern/syscall_sw.c (null_port, kern_invalid): Call SoftDebugger instead of Debugger. * vm/vm_object.c (vm_object_collapse): Call SoftDebugger instead of Debugger.
2009-12-18Add missing castsGuillem Jover
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Cast `prevmemp' assignement to vm_page_t.
2009-11-28Fix commit d088a062Samuel Thibault
* vm/memory_object_proxy.c: New file.
2009-11-28Add memory object proxiesSamuel Thibault
Memory object proxies permit to replicate objects with different parameters, like reduced privileged, different offset, etc. They are e.g. essential for properly managing memory access permissions. 2005-06-06 Marcus Brinkmann <marcus@gnu.org> * include/mach/mach4.defs: Add memory_object_create_proxy interface. * Makefile.in (vm-cfiles): Add memory_object_proxy.c. * i386/include/mach/i386/vm_types.h (vm_offset_array_t): New type. * include/mach/memory_object.h (memory_object_array_t): New type. * vm/memory_object_proxy.c: New file. * kern/ipc_kobject.h: New macro IKOT_PAGER_PROXY. Bump up macros IKOT_UNKNOWN and IKOT_MAX_TYPE. * kern/ipc_kobject.c (ipc_kobject_notify): Call memory_object_proxy_notify for IKOT_PAGER_PROXY. * vm/vm_init.c (vm_mem_init): Call memory_object_proxy_init. * vm/vm_user.c (vm_map): Implement support for proxy memory objects.
2009-11-11Fix a bug in vm_page_grab_contiguous_pages.Zheng Da
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Maintain the free vm page queue correctly.
2009-10-20Fix warningsSamuel Thibault
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Remove unused count_zeroes and not_found_em labels.
2009-10-20Fix warningSamuel Thibault
* vm/vm_pageout.c (vm_pageout_scan): Remove unused Restart label.
2009-10-20Fix warningSamuel Thibault
* vm/vm_map.c (vm_map_lookup): Add braces to fix readability.
2009-10-14Update constants to nowadays standardsSamuel Thibault
kern/zalloc.c (zone_map_size): Increase to 64MiB. i386/i386at/model_dep.c (mem_size_init): Reduce cap to 1/6 of memory space to save room for zalloc area. linux/src/drivers/block/ide.h (INITIAL_MULT_COUNT): Set to 16. vm/vm_map.h (VM_MAP_COPY_PAGE_LIST_MAX): Set to 64. vm/vm_object.c (vm_object_cached_max): Set to 4000.
2009-10-14Fix return with lock heldSamuel Thibault
vm/vm_map.c (vm_map_copy_overwrite): Unlock dst_map before returning.
2009-10-14Fix return with lock heldSamuel Thibault
vm/vm_map.c (vm_map_enter): Use RETURN instead of return to unlock the map before returning.
2009-06-182008-12-05 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
* vm/vm_fault.c (vm_fault_page): Print value returned memory_object_data_request as %x instead of %d.
2009-06-182008-11-15 Shakthi Kannan <shakshurd@gmail.com>Samuel Thibault
* device/ds_routines.h (device_reference, device_deallocate): Add function prototypes. * kern/task.c (task_create): Moved unused i variable inside FAST_TAS. * vm/vm_map.h (vm_map_copy_page_discard): Add function prototype. * vm/vm_kern.c (projected_buffer_deallocate): Give &map->hdr instead of map to _vm_map_clip_start and _vm_map_clip_end functions. 2008-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> * device/device_emul.h (device_emulation_ops): Turn back reference, dealloc, dev_to_port, write_trap and writev_trap into taking a void*, as they do not always take a mach_device_t. * device/ds_routines.c (mach_device_emulation_ops): Cast mach_device_reference, mach_device_deallocate, mach_convert_device_to_port, device_write_trap and device_writev_trap to (void*) to make them accept a void* argument. * linux/pcmcia-cs/glue/ds.c (device_deallocate): Rename function into... (ds_device_deallocate): ... this. (dev_to_port): Call ds_device_deallocate instead of device_deallocate. (linux_pcmcia_emulation_ops): Use ds_device_deallocate instead of device_deallocate, cast mach_device_reference to (void*) to make it accept a void* argument.
2009-06-182008-07-20 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
* linux/pcmcia-cs/glue/wireless_glue.h (schedule_task): Add parameter to Debugger() call. * kern/lock_mon.c (retry_simple_lock, retry_bit_lock): Likewise. * kern/machine.c (Debugger): Remove declaration. 2008-07-19 Barry deFreese <bddebian@comcast.net> * device/dev_hdr.h (dev_name_lookup, dev_set_indirection): Add prototypes. * device/dev_pager.c: Include <vm/vm_user.h>. * device/ds_routines.c: Likewise. * device/subrs.c: Likewise. * device/device_init.c: Include <device/tty.h>. * device/ds_routines.h (iowait): Add prototype. * device/net_io.h (net_kmsg_collect): Add prototype. * device/net_io.c (hash_ent_remove, net_free_dead_infp, net_free_dead_entp, bpf_validate, bpf_eq, net_add_q_info, bpf_match): Add forward declarations. * device/subrs.h: New header. * i386/i386/fpu.h: Include <sys/types.h>. Change <i386/thread.h> include to <kern/thread.h>. (fp_save, fp_load, fp_free, fpu_module_init, fpu_set_state, fpu_get_state, fpnoextflt, fpextovrflt, fpexterrflt, init_fpu): Add prototypes. * i386/i386/gdt.h (gdt_init): Add prototype. * i386/i386/io_map.c: Include <vm/pmap.h>. * vm/vm_kern.c: Likewise. * i386/i386/ktss.h (ktss_init): Add prototype. * i386/i386/ldt.h (ldt_init): Add prototype. * i386/i386/loose_ends.h: New header. * i386/i386/loose_ends.c (delay): Complete prototype. * i386/i386/model_dep.h (startrtclock): Add prototype. * i386/i386/pcb.h (load_context, stack_attach, stack_detach, switch_ktss): Add prototypes. * i386/i386/pic.h (form_pic_mask, picinit): Add prototypes. * i386/i386/pit.c: Include <i386/pic.h>. * i386/i386at/kd_mouse.c: Likewise. * i386/i386/pit.h (clkstart): Add prototype. * i386/i386/trap.c: Include <i386/fpu.h>, <intel/read_fault.h>, <vm/vm_fault.h>. * i386/i386/trap.h (interrupted_pc): Add prototype. * i386/i386/user_ldt.c: Include <i386/pcb.h>. * i386/i386at/autoconf.h: New header. * i386/i386at/com.h: New header. * i386/i386at/com.c: Include <i386at/autoconf.h>, <i386at/com.h>. * i386/i386at/idt.h (idt_init): Add prototype. * i386/i386at/int_init.h: New header. * i386/i386at/kd.c: Include <i386/loose_ends.h>. * kern/debug.c: Likewise. * i386/i386at/kd_event.c: Include <device/ds_routines.h>. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/kd_mouse.c: Include <device/subrs.h>, <i386at/com.h>. * i386/i386at/lpr.c: Include <i386at/autoconf.h> * i386/i386at/model_dep.c: Include: <i386/fpu.h>, <i386/gdt.h>, <i386/ktss.h>, <i386/ldt.h>, <i386/pic.h>, <i386/pit.h>, <i386at/autoconf.h>, <i386at/idt.h>, <i386at/int_init.h>, <i386at/kd.h>, <i386at/rtc.h>. * i386/i386at/rtc.h (readtodc, writetodc): Add prototypes. * i386/intel/pmap.h: Include <mach/vm_prot.h>. (pmap_bootstrap, pmap_unmap_page_zero, pmap_zero_page, pmap_copy_page, kvtophys): Add prototypes. * i386/intel/read_fault.h: New header. * kern/ast.h (ast_init, ast_check): Add prototypes. * kern/debug.c (Debugger): Move prototype to... * kern/debug.h (Debugger): ... here. * kern/eventcount.h (evc_notify_abort): Add prototype. * kern/ipc_mig.c: Include <kern/syscall_subr.h>, <kern/ipc_tt.h>, <device/ds_routines.h> * kern/ipc_mig.h: New header. * kern/ipc_tt.h (mach_reply_port): Add prototype. * kern/machine.h: New header. * kern/processor.h (pset_sys_bootstrap): Move prototype outside of MACH_HOST check. * kern/sched_prim.h (thread_bind, compute_priority, thread_timeout_setup): Add prototypes. * kern/startup.c: Include <kern/machine.h>, <machine/pcb.h>. * kern/syscall_subr.c: Include <kern/syscall_subr.h>. (thread_depress_abort): Remove prototype. * kern/syscall_subr.h: Include <sys/types.h>, <mach/mach_types.h> (thread_depress_abort): Add prototype. * kern/syscall_sw.c: Include: <kern/debug.h>. * kern/task.h (consider_task_collect): Add prototype. * kern/thread.c: Include <kern/eventcount.h>, <kern/ipc_mig.h>, <kern/syscall_subr.h>. * kern/thread.h (stack_collect): Add prototype. * linux/pcmcia-cs/glue/pcmcia_glue.h (Debugger): Remove prototype. * util/putchar.c: Include <device/cons.h>. * util/putchar.h: New header. * util/puts.c: Include <device/cons.h>, <util/putchar.h>. * vm/memory_object.c: Include <vm/vm_map.h>. (memory_object_data_provided): Move function below memory_object_data_supply definition. * vm/vm_init.c: Include <vm/vm_fault.h>. * vm/vm_kern.h (projected_buffer_in_range): Add prototype. * vm/vm_map.c: Include <vm/pmap.h>, <vm/vm_resident.h>. (vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard): Add forward declaration. * vm/vm_map.h (vm_map_copyin_object, vm_map_submap, _vm_map_clip_start, _vm_map_clip_end): Add prototypes. * vm/vm_pageout.c: Include <device/net_io.h>, <kern/task.h>, <machine/locore.h>. * vm/vm_resident.h: New header. * vm/vm_user.c: Include <vm/vm_kern.h>. * vm/pmap.h (pmap_pageable, pmap_map_bd): Add prototype.
2009-06-182008-07-15 Barry deFreese <bddebian@comcast.net>Samuel Thibault
* device/dev_pager.c (device_pager_data_request, device_pager_data_request_done, device_pager_init_pager): Fix printf formats. * i386/i386/debug_i386.c (dump_ss): Likewise. * i386/i386/trap.c (user_trap): Likewise. * i386/i386at/com.c (comtimer): Likewise. * ipc/ipc_notify (ipc_notify_port_deleted, ipc_notify_msg_accepted, ipc_notify_port_destroyed, ipc_notify_no_senders, ipc_notify_send_once, ipc_notify_dead_name): Likewise. * kern/ipc_kobject.c (ipc_kobject_destroy): Likewise. * kern/sched_prim.c (do_runq_scan): Likewise. * linux/pcmcia-cs/clients/smc91c92_cs.c (smc_start_xmit): Likewise. * linux/src/drivers/net/sundance.c (start_tx): Likewise. * vm/vm_fault.c (vm_fault_page): Likewise. * vm/vm_map.c (vm_map_pmap_enter): Likewise. * vm/vm_object.c (vm_object_collapse): Likewise.
2009-06-182008-07-15 Barry deFreese <bddebian@comcast.net>Samuel Thibault
* i386/i386/model_dep.h: New header. * i386/i386at/model_dep.c: Include <i386/model_dep.h>. * kern/debug.c: Include <machine/model_dep.h>. * kern/mach_clock.c: Likewise. * kern/sched_prim.c: Likewise. * kern/startup.c: Likewise. * kern/machine.c: Likewise. (halt_cpu): Remove prototype. * vm/pmap.h (pmap_grab_page): Add prototype.