summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-16yyy vm: turn page queue lock into a general lockJustus Winter
2015-08-16yyy kern: keep track of the writer when debugging locksJustus Winter
* kern/lock.c * kern/lock.h
2015-08-16yyy kern: improve simple lock debuggingJustus Winter
* kern/lock.c * kern/lock.h
2015-08-16kern: disable the simple lock checks while debuggingJustus Winter
* kern/lock.c (do_check_simple_locks): New variable. (check_simple_locks): Make check conditional. (check_simple_locks_{en,dis}able): New functions. * kern/lock.h (check_simple_locks_{en,dis}able): New declarations. * ddb/db_trap.c (db_task_trap): Disable simple lock checks.
2015-08-15the object is locked, i checkedpmm-2015-08-15Justus Winter
2015-08-15remove calls to vm_page_init, they are actually hurting hereJustus Winter
2015-08-15fix vm_page initializationJustus Winter
2015-08-15yyy vm: destroy pagesJustus Winter
2015-08-15XXX pmm from x15, userspace crashes soonJustus Winter
2015-08-15yyy biosmem workaroundJustus Winter
2015-08-15yyy vm: add vm_map_infoJustus Winter
2015-08-15linux: adapt glueJustus Winter
* linux/dev/glue/kmem.c (linux_kmem_init): Drop sanity check. * linux/dev/init/main.c (alloc_contig_mem, free_contig_mem): Use the buddy allocator.
2015-08-15xxx avoid allocaJustus Winter
2015-08-15kern/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-15kern/slab: rename constructor typeRichard Braun
2015-08-15kern/slab: move internal data to slab_i.hRichard Braun
As it's done for other modules, this separation makes the public interface easy to identify.
2015-08-15kern/slab: rework buffer-to-slab lookupRichard Braun
Instead of using a red-black tree, rely on the VM system to store kmem specific private data.
2015-08-15kern/slab: remove the KMEM_CACHE_NORECLAIM flagRichard Braun
Don't encourage anyone to use non reclaimable pools of resources, it's a Bad Thing To Do.
2015-08-15vm: verbatim import of x15's physical page allocatorJustus Winter
2015-08-15kern: remove the list of free stacksJustus Winter
* kern/counters.c: Remove relevant counters. * kern/counters.h: Likewise. * kern/thread.c (stack_free_{list,count,limit}): Drop variables. (stack_next): Remove macro. (stack_alloc_try): Allocate stack using the slab allocator. (stack_alloc): Merely call `stack_alloc_try'. (stack_free): Adopt accordingly.
2015-08-15kern: allocate kernel stacks using the slab allocatorJustus Winter
* kern/slab.c (kmem_cache_init): Relax alignment restriction. * kern/thread.c (stack_cache): New variable. (stack_alloc): Use the slab allocator. (stack_collect): Adjust accordingly. (thread_init): Initialize `stack_cache'.
2015-08-15kern: use a general lock for the IPC structuresfix-ipc-space-locking-2015-08-15Justus Winter
* ipc/ipc_thread.h (ith_{lock_init,lock,unlock}): Use a general lock. * kern/task.h (struct task): Use a general lock for `itk_lock_data'. (itk_{lock_init,lock,unlock}): Use a general lock. * kern/thread.h (struct thread): Use a general lock for `ith_lock_data'.
2015-08-15vm/object: use a general lock to protect vm objectsJustus Winter
* vm/vm_object.h (struct vm_object): Use a general lock, adapt macros.
2015-08-15kern/lock: add lock_takenJustus Winter
* kern/lock.h (lock_taken): New macro.
2015-08-15vm/object: use a general lock to protect the object cacheJustus Winter
* vm/vm_object.c: Use a general lock to protect the object cache.
2015-08-15kern/bootstrap: tune lockingJustus Winter
* kern/bootstrap.c (boot_script_exec_cmd): Avoid holding the lock across the call to `thread_create'.
2015-08-15vm: use a general lock to protect the default memory managerJustus Winter
* vm/memory_object.c: Use a general lock to protect the default memory manager.
2015-08-15device: use general lock for port listsJustus Winter
* device/if_hdr.h (struct ifnet): Turn the port list locks into general locks. (port_list_{lock_init,lock,unlock): New macros. * device/net_io.c (net_filter, net_set_filter): Use new macros. * device/subrs.c (if_init_queues): Likewise.
2015-08-15device: use general lock for `mach_device'Justus Winter
* device/dev_hdr.h (struct mach_device): Turn lock into a general lock. (device_lock_init): New macro. (device_lock, device_unlock): Adapt accordingly. * device/dev_lookup.c (device_lookup): Use `device_lock_init'. * device/ds_routines.c (device_open): Adapt accordingly.
2015-08-15turn all_psets_lock into a general lockJustus Winter
2015-08-15yyy more general locks, crashes, maybe b/c interrupt handlerJustus Winter
2015-08-15kern: new function `thread_sleep_lock'Justus Winter
* kern/sched_prim.c (thread_sleep_lock): New function. * kern/sched_prim.h (thread_sleep_lock): New delcaration.
2015-08-15kern: fix compiler warningJustus Winter
* kern/bootstrap.c (bootstrap_create): Move declaration of `n' into the #ifdef.
2015-08-15vm: fix compiler warningJustus Winter
* vm/vm_user.c (vm_wire): Drop unused but set variable `host'.
2015-08-15vm: enable extra assertionsJustus Winter
* vm/vm_fault.c (vm_fault_page): Enable extra assertions.
2015-08-15Avoid re-defining macrosJustus Winter
* kern/macros.h: Avoid re-defining macros. * linux/src/include/linux/compiler-gcc.h: Likewise. * linux/src/include/linux/compiler.h: Likewise.
2015-07-25kern: add boot-time clock, use it for time stampsHEADmasterJustus Winter
The kernel keeps track of task and thread creation times by saving a time stamp. Previously, the real-time clock was used for this. When the real-time clock is changed, however, the reference frame for the time stamps is lost. This surfaced in Hurd systems reporting spuriously long uptimes. Fix this by creating a boot-time clock and use it as reference frame for the time stamps. * kern/mach_clock.c (clock_boottime_offset): Create clock by keeping track of the offset from the real-time. (clock_boottime_update): New function. (record_time_stamp): Use the boot-time clock for time stamps. (read_time_stamp): New function to convert it back to real-time. (host_set_time): Call `clock_boottime_update'. * kern/mach_clock.h (record_time_stamp): Amend comment. (read_time_stamp): New declaration. * kern/task.c (task_info): Use `read_time_stamp'. * kern/thread.c (thread_info): Likewise.
2015-07-25include: provide time-value substractionJustus Winter
* include/mach/time_value.h (time_value_assert): New macro to assert that the given value is well-formed. (time_value_add_usec): Use the new macro. (time_value_sub_usec): New macro. (time_value_add): Use `time_value_add_usec'. (time_value_sub_usec): New macro.
2015-07-25kern/lock: make sure the macros are only used on simple locksJustus Winter
* kern/lock.h (struct slock, simple_lock_data_empty): Add field `is_a_simple_lock'. (simple_lock_assert): New macro that tests for `is_a_simple_lock'. Use this macro to assert that the arguments to various other macros are indeed simple locks.
2015-07-25Disable the kernel tracing system XPRJustus Winter
* configfrag.ac (XPR_DEBUG): Disable tracing system.
2015-07-25ipc/space: inline reference countingJustus Winter
* ipc/ipc_space.h (is_{reference,release}): Use the macro variant.
2015-07-25Make sure the field offsets are updatedJustus Winter
* Makerules.am: Make sure the field offsets are updated.
2015-07-20kern/bootstrap: deallocate threadJustus Winter
Previously, killing the thread would fail because of the extra reference, making task_terminate loop forever. * kern/bootstrap.c (boot_script_exec_command): Deallocate thread.
2015-07-19kern/bootstrap: deallocate taskJustus Winter
* kern/bootstrap.c (boot_script_free_task): Deallocate task.
2015-07-18linux/net: fix build with -O0Justus Winter
* linux/src/drivers/net/pci-scan.c: Avoid #erroring out.
2015-07-18kern/printf: do not serialize printf and coJustus Winter
A lot of code assumes that printf is re-entrant, e.g. the pagination code in the debugger, or any use of assert inside the console driver. * kern/printf.c: Drop the lock serializing calls to `_doprnt'. (printf_init): Remove function. * kern/printf.h (printf_init): Remove declaration. * kern/startup.c (setup_main): Remove call to `printf_init'.
2015-07-18kern/lock: use compiler built-in functions to get return addressJustus Winter
* kern/lock.c (struct simple_locks_info): Fix type of `ra'. (simple_lock, simple_lock_try): Use compiler built-in functions to get return address.
2015-07-18kern/bootstrap: fix lockingJustus Winter
* kern/bootstrap.c (boot_script_exec_cmd): Add missing unlock. (user_bootstrap): Likewise.
2015-07-18kern/slab: fix lockingJustus Winter
* kern/slab.c (host_slab_info): Fix locking.
2015-07-15ipc: use a general lock to protect IPC spacesJustus Winter
This fixes a corruption in the radix trees representing the IPC spaces when memory was tight. * ipc/ipc_space.h: Use a general lock to protect IPC spaces.