Age | Commit message (Collapse) | Author |
|
* kern/pc_sample.c: Remove register qualifiers.
|
|
* kern/machine.c: Remove register qualifiers.
|
|
* kern/mach_factor.c: Remove register qualifiers.
|
|
* kern/mach_clock.c: Remove register qualifiers.
|
|
* kern/lock_mon.c: Remove register qualifiers.
|
|
* kern/lock.c: Remove register qualifiers.
|
|
* kern/ipc_tt.c: Remove register qualifiers.
|
|
* kern/ipc_sched.c: Remove register qualifiers.
|
|
* kern/ipc_mig.c: Remove register qualifiers.
|
|
* kern/host.c: Remove register qualifiers.
|
|
* kern/exception.c: Remove register qualifiers.
|
|
* kern/eventcount.c: Remove register qualifiers.
|
|
* kern/bootstrap.c: Remove register qualifiers.
|
|
* kern/ast.c: Remove register qualifiers.
|
|
* kern/act.c: Remove register qualifiers.
|
|
|
|
Found using the Clang Static Analyzer.
* kern/elf-load.c (exec_load): Properly propagate errors.
|
|
Variable reply_port is never used. There is indication in the comments
that it might be used in future function call, so comment it.
* kern/ipc_mig.c (syscall_device_writev_request): Comment variable.
|
|
|
|
* device/tty.h [luna88k]: Remove ifdef and include for nonexistent header files.
* kern/debug.c: Remove check for luna88k.
|
|
* kern/lock.h (db_show_all_slocks): Add prototype.
|
|
* kern/slab.c (slab_info): Fix format for vm_size_t.
|
|
There is currently no actual use of constructors, which is why this bug has
been long overlooked.
* kern/slab.c (kmem_cpu_pool_fill): Call constructor on buffers unless
verification is enabled for the cache, or the constructor is NULL.
|
|
* kern/ipc_mig.c (syscall_device_write_request): Comment unused variable.
|
|
|
|
* kern/act.c (act_create): Remove unused variable.
|
|
* kern/slab.c (kmem_cache_free): Relock cache before retrying releasing
an object to the CPU pool layer.
|
|
* kern/thread.c (thread_force_terminate): Remove unneeded variable
initialization.
|
|
Reported by Miguel Figueiredo
* kern/thread.c (thread_create): Remove duplicate reset of
new_thread->pc_sample.buffer to 0.
|
|
This reverts a change brought when reworking slab lists handling that made
the allocator store slabs in LIFO order, whatever their reference count.
While it's fine for free slabs, it actually increased fragmentation for
partial slabs.
* kern/slab.c (kmem_cache_alloc_from_slab): Insert slabs that become partial
at the end of the partial slabs list.
|
|
This change increases clarity.
* kern/list.h (list_insert): Rename to ...
(list_insert_head): ... this.
* kern/slab.c: Update calls to list_insert.
|
|
* kern/slab.c (kalloc_init): Remove unused variables.
|
|
Instead of walking the list of free slabs while holding the cache lock,
detach the list from the cache and directly compute the final count values,
and destroy slabs after releasing the cache lock.
* kern/slab.c (kmem_cache_reap): Optimize.
|
|
Don't enforce strong ordering of partial slabs. Separating partial slabs
from free slabs is already effective against fragmentation, and sorting
would sometimes cause pathological scalability issues. In addition, store
new slabs (whether free or partial) in LIFO order for better cache usage.
* kern/slab.c (kmem_cache_grow): Insert new slab at the head of the slabs list.
(kmem_cache_alloc_from_slab): Likewise. In addition, don't sort partial slabs.
(kmem_cache_free_to_slab): Likewise.
* kern/slab.h: Remove comment about partial slabs sorting.
|
|
* kern/slab.c (kmem_cache_free): Lock cache before releasing an object to
the slab layer.
|
|
* kern/sched.h (BASEPRI_USER): Increase to 25.
|
|
* kern/sched.h (NRQS): Increase to 50.
|
|
* kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1.
idle_thread: Likewise.
|
|
The purpose of this system call is to help debugging in situations where
it's desirable to bypass the mach_msg call entirely.
* include/mach/syscall_sw.h (mach_print): Generate system call code.
* kern/syscall_subr.c: Include <kern/printf.h>.
[MACH_KDB] (mach_print): New function.
* kern/syscall_subr.h (mach_print): New prototype.
* kern/syscall_sw.c [MACH_KDB] (mach_trap_table): Declare mach_print
system call.
|
|
|
|
* 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.
|
|
This problem was overlooked because of simple locks being no-ops.
* kern/slab.c (slab_collect): Fix lock name to kmem_cache_list_lock.
(host_slab_info): Likewise.
|
|
The purpose of this function is to allow kernel code to display the state
of the slab caches in situations where the host_slab_info RPC wouldn't be
available, e.g. before a panic.
* kern/slab.c (slab_info): New function.
* kern/slab.h: Add declaration for slab_info.
|
|
|
|
0a55db5 made thread_suspend return KERN_FAILURE when the target thread is in
TH_UNINT state. That however is not currently handled by libc, and it's more
useful to just wait for the thread to get interruptible.
* kern/sched_prim.c (thread_invoke): Wake NEW_THREAD->STATE for thread_suspend.
* kern/thread.c (thread_suspend): Wait on NEW_THREAD->STATE as long as THREAD
has TH_UNINT.
|
|
The mapable_time_init function is called before machine_init, but the
latter sets the system boot time. Fix their calling order.
* kern/startup.c (setup_main): Call machine_init before mapable_time_init.
|
|
* kern/rbtree.h (rbtree_lookup): Prefix local variable names with three
underscores.
(rbtree_lookup_nearest): Likewise.
(rbtree_insert): Likewise.
(rbtree_lookup_slot): Likewise.
(rbtree_insert_slot): Rewrite as an inline function.
|
|
* kern/ipc_kobject.c (ipc_kobject_server): Set gnumach_server_routine
prototype to mig_routine_t.
|
|
* kern/gnumach.srv: New file.
|
|
* 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.
|