summaryrefslogtreecommitdiff
path: root/kern
AgeCommit message (Collapse)Author
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/pc_sample.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/machine.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/mach_factor.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/mach_clock.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/lock_mon.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/lock.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/ipc_tt.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/ipc_sched.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/ipc_mig.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/host.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/exception.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/eventcount.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/bootstrap.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/ast.c: Remove register qualifiers.
2013-11-13kern: remove register qualifiersMarin Ramesa
* kern/act.c: Remove register qualifiers.
2013-11-11Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-11-11kern: fix the error handling in exec_loadJustus Winter
Found using the Clang Static Analyzer. * kern/elf-load.c (exec_load): Properly propagate errors.
2013-11-10kern: comment unused variableMarin Ramesa
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.
2013-11-09Remove lint codeMarin Ramesa
2013-09-09Drop luna88k bitsMarin Ramesa
* device/tty.h [luna88k]: Remove ifdef and include for nonexistent header files. * kern/debug.c: Remove check for luna88k.
2013-07-18kern: add missing prototypeMarin Ramesa
* kern/lock.h (db_show_all_slocks): Add prototype.
2013-06-29(slab_info): fix format warningsMarin Ramesa
* kern/slab.c (slab_info): Fix format for vm_size_t.
2013-06-09Fix object construction in the slab allocatorRichard Braun
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.
2013-06-04Comment unused variableMarin Ramesa
* kern/ipc_mig.c (syscall_device_write_request): Comment unused variable.
2013-06-04Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-06-02Remove unused variableMiguel Figueiredo
* kern/act.c (act_create): Remove unused variable.
2013-06-02Fix yet another locking error in the slab allocatorRichard Braun
* kern/slab.c (kmem_cache_free): Relock cache before retrying releasing an object to the CPU pool layer.
2013-05-19Remove unneeded variable initializationMiguel Figueiredo
* kern/thread.c (thread_force_terminate): Remove unneeded variable initialization.
2013-05-19Remove duplicate lineSamuel Thibault
Reported by Miguel Figueiredo * kern/thread.c (thread_create): Remove duplicate reset of new_thread->pc_sample.buffer to 0.
2013-05-16Reduce fragmentation in the slab allocatorRichard Braun
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.
2013-05-16Rename list_insert to list_insert_headRichard Braun
This change increases clarity. * kern/list.h (list_insert): Rename to ... (list_insert_head): ... this. * kern/slab.c: Update calls to list_insert.
2013-05-13Drop unused variablesMiguel Figueiredo
* kern/slab.c (kalloc_init): Remove unused variables.
2013-04-21Optimize slab reapingRichard Braun
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.
2013-04-21Rework slab lists handlingRichard Braun
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.
2013-04-21Fix locking error in the slab allocatorRichard Braun
* kern/slab.c (kmem_cache_free): Lock cache before releasing an object to the slab layer.
2013-03-11Update BASEPRI_USERSamuel Thibault
* kern/sched.h (BASEPRI_USER): Increase to 25.
2013-03-06Increase number of prioritiesSamuel Thibault
* kern/sched.h (NRQS): Increase to 50.
2013-03-05Do not hardcode maximum priority valueSamuel Thibault
* kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1. idle_thread: Likewise.
2013-01-22Add the mach_print debugging system callRichard Braun
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.
2013-01-13Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2013-01-13Add statistics for task_events_infoDavid Höppner
* 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.
2013-01-08Fix slab cache list lockingRichard Braun
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.
2013-01-08Add function to dump a raw summary of the slab allocator stateRichard Braun
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.
2012-12-23Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2012-12-23Make thread_suspend wait for !TH_UNINTSamuel Thibault
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.
2012-12-05Fix kernel task creation timeRichard Braun
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.
2012-12-04Strongly reduce risks of name capture in rbtree macrosRichard Braun
* 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.
2012-09-23Fix gnumach_server_routine prototypeSamuel Thibault
* kern/ipc_kobject.c (ipc_kobject_server): Set gnumach_server_routine prototype to mig_routine_t.
2012-09-23Add missing file for page statisticsRichard Braun
* kern/gnumach.srv: New file.
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.