Age | Commit message (Collapse) | Author |
|
* vm/vm_map.c (vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard, vm_map_lookup_entry): Remove forward declarations.
* vm/vm_map.h (vm_map_delete, vm_map_copyout_page_list, vm_map_copy_page_discard, vm_map_lookup_entry): Add prototypes.
|
|
* vm/vm_object.c (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Remove forward declarations.
* vm/vm_object.h (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Add prototypes.
|
|
* ddb/db_break.c: Remove register qualifiers.
* i386/i386/pcb.c: Likewise.
* i386/i386at/com.c: Likewise.
* i386/i386at/lpr.c: Likewise.
* i386/intel/pmap.c: Likewise.
* kern/machine.c: Likewise.
* kern/queue.h: Likewise.
* kern/sched_prim.c: Likewise.
* kern/sched_prim.h: Likewise.
* kern/timer.c: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_resident.h: Likewise.
|
|
* ddb/db_write_cmd.h: Add copyright.
* ipc/ipc_print.h: Likewise.
* vm/vm_print.h: Likewise.
|
|
* i386/Makefrag.am: Remove i386/i386/vm_tuning.h.
* i386/i386/vm_tuning.h: Remove file.
* vm/vm_pageout.c: Don't include i386/i386/vm_tuning.h.
|
|
* vm/vm_user.c: Remove register qualifiers.
|
|
* vm/vm_resident.c: Remove register qualifiers.
|
|
* vm/vm_pageout.c: Remove register qualifiers.
|
|
* vm/vm_object.c: Remove register qualifiers.
|
|
* vm/vm_map.c: Remove register qualifiers.
|
|
* vm/vm_map.c: Trivial stylistic fix for consistency.
|
|
* vm/vm_kern.c: Remove register qualifiers.
|
|
* vm/vm_fault.c: Remove register qualifiers.
|
|
* vm/vm_fault.c: Remove unused variable.
|
|
* vm/memory_object_proxy.h (_VM_MEMORY_OBJECT_PROXY_H_): Fix definition.
|
|
* vm/memory_object.c: Remove register qualifiers.
|
|
|
|
* vm/vm_map.h (KENTRY_DATA_SIZE): Set to 256 pages.
|
|
* vm/vm_print.h: New file.
Include <vm/vm_map.h>.
Include <machine/db_machdep.h>.
(vm_map_print): Add prototype.
(vm_map_copy_print): Likewise.
(vm_object_print): Likewise.
(vm_page_print): Likewise.
Include <vm/vm_object.h>.
Include <vm/vm_page.h>
* vm/vm_map.h (vm_map_print): Remove prototype.
* vm/vm_map.c [MACH_KDB]: Include <vm/vm_print.h>.
* vm/vm_object.h (vm_object_print): Remove prototype.
* vm/vm_object.c [MACH_KDB]: Include <vm/vm_print.h>.
* vm/vm_resident.c [MACH_KDB]: Include <vm/vm_print.h>.
|
|
* vm/vm_resident.c (pmap_startup): Fix printf format.
* xen/block.c (hyp_block_init, device_write): Likewise.
* xen/net.c (hyp_net_init): Likewise.
|
|
* vm/vm_fault.c (vm_fault_page): Properly increment
current_task()->zero_fills and cow_faults.
|
|
* ipc/ipc_mqueue.c (ipc_mqueue_send, ipc_mqueue_receive): Increment
counters for message sent and received.
* kern/ipc_kobject.c (ipc_kobject_server): Increment sent and received
counters for the kernel task.
* kern/task.c (task_create): Zero statistics.
* kern/task.c (task_info): Add task_events_info call.
* kern/task.h: Add statistics.
* vm/vm_fault.c (vm_fault_page): Increment zero_fills, pageins,
reactivations and cow_faults counters.
* vm/vm_fault.c (vm_fault_wire_fast): Increment faults counters.
* vm/vm_pageout.c (vm_pageout_scan): Increment reactivations counter.
|
|
* vm/vm_map.h (KENTRY_DATA_SIZE): Bump from 32 pages to 64 pages.
|
|
When kernel debugger support is requested ipc and vm need
the prototype for the debugger function kdbprintf.
* ddb/db_output.h: Add prototype for kdbprintf.
* ipc/ipc_object.c: Add include file ddb/db_output.h
* ipc/ipc_port.c: Likewise.
* ipc/ipc_pset.c: Likewise.
* vm/vm_map.c: Likewise.
* vm/vm_object.c: Likewise.
* vm/vm_resident.c: Likewise.
|
|
* vm/vm_map.c (vm_map_enter): return KERN_INVALID_ARGUMENT if size is 0.
* vm/vm_user.c (vm_map): Likewise.
|
|
* Makefrag.am (EXTRA_DIST): Add kern/gnumach.srv.
(include_mach_HEADERS): Add include/mach/gnumach.defs and
include/mach/vm_cache_statistics.h
(nodist_libkernel_a_SOURCES): Add kern/gnumach.server.defs.c,
kern/gnumach.server.h, kern/gnumach.server.c, kern/gnumach.server.msgids,
kern/gnumach.server.defs.
* include/mach/mach_types.h: Add #include <mach/vm_cache_statistics.h>.
* kern/ipc_kobject.c (ipc_kobject_server): Declare and call
gnumach_server_routine.
* vm/vm_object.c (vm_object_cached_pages): New variable.
(vm_object_cached_pages_lock_data): Likewise.
(vm_object_deallocate): Update number of cached pages.
(vm_object_lookup): Likewise.
(vm_object_lookup_name): Likewise.
(vm_object_destroy): Likewise.
(vm_object_enter): Likewise.
* vm/vm_object.h (ref_count): Declare as int.
(resident_page_count): Likewise.
(vm_object_cached_count): Add extern declaration.
(vm_object_cached_pages): Likewise.
(vm_object_cached_pages_lock_data): Likewise.
(vm_object_cached_pages_update): New macro.
* vm/vm_resident.c (vm_page_insert): Assert resident page count doesn't
overflow, update number of cached pages as appropriate.
(vm_page_replace): Likewise.
(vm_page_remove): Update number of cached pages as appropriate.
* vm/vm_user.c: Add #include <mach/vm_cache_statistics.h>.
(vm_cache_statistics): New function.
* vm/vm_user.h: Add #include <mach/mach_types.h>.
(vm_cache_statistics): New declaration.
* include/mach/gnumach.defs: New file.
|
|
* 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.
|
|
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.
|
|
* vm/vm_map.h (KENTRY_DATA_SIZE): Define macro.
* vm/vm_map.c (kentry_data_size): Initialize to KENTRY_DATA_SIZE.
|
|
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.
|
|
* 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.
|
|
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.
|
|
* 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.
|
|
* 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>.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* vm/vm_map.c (vm_map_fork): Call vm_map_entry_create for projected_on
buffers too.
|
|
* 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.
|
|
* vm/memory_object_proxy.c: Include <kern/printf.h>.
|
|
* vm/vm_map.c (vm_map_enter): Warn about missing room in map only if
anywhere is set.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Cast `prevmemp'
assignement to vm_page_t.
|
|
* vm/memory_object_proxy.c: New file.
|
|
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.
|
|
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Maintain the free vm page queue correctly.
|
|
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Remove unused
count_zeroes and not_found_em labels.
|
|
* vm/vm_pageout.c (vm_pageout_scan): Remove unused Restart label.
|