summaryrefslogtreecommitdiff
path: root/vm/vm_resident.c
AgeCommit message (Collapse)Author
2015-08-26the object is locked, i checkedpmm-2015-08-26Justus Winter
2015-08-26remove calls to vm_page_init, they are actually hurting hereJustus Winter
2015-08-26fix vm_page initializationJustus Winter
2015-08-26XXX pmm from x15, userspace crashes soonJustus Winter
2015-08-26kern/slab: directmap updateRichard Braun
The main impact of the direct physical mapping on the kmem module is the slab size computation. The page allocator requires the allocation size to be a power-of-two above the page size since it uses the buddy memory allocation algorithm. Custom slab allocation functions are no longer needed since the only user was the kentry area, which has been removed recently. The KMEM_CACHE_NOCPUPOOL flag is also no longer needed since CPU pools, which are allocated from a kmem cache, can now always be allocated out of the direct physical mapping.
2015-08-20codify locking contractsJustus Winter
Conflicts: vm/vm_page.h
2015-08-20yyy vm: turn page queue lock into a general lockJustus Winter
2015-02-18vm: fix typoJustus Winter
* vm/vm_resident.c: Fix typo.
2013-12-20Declare void argument lists (part 2)Marin Ramesa
Declare void argument lists that were not declared in the first part of this patch and * kern/sched_prim.h (recompute_priorities): Fix prototype. * kern/startup.c (setup_main) (recompute_priorities): Fix call.
2013-12-17vm: qualify pointers whose dereferenced values are constant with constMarin Ramesa
2013-12-15vm/vm_resident.c (vm_page_print): remove unnecessary castsMarin Ramesa
Members offset and phys_addr are of vm_offset_t types. * vm/vm_resident.c (vm_page_print) (offset, phys_addr): Remove unnecessary casts.
2013-12-05vm/vm_resident.c: correct commentMarin Ramesa
This is vm_resident.c, not vm_page.c. * vm/vm_resident.c: Correct comment.
2013-11-15vm/vm_resident.c: remove register qualifiersMarin Ramesa
* vm/vm_resident.c: Remove register qualifiers.
2013-07-18vm: organize vm print function prototypesMarin Ramesa
* 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>.
2013-06-04Fix format warningsMiguel Figueiredo
* 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.
2013-01-04Fix compilation warning implicit function declaration kdbprintfDavid Höppner
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.
2012-09-23Provide basic page cache statisticsRichard Braun
* 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.
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-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-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-18Add missing castsGuillem Jover
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Cast `prevmemp' assignement to vm_page_t.
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-06-182006-12-30 Richard Braun <syn@hurdfr.org>Samuel Thibault
Add alignment support in the zone allocator. * kern/zalloc.c (ALIGN_SIZE_UP): New macro. (zinit): New `align' parameter. (zget_space): Likewise. (zalloc): Updated call to zget_space() with the zone alignment. * kern/zalloc.h (zone): New member `align'. (zinit): Declaration updated as required. * device/dev_lookup.c (dev_lookup_init): Updated call to zinit() with alignment of 0. * device/dev_pager.c (dev_pager_hash_init): Likewise. (device_pager_init): Likewise. * device/ds_routines.c (ds_init): Likewise. (ds_trap_init): Likewise. * device/net_io.c (net_io_init): Likewise. * i386/i386/fpu.c (fpu_module_init): Likewise. * i386/i386/pcb.c (pcb_module_init): Likewise. * i386/intel/pmap.c (pmap_init): Likewise. * ipc/ipc_init.c (ipc_bootstrap): Likewise. * ipc/ipc_marequest.c (ipc_marequest_init): Likewise. * kern/act.c (global_act_init): Likewise. * kern/kalloc.c (kalloc_init): Likewise. * kern/processor.c (pset_sys_init): Likewise. * kern/task.c (task_init): Likewise. * kern/thread.c (thread_init): Likewise. * kern/zalloc.c (zone_bootstrap): Likewise. * vm/vm_external.c (vm_external_module_initialize): Likewise. * vm/vm_fault.c (vm_fault_init): Likewise. * vm/vm_map.c (vm_map_init): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_module_init): Likewise.
2009-06-182006-12-03 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
[patch #5019 --- ``Remove checks for continuations''] * DEVELOPMENT: Document the removal. * i386/configfrag.ac (CONTINUATIONS): Don't define. 2006-12-03 Leonardo Lopes Pereira <leonardolopespereira@gmail.com> [patch #5019 --- ``Remove checks for continuations''] * ipc/mach_msg.c: Adopt all users of CONTINUATIONS as if it were always defined. * kern/eventcount.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/syscall_subr.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_resident.c: Likewise.
2009-06-182006-11-10 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
Put "for panic()" in ChangeLog, not in source code.
2009-06-182006-11-09 Barry deFreese <bddebian@comcast.net>Samuel Thibault
[task #5726 --- ``GCC built-in functions''] * include/printf.h: Move file... * kern/printf.h: ... here. * kern/debug.h (panic_init, panic): Add prototypes. * chips/busses.c: Don't include `printf.h', include `kern/printf.h' and `kern/debug.h'. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_output.c: Likewise. * device/cirbuf.c: Likewise. * device/cons.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/device_init.c: Likewise. * device/dk_label.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/fpe_linkage.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/ast.c: Likewise. * kern/bootstrap.c: Likewise. * kern/debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/exception.c: Likewise. * kern/host.c: Likewise. * kern/ipc_host.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/kalloc.c: Likewise. * kern/lock.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/pc_sample.c: Likewise. * kern/printf.c: Likewise. * kern/processor.c: Likewise. * kern/sched_prim.c: Likewise. * kern/server_loop.ch: Likewise. * kern/startup.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * kern/thread_swap.c: Likewise. * kern/xpr.c: Likewise. * kern/zalloc.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_resident.c: Likewise.
2009-06-182006-11-07 Barry deFreese <bddebian@comcast.net>Samuel Thibault
[task #5726 --- ``GCC built-in functions''] * include/printf.h: New file. (printf_init, _doprnt, printnum, sprintf, printf, indent, iprint): New declarations. * include/string.h (strchr, strcmp, strcpy, strlen, strncmp, strncpy, strrchr, strsep): New extern declarations. * kern/strings.c: Don't include `kern/strings.h', include `string.h'. (strncmp, strncpy, strlen): Fix prototypes into using size_t. * kern/strings.h: Removed file. * kern/debug.c: Include `printf.h'. (do_cnputc): New function. (panic, log): Use do_cnputc instead of cnputc. * chips/busses.c: Don't include `kern/strings.h', include `printf.h' and `string.h'. (_doprnt): Remove extern declaration. (indent): Remove extern declaration. * chips/busses.c: Likewise. * ddb/db_aout.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_sym.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/dk_label.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_trace.c: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/bootstrap.c: Likewise. * kern/eventcount.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/pc_sample.c: Likewise. * kern/printf.c: Likewise. * kern/sched_prim.c: Likewise. * kern/thread.c: Likewise. * kern/zalloc.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
2009-06-182006-11-05 Barry deFreese <bddebian@comcast.net>Samuel Thibault
memcpy/memset cleanup. * include/string.h: New file. * include/mach/mig_support.h: Include `string.h'. [MACH_KERNEL] (bcopy): Remove extern declaration. [MACH_KERNEL] (memcpy): Remove macro. * device/cirbuf.c: Include `string.h'. (q_to_b, b_to_q): Replace bcopy() with memcpy() and bzero() with memset(), clean memcpy() and memset() invocation. * device/cons.c (cnputc): Likewise. * device/dev_pager.c (device_pager_data_request_done): Likewise. * device/ds_routines.c (device_write_get, ds_read_done): Likewise. * device/kmsg.c: Likewise. * device/net_io.c (net_filter, net_set_filter, net_getstat): Likewise. * i386/i386/fpu.c (fpu_set_state, fpu_get_state) fp_load) (fp_state_alloc): Likewise. * i386/i386/iopb.c (io_tss_init, i386_io_port_list): Likewise. * i386/i386/mp_desc.c (mp_desc_init): Likewise. * i386/i386/pcb.c (pcb_init, thread_setstatus) (thread_getstatus): Likewise. * i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys) (copy_from_phys): Likewise. * i386/i386/trap.c (v86_assist): Likewise. * i386/i386/user_ldt.c (i386_set_ldt, i386_get_ldt): Likewise. * i386/i386at/immc.c (immc_cnputc): Likewise. * i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Likewise. * i386/intel/pmap.c (pmap_init, pmap_page_table_page_alloc) (pmap_create): Likewise. * ipc/ipc_entry.c (ipc_entry_grow_table): Likewise. * ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel) (ipc_kmsg_put_to_kernel): Likewise. * ipc/ipc_object.c (ipc_object_alloc, ipc_object_alloc_name): Likewise. * ipc/ipc_port.c (ipc_port_dngrow): Likewise. * ipc/ipc_space.c: Likewise. * ipc/mach_debug.c (mach_port_space_info) (mach_port_space_info): Likewise. * kern/act.c (act_create): Likewise. * kern/boot_script.c: Likewise. * kern/bootstrap.c: Likewise. * kern/eventcount.c (evc_init): Likewise. * kern/host.c (host_info, host_processor_sets): Likewise. * kern/lock.c (lock_init): Likewise. * kern/lock_mon.c (lock_info_clear): Likewise. * kern/mach_clock.c (mapable_time_init): Likewise. * kern/pc_sample.c (get_sampled_pcs): Likewise. * kern/processor.c (processor_set_things): Likewise. * kern/syscall_emulation.c (task_set_emulation_vector_internal) (task_get_emulation_vector, xxx_task_get_emulation_vector): Likewise. * kern/task.c (task_threads): Likewise. * kern/xpr.c (xprbootstrap): Likewise. * kern/zalloc.c (host_zone_info): Likewise. * vm/vm_debug.c (mach_vm_object_pages): Likewise. * vm/vm_kern.c (projected_buffer_allocate, copyinmap) (copyoutmap): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_grab_contiguous_pages): Likewise.
2009-06-182006-10-15 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
[task #5956 --- ``Automake'ify GNU Mach's code base''] * kern/bootstrap.c: Don't include `bootstrap_symbols.h'. * ddb/db_command.c: Don't include `cpus.h'. * ddb/db_mp.c: Likewise. * i386/i386/ast_check.c: Likewise. * i386/i386/cswitch.S: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/fpu.h: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/mp_desc.h: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/trap.c: Likewise. * i386/intel/pmap.c: Likewise. * include/mach/machine.h: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * kern/ast.c: Likewise. * kern/ast.h: Likewise. * kern/cpu_number.h: Likewise. * kern/debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/host.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/lock.c: Likewise. * kern/lock.h: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/mach_factor.c: Likewise. * kern/machine.c: Likewise. * kern/priority.c: Likewise. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched.h: Likewise. * kern/sched_prim.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread.c: Likewise. * kern/timer.c: Likewise. * kern/timer.h: Likewise. * vm/vm_resident.c: Likewise. * kern/sched_prim.c: Don't include `fast_tas.h'. * kern/task.c: Likewise. * kern/task.h: Likewise. * kern/sched_prim.c: Don't include `hw_footprint.h'. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * kern/counters.c: Don't include `mach_counters.h'. * kern/counters.h: Likewise. * ddb/db_ext_symtab.c: Don't include `mach_debug.h'. * i386/i386/pcb.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/thread.c: Likewise. * kern/zalloc.c: Likewise. * kern/ast.c: Don't include `mach_fixpri.h'. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched.h: Likewise. * kern/sched_prim.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * kern/host.c: Don't include `mach_host.h'. * kern/ipc_sched.c: Likewise. * kern/machine.c: Likewise. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched_prim.c: Likewise. * kern/startup.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * include/mach/mach.defs: Don't include `mach_ipc_compat.h'. * include/mach/mach_param.h: Likewise. * include/mach/mach_traps.h: Likewise. * include/mach/message.h: Likewise. * include/mach/mig_errors.h: Likewise. * include/mach/notify.h: Likewise. * include/mach/port.h: Likewise. * include/mach/std_types.defs: Likewise. * include/mach/task_special_ports.h: Likewise. * include/mach/thread_special_ports.h: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_notify.h: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_right.c: Likewise. * ipc/ipc_right.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_msg.h: Likewise. * ipc/mach_port.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/syscall_sw.c: Likewise. * kern/thread.h: Likewise. * include/mach_debug/mach_debug.defs: Don't include `mach_ipc_debug.h'. * ipc/ipc_hash.c: Likewise. * ipc/ipc_hash.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_marequest.h: Likewise. * kern/ipc_kobject.c: Don't include `mach_ipc_test.h'. * ddb/db_access.c: Don't include `mach_kdb.h'. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_command.h: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * ddb/db_watch.h: Likewise. * ddb/db_write_cmd.c: Likewise. * i386/i386/db_disasm.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/db_trace.c: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/model_dep.c: Likewise. * include/mach_debug/mach_debug.defs: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * kern/bootstrap.c: Likewise. * kern/debug.c: Likewise. * kern/exception.c: Likewise. * kern/lock.c: Likewise. * kern/xpr.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise. * kern/lock.h: Don't include `mach_ldebug.h'. * kern/lock_mon.c: Don't include `mach_lock_mon.h'. * kern/ipc_kobject.c: Don't include `mach_machine_routines.h'. * kern/lock_mon.c: Don't include `mach_mp_debug.h'. * vm/memory_object.c: Don't include `mach_pagemap.h'. * vm/vm_fault.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * i386/i386/trap.c: Don't include `mach_pcsample.h'. * kern/mach4.srv: Likewise. * kern/mach_clock.c: Likewise. * kern/pc_sample.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * vm/vm_fault.c: Likewise. * device/net_io.c: Don't include `mach_ttd.h'. * i386/i386/kttd_interface.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * include/mach_debug/mach_debug.defs: Don't include `mach_vm_debug.h'. * vm/vm_debug.c: Likewise. * vm/vm_page.h: Likewise. * vm/vm_resident.c: Likewise. * kern/sched_prim.c: Don't include `power_save.h'. * kern/sched.h: Don't include `simple_clock.h'. * kern/sched_prim.c: Likewise. * kern/thread.c: Likewise. * kern/mach_clock.c: Don't include `stat_time.h'. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * kern/sched.h: Likewise. * kern/timer.c: Likewise. * kern/timer.h: Likewise. * kern/startup.c: Don't include `xpr_debug.h'. * kern/xpr.h: Likewise. * i386/i386at/autoconf.c: Don't include `com.h'. * i386/i386at/com.c: Likewise. * i386/i386at/conf.c: Likewise. * i386/i386at/cons_conf.c: Likewise. * i386/i386/fpe_linkage.c: Don't include `fpe.h'. * i386/i386/fpu.c: Likewise. * i386/i386/fpu.h: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Don't include `lpr.h'. * i386/i386at/conf.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386/cswitch.S: Don't include `platforms.h'. * i386/i386/fpu.c: Likewise. * i386/i386/gdt.c: Likewise. * i386/i386/hardclock.c: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/io_emulate.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/pic.h: Likewise. * i386/i386/pit.c: Likewise. * i386/i386/pit.h: Likewise. * i386/i386/seg.h: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/com.c: Don't include `rc.h' * i386/i386at/cons_conf.c: Likewise. * i386/i386at/pic_isa.c: Likewise. * device/ds_routines.c: Don't include <i386/linux/device-drivers.h>. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/linux/dev/include/linux/autoconf.h: Likewise. * linux/dev/arch/i386/kernel/setup.c: Likewise. * linux/dev/init/main.c: Likewise. * linux/pcmcia-cs/glue/pcmcia_glue.h: Likewise. * linux/pcmcia-cs/glue/wireless_glue.h: Likewise. * kern/lock_mon.c: Don't include <time_stamp.h>. * device/cons.c: Include <device/cons.h> instead of <cons.h>. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/cons_conf.c: Likewise. * i386/i386at/i386at_ds_routines.c: Include <device/device.server.h> instead of "device_interface.h". * device/chario.c: Include <device/device_reply.user.h> instead of "device_reply.h". * device/ds_routines.c: Likewise. * linux/dev/glue/block.c: Likewise. * linux/dev/glue/net.c: Likewise. * linux/pcmcia-cs/glue/ds.c: Likewise. * device/cons.c: Include <device/kmsg.h> instead of <kmsg.h>. * device/kmsg.c: Likewise. * i386/i386/cswitch.S: Include <i386/cpu_number.h> instead of "cpu_number.h". * i386/i386/locore.S: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * i386/i386/i386asm.sym: Include <i386/gdt.h> instead of "gdt.h". * i386/i386/idt.c: Likewise. * i386/i386at/int_init.c: Likewise. * i386/i386/cswitch.S: Include <i386/i386asm.h> instead of "i386asm.h". * i386/i386/locore.S: Likewise. * i386/i386at/boothdr.S: Likewise. * i386/i386at/interrupt.S: Likewise. * i386/i386at/idt.h: Include <i386/idt-gen.h> instead of "idt-gen.h". * i386/i386at/interrupt.S: Include <i386/ipl.h> instead of "ipl.h". * i386/i386/i386asm.sym: Include <i386/ldt.h> instead of "ldt.h". * i386/i386/locore.S: Likewise. * i386/i386/i386asm.sym: Include <i386/mp_desc.h> instead of "mp_desc.h". * i386/i386at/interrupt.S: Include <i386/pic.h> instead of "pic.h". * i386/i386/cswitch.S: Include <i386/proc_reg.h> instead of "proc_reg.h". * i386/i386/locore.S: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386/i386asm.sym: Include <i386/seg.h> instead of "seg.h". * i386/i386/idt.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/locore.S: Include <i386/trap.h> instead of "trap.h". * i386/i386/i386asm.sym: Include <i386/tss.h> instead of "tss.h". * i386/i386/i386asm.sym: Include <i386/vm_param.h> instead of "vm_param.h". * i386/i386/idt.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/i386/i386asm.sym: Include <i386at/idt.h> instead of "idt.h". * i386/i386/idt.c: Likewise. * i386/i386at/int_init.c: Likewise. * ipc/ipc_target.c: Include <kern/sched_prim.h> instead of "sched_prim.h". * vm/memory_object.c: Include <vm/memory_object_default.user.h> instead of "memory_object_default.h". * vm/vm_object.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/memory_object.c: Include <vm/memory_object_user.user.h> instead of "memory_object_user.h". * vm/vm_fault.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_pageout.c: Likewise.
2009-06-182006-01-31 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
Cleanup of GNU Mach's build system. The system dependend parts are now handeled by the respective Makefile and no longer by the top-level one. * configure, i386/configure, i386/linux/configure, linux/configure: Regenerated. * Makefile.in: Various cleanups. (mach/machine, mach_machine): Targets removed. (AWK, CC, CFLAGS, CPPFLAGS, DEFINES, INCLUDES, INSTALL, INSTALL_DATA) (INSTALL_PROGRAM, LD, MIG, MIGFLAGS, NM): Variables moved into Makerules.in. Do not include $(sysdep)/Makefrag anymore. (all, check, clean, distclean, mostlyclean, maintainer-clean, install) (install-headers, install-kernel): Recurse into the system dependend subdirectory. (check): Add a basic test using mbchk. (clean, distclean): Be more explicit in what to delete. ($(systype)/%): New target. (kernel.o): Incorporate the system dependend archive. (installed-sysdep-headers-names, $(installed-sysdep-headers-names)): Variable and target moved into the system dependend Makefile.in. (install-headers, mkheaderdirs): Don't care for the system dependend header files. (%.symc, %.symc.o, %.h, %_user.c, %_interface.h, %_server.c): Targets moved into Makerules.in. Inclusion of dependency files: Likewise. (%.migs_d, %.migu_d, %.migsh_d, %.miguh_d, make-deps, %.d): Likewise. Include Makerules. * Makerules.in: New file, mainly based on Makefile.in. * configure.in: Do not substitute cross_compiling and not explicitly substitute LDFLAGS. Check for cpp, ranlib, ar and mbchk. Care for the mach/machine symbolic link. Add Makerules as a config file. * i386/Makefile.in: Various cleanups. Merge i386/Makefrag and the system dependent stuff from Makefile.in into this file. (all, check, install, install-headers, install-kernel): Recurse into the system dependend subdirectory. (sysdep.o): transformed to the new target sysdep.a. (linux/linux.o): Target removed. (clean, distclean): Be more explicit in what to delete. (linux/%): New target. (install-headers): Install the system dependend header files. (mkheaderdirs): New target. Include the top-level Makerules. * i386/Makefrag: File removed. * i386/Makerules.in: New file. * i386/configure.in: Synchronize AC_INIT to the top-level definition. Do not check for ld and make. Add Makerules as a config file. * i386/linux/Makefile.in: Various cleanups. Replace linux-objs with objfiles. (check, install, install-headers, install-kernel): New empty targets. Don't care about linux-flags if no_deps is true. Inclusion of dependency files removed and instead... Include the top-level Makerules. * i386/linux/Makerules.in: New file. * i386/linux/configure.ac: Synchronize AC_INIT to the top-level definition. Do not check for gcc and ld. Do not explicitly substitute LDFLAGS. Add Makerules as a config file. * linux/configure.in: Synchronize AC_INIT to the top-level definition. Do not create directories using a dummy file. * linux/dummy.in: File removed. * ddb/db_access.h: Include <machine/vm_param.h> instead of "vm_param.h". * kern/bootstrap.c: Likewise. * kern/thread.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
1999-09-041999-09-04 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* vm/vm_resident.c (vm_page_grab): Only block unprivileged allocations over vm_page_external_limit if they are actually external allocations. Reported by Mark Kettenis (kettenis@wins.uva.nl>.
1999-06-291999-06-29 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* vm/vm_resident.c (vm_page_grab): Don't bounce requests when vm_page_external_count == vm_page_external_limit, so that before initialization is complete we can still allocate memory without relying on current_thread. (vm_page_wait): Also block if we are over the external page limit. * vm/vm_pageout.c (vm_pageout_scan): Rewrite the scan-for-pages-to-pageout loop to not crash when we hit the end of the inactive queue; instead jump back to the pause-for-a-little-while code.
1999-06-291999-06-29 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* vm/vm_resident.c (vm_page_grab): Don't bounce requests when vm_page_external_count == vm_page_external_limit, so that before initialization is complete we can still allocate memory without relying on current_thread.
1999-06-281999-06-27 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* vm/vm_resident.c (vm_page_external_limit): Define new variable.
1999-06-271999-06-27 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* vm/vm_resident.c (vm_page_external_count): Define variable. (vm_page_grab): New argument `external'. All callers changed. Keep track of number of externally managed pages. Don't let non-privileged threads exceed the externally-managed page limit. (vm_page_grab_contiguous_pages): New argument `external'. All callers changed. Keep track of number of externally managed pages. Don't let non-privileged threads exceed the externally-managed page limit. (vm_page_convert): New argument `external'. All callers changed. (vm_page_release): New argument `external'. All callers changed. Keep track of number of externally managed pages. (vm_page_bootstrap): Initialize M->external. * vm/vm_page.h (vm_page_external_limit, vm_page_external_count): New variables. (struct vm_page): New members `external' and `extcounted'. * vm/vm_pageout.c (vm_pageout): Initialize vm_page_external_limit and vm_page_external_target. (VM_PAGE_EXTERNAL_LIMIT, VM_PAGE_EXTERNAL_TARGET): New macro. (vm_pageout_external_target): New variable. (vm_pageout_scan): Regard "too many externally managed pages" as a reason to keep doing work, but if that's the only reason we're doing work, then the only thing we do is schedule cleaning of pages. Help keep track of the number of externally managed pages that we care about. * vm/vm_pageout.c (VM_PAGEOUT_BURST_WAIT): Reduce to 10ms/page. (VM_PAGEOUT_EMPTY_WAIT): Reduce to 75 ms. (VM_PAGE_FREE_RESERVED): Increase to 50 pages. (VM_PAGEOUT_RESERVED_INTERNAL): Adjust to `(reserve) - 25'. (VM_PAGEOUT_RESERVED_REALLY): Adjust to `(reserve) - 40'.
1997-03-24prerelease workThomas Bushnell
1997-02-25Initial sourceThomas Bushnell