| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* kern/slab.c (kmem_slab_create): Set `slab->cache` member.
(kmem_cache_reap): Return dead slabs instead of destroying in place.
(slab_collect): Destroy slabs outside of critical section.
* kern/slab.h (struct kmem_slab): New `cache` member.
|
|
|
|
| |
* i386/i386/io_perm.c (no_senders): Remove bogus call to ip_lock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of reporting statistics about unreferenced objects (the object
cache), report statistics about external objects (the page cache).
* vm/vm_object.c (vm_object_cached_count): Remove variable.
(vm_object_cache_add): Remove object cache stats updates.
(vm_object_cache_remove): Likewise.
(vm_object_terminate): Update page cache stats.
* vm/vm_object.h (vm_object_cached_count): Remove variable.
(vm_object_cached_pages): Likewise.
(vm_object_cached_pages_lock_data): Likewise.
(vm_object_cached_pages_update): Remove macro.
(vm_object_external_count): New extern variable.
(vm_object_external_pages): Likewise.
* vm/vm_resident.c (vm_object_external_count): New variable.
(vm_object_external_pages): Likewise.
(vm_page_insert): Remove object cache stats updates and
update page cache stats.
(vm_page_replace): Likewise.
(vm_page_remove): Likewise.
* vm/vm_user.c (vm_cache_statistics): Report page cache stats instead
of object cache stats.
|
|
|
|
|
|
| |
* kern/thread.c (thread_get_state): Allow call for the current thread,
without suspending it.
(thread_set_status): Likewise.
|
|
|
|
|
| |
* kern/debug.c (SoftDebugger) [__x86_64__]: Use int3 instruction to trigger
debugger.
|
|
|
|
|
| |
* vm/vm_map (vm_map_copyin, vm_map_copyin_page_list): Check overflow
before page alignment of source data.
|
|
|
|
|
| |
* vm/vm_map.c (vm_map_copyout_page_list): Fix call to
vm_map_find_entry_anywhere to avoid relocking VM map.
|
|
|
|
|
|
|
|
| |
As the original author of the files imported, I explicitely dual
license them to something compatible with GPLv2.
kern/macros.h: Switch license from GPLv3 to BSD 2-clause.
kern/rdxtree_i.h: Likewise.
|
|
|
|
|
|
|
|
| |
* linux/src/drivers/scsi/eata_dma_proc.c (eata_proc_info): Increase cmd size
to 12.
* linux/src/drivers/scsi/sd.c (do_sd_request, sd_init_done): Likewise.
* linux/src/drivers/scsi/sr.c (do_sr_request, sr_init_done): Likewise.
* linux/src/drivers/scsi/sr_ioctl.c (sr_ioctl): Likewise with sr_cmd.
|
|
|
|
|
| |
* i386/i386at/lpr.c (lprstart): Use int instead of char to store result of
getc, so as to return in case of getting -1.
|
|
|
|
| |
* kern/debug.c (panic, log): Pass 16 as default radix to _doprnt.
|
|
|
|
|
| |
ddb/db_elf.c (elf_db_search_symbol): Use ELF32_ST_BIND and ELF32_ST_TYPE to
access symbol bind and type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change augments VM maps with a gap tree, sorted by gap size, to
use for non-fixed allocations.
* vm/vm_map.c: Include kern/list.h.
(vm_map_entry_gap_cmp_lookup, vm_map_entry_gap_cmp_insert,
vm_map_gap_valid, vm_map_gap_compute, vm_map_gap_insert_single,
vm_map_gap_remove_single, vm_map_gap_update, vm_map_gap_insert,
vm_map_gap_remove, vm_map_find_entry_anywhere): New functions.
(vm_map_setup): Initialize gap tree.
(_vm_map_entry_link): Call vm_map_gap_insert.
(_vm_map_entry_unlink): Call vm_map_gap_remove.
(vm_map_find_entry, vm_map_enter, vm_map_copyout,
vm_map_copyout_page_list, vm_map_copyin): Replace look up loop with
a call to vm_map_find_entry_anywhere. Call vm_map_gap_update and
initialize gap tree where relevant.
(vm_map_copy_insert): Turn macro into an inline function and rewrite.
(vm_map_simplify): Reorder call to vm_map_entry_unlink so that previous
entry is suitable for use with gap management functions.
* vm/vm_map.h: Include kern/list.h.
(struct vm_map_entry): New members `gap_node`, `gap_list`,
`gap_size` and `in_gap_tree`.
(struct vm_map_header): New member `gap_tree`.
|
|
|
|
|
|
| |
Amends a7f248bf.
* xen/console.h (hypcnclose): Fix type of parameter.
|
|
|
|
|
| |
* version.m4 (AC_PACKAGE_VERSION): Set to 1.7.
* NEWS: Finalize for 1.7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ddb/db_elf.c (elf_db_sym_init): Turn `i' into unsigned.
* device/ds_routines.c (ds_device_open, device_writev_trap): Likewise.
* i386/i386/user_ldt.c (i386_set_ldt): Likewise for `i', `min_selector', and
`first_desc'.
(i386_get_ldt): Likewise for `ldt_count'.
(user_ldt_free): Likewise for `i'.
* i386/i386/xen.h (hyp_set_ldt): Turn `count' into unsigned long.
* i386/intel/pmap.c (pmap_bootstrap): Turn `i', `j' and 'n' into unsigned.
(pmap_clear_bootstrap_pagetable): Likewise for `i' and `j'.
* ipc/ipc_kmsg.c (ipc_msg_print): Turn `i' and `numwords' into unsigned.
* kern/boot_script.c (boot_script_parse_line): Likewise for `i'.
* kern/bootstrap.c (bootstrap_create): Likewise for `n' and `i'.
* kern/host.c (host_processors): Likewise for `i'.
* kern/ipc_tt.c (mach_ports_register): Likewise.
* kern/mach_clock.c (tickadj, bigadj): turn into unsigned.
* kern/processor.c (processor_set_things): Turn `i' into unsigned.
* kern/task.c (task_threads): Likewise.
* kern/thread.c (consider_thread_collect, stack_init): Likewise.
* kern/strings.c (memset): Turn `i' into size_t.
* vm/memory_object.c (memory_object_lock_request): Turn `i' into unsigned.
* xen/block.c (hyp_block_init): Use %u format for evt.
(device_open): Drop unused err variable.
(device_write): Turn `copy_npages', `i', `nbpages', and `j' into unsigned.
* xen/console.c (hypcnread, hypcnwrite, hypcnclose): Turn dev to dev_t.
(hypcnclose): Return void.
* xen/console.h (hypcnread, hypcnwrite, hypcnclose): Fix prototypes
accordingly.
* xen/evt.c (form_int_mask): Turn `i' into int.
* xen/net.c (hyp_net_init): Use %u format for evt.
(device_open): Remove unused `err' variable.
|
|
|
|
|
|
| |
This reverts commit a8a52cafb5621b475737ffdc81f63703d5b37904.
It seems to be breaking backtracing in ddb...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pageout daemon uses small, internal, temporary objects to transport
the data out to memory managers, which are expected to release the data
once written out to backing store. Releasing this data is done with a
vm_deallocate call. The problem with this is that vm_map is allowed to
merge these objects, in which case vm_deallocate will only remove a
reference instead of releasing the underlying pages, causing the pageout
daemon to deadlock.
This change makes the pageout daemon mark these objects so that they
don't get merged.
* vm/vm_object.c (vm_object_bootstrap): Update template.
(vm_object_coalesce): Don't coalesce if an object is used for pageout.
* vm/vm_object.h (struct vm_object): New `used_for_pageout` member.
* vm/vm_pageout.c (vm_pageout_page): Mark new objects for pageout.
|
|
|
|
|
| |
ddb/db_output.c (db_printf): Return 0.
ddb/db_printf.h (db_printf): Change declaration to return an int.
|
|
|
|
|
| |
* i386/i386/pcb.c (pcb_init): Make sure there is a thread before calling
current_task().
|
|
|
|
|
| |
* i386/i386/hardclock.c (hardclock): Use '0' instead of 'NULL'.
* vm/vm_fault (vm_fault_cleanup): Likewise.
|
|
|
|
|
| |
* i386/xen/xen.c (hypclock_machine_intr): Fix 'clock_interrupt' call.
* xen/time.c (clkstart): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS: Advertise feature.
* configfrac.ac (--enable-kernsample): Add option.
* kern/pc_sample.h (take_pc_sample): Add usermode and pc parameter.
(take_pc_sample_macro): Take usermode and pc parameters, pass as such to
take_pc_sample.
* kern/pc_sample.c (take_pc_sample): Use pc parameter when usermode is 1.
* kern/mach_clock.c (clock_interrupt): Add pc parameter. Pass usermode and
pc to take_pc_sample_macro call.
* i386/i386/hardclock.c (hardclock): Pass regs->eip to clock_interrupt call
on normal interrupts, NULL on interrupt interrupt.
* vm/vm_fault.c (vm_fault_cleanup): Set usermode to 1 and pc to NULL in
take_pc_sample_macro call.
|
|
|
|
|
| |
* i386/i386/spl.S (mb): Define macro
(SETIPL, spl0, spl7): Call mb.
|
|
|
|
| |
* kern/gsync.c (gsync_setup): Declare `i' variable out of for loop.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefrag.am (libkernel_a_SOURCES): Add kern/gsync.c and kern/gsync.h.
* include/mach/gnumach.defs (gsync_wait, gsync_wake, gsync_requeue): New
routines.
* include/mach/kern_return.h (KERN_TIMEDOUT, KERN_INTERRUPTED): New error
codes.
* kern/gsync.c: New file.
* kern/gsync.h: New file.
* kern/startup.c: Include <kern/gsync.h>
(setup_main): Call gsync_setup.
|
| |
|
|
|
|
|
|
| |
* configfrag.ac: Use 'AC_HEADER_ASSERT'.
Signed-off-by: Justus Winter <justus@gnupg.org>
|
|
|
|
|
|
| |
* i386/i386at/model_dep.c (i386at_init): Fix error handling.
Signed-off-by: Justus Winter <justus@gnupg.org>
|
|
|
|
|
| |
* include/mach/std_types.h: Do not include stdint.h.
* kern/rdxtree.h: Replace sys/types.h with stdint.h.
|
|
|
|
|
|
|
|
| |
7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb ('Use uint32_t instead of
unsigned32_t.') missed some Xen code
* xen/net.c (recompute_checksum): Use stdint.h types.
* xen/time.c (hyp_get_stime): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement stdint.h and use it in gnumach.
Remove old type definitions such as signed* and unsigned*.
* Makefile.am: Add -ffreestanding.
* i386/i386/xen.h: Use uint64_t.
* i386/include/mach/i386/machine_types.defs: Use uint32_t and int32_t.
* i386/include/mach/i386/vm_types.h: Remove definitions of int*, uint*,
unsigned* and signed* types.
* i386/xen/xen.c: Use uint64_t.
* include/device/device_types.defs: Use uint32_t.
* include/mach/std_types.defs: Use POSIX types.
* include/mach/std_types.h: Include stdint.h.
* include/stdint.h: New file with POSIX types.
* include/sys/types.h: Include stdint.h.
* ipc/ipc_kmsg.c: Use uint64_t.
* kern/exception.c: Use uint32_t.
* linux/dev/include/linux/types.h: Remove POSIX types.
* xen/block.c: Use uint64_t.
* xen/net.c: Do not use removed unsigned*_t types.
* xen/ring.h: Use uint32_t instead.
* xen/store.c: Use uint32_t.
* xen/store.h: Use uint32_t.
* xen/time.c: Use POSIX types only.
* xen/time.h: Use uint64_t.
|
|
|
|
|
|
|
|
| |
and move it to 16MiB by default to free 24bit DMA area
* i386/configfrag.ac (--with-_START_MAP): Add option, default to 0x1000000.
* i386/Makefrag.am (_START_MAP): Set to $(_START_MAP).
(_START): Set to _START_MAP+0xC0000000.
|
|
|
|
|
| |
ddb/db_elf.c (elf_db_search_symbol): Use ELF32_ST_BIND and ELF32_ST_TYPE to
access symbol bind and type.
|
|
|
|
|
| |
* vm/vm_resident (vm_page_grab_contig): Return NULL instead of calling
panic on memory exhaustion.
|
|
|
|
|
|
| |
Makefrag.am (libkernel_a_SOURCES): Add kern/log2.h.
(EXTRA_DIST): Add kern/exc.defs.
i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/elf.h.
|
|\
| |
| |
| | |
Finally ;-).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* vm/vm_object.c (vm_object_bootstrap): Set template object `cached'
member to FALSE.
(vm_object_cache_add, vm_object_cache_remove): New functions.
(vm_object_collect, vm_object_deallocate, vm_object_lookup,
vm_object_lookup_name, vm_object_destroy): Use new cache management functions.
(vm_object_terminate, vm_object_collapse): Make sure object isn't cached.
* vm/vm_object.h (struct vm_object): New `cached' member.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch lets the kernel unconditionnally cache non empty unreferenced
objects instead of using a fixed arbitrary limit. As the pageout daemon
evicts pages, it collects cached objects that have become empty. The
effective result is a graceful adjustment of the number of objects
related to memory management (virtual memory objects, their associated
ports, and potentially objects maintained in the external memory
managers). Physical memory can now be almost entirely filled up with
cached pages. In addition, these cached pages are not automatically
deactivated as objects can quickly be referenced again.
There are problems with this patch however. The first is that, on
machines with a large amount of physical memory (above 1 GiB but it also
depends on usage patterns), scalability issues are exposed. For example,
file systems which don't throttle their writeback requests can create
thread storms, strongly reducing system responsiveness. Other issues
such as linear scans of memory objects also add visible CPU overhead.
The second is that, as most memory is used, it increases the chances of
swapping deadlocks. Applications that map large objects and quickly
cause lots of page faults can still easily bring the system to its
knees.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Stack allocation on Xen can fail because of fragmentation. This change
makes stack allocation use the slab allocator.
* kern/thread.c (thread_stack_cache): New global variable.
(stack_alloc): Use kmem_cache_alloc instead of vm_page_grab_contig.
(stack_collect): Use kmem_cache_free instead of vm_page_free_contig.
(kmem_cache_init): Initialize thread_stack_cache.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* kern/slab.c (kmem_pagealloc_virtual): Pass alignment to function,
call kmem_alloc_aligned when greater than a page.
(kmem_pagealloc): Pass alignment to function.
(kmem_slab_create): Update call to kmem_pagealloc.
(kalloc): Likewise.
(kmem_cache_compute_properties): Fix handling of color with large slab
sizes.
(kmem_cache_init): Allow alignment greater than the page size.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* i386/i386/thread.h (struct pcb): Add init_control field.
* i386/i386/fpu.h (fpinherit): New prototype.
* i386/i386/fpu.c (fpinit): Add thread parameter. When init_control field is
set, use that value instead of a hardcoded one.
(fpinherit): New function.
(fp_load): Pass thread parameter to fpinit().
* kern/thread.c (thread_create): Pass parent task to pcb_init().
* i386/i386/pcb.c (pcb_init): Add parent_task parameter, call fpinherit when
it is equal to current_task().
|
| |
| |
| |
| | |
* ipc/ipc_object.c (ikot_print_array): Add entry for IKOT_PAGER_PROXY.
|
| |
| |
| |
| |
| | |
* doc/mach.texi: Mention another way how a memory manager can signal
that an object is ready.
|
| |
| |
| |
| |
| | |
* i386/Makefrag.am (libkernel_a_SOURCES): Add new file.
* i386/i386/cpu.h: New file.
|
| |
| |
| |
| |
| |
| | |
* include/mach/mach.defs: Avoid generating unused client stubs, some
of which use an unreasonable amount of stack space and showed up in
compiler warnings.
|
| |
| |
| |
| |
| | |
* kern/sched_prim.c (thread_sleep): Document case of events woken from
interrupt handlers.
|
| |
| |
| |
| |
| | |
* i386/i386at/kd_mouse.c (kd_mouse_read): Document why the
assert_wait/thread_block pair is not racy.
|
| |
| |
| |
| |
| | |
* Makefrag.am: Include the exception protocol in 'gnumach.msgids'.
* kern/exc.defs: New file.
|