aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make scheduling more reactiveSamuel Thibault2018-11-192-1/+2
| | | | | | | | Give smaller quantums to processes, to get more frequent context switches. This fixes some reactivity for concurrent processes. * kern/sched.h (MIN_QUANTUM): Define to hz / 33. * kern/sched_prim.c (sched_init): Use MIN_QUANTUM instead of hz / 10.
* build: Distribute tarball compressed with xz instead of bzip2Guillem Jover2018-11-061-1/+1
| | | | * configure.ac (AM_INIT_AUTOMAKE): Change dist-bzip2 to dist-xz.
* Fix using all dynamic prioritiesSamuel Thibault2018-11-042-5/+5
| | | | | | | | | | | 6a2342010811 ("Increase number of priorities") increased NRQS but didn't increase PRI_SHIFT to extend the use of the additional queues by the scheduler. This does it. While at it, extend to NRQS to 64, the double of the original 32, to keep all values coherent. * i386/i386/sched_param.h (PRI_SHIFT): Set from 18 to 17. * kern/sched.h (PRI_SHIFT): Set from 18 to 17. (NRQS): Set to 64.
* Add missing patch fileSamuel Thibault2018-11-031-1/+2
| | | | * Makefile.am (EXTRA_DIST): Add Makefile.in.dep.patch.
* Add vm_object_sync supportSamuel Thibault2018-11-038-0/+149
| | | | | | | | | | | | | * include/mach/vm_sync.h: New file. * include/mach/mach_types.h: Include <mach/vm_sync.h> * Makefrag.am (include_mach_HEADERS): Add include/mach/vm_sync.h. * include/mach/mach_types.defs (vm_sync_t): Add type. * include/mach/gnumach.defs (vm_object_sync, vm_msync): Add RPCs. * vm/vm_map.h: Include <mach/vm_sync.h>. (vm_map_msync): New declaration. * vm/vm_map.c (vm_map_msync): New function. * vm/vm_user.c: Include <mach/vm_sync.h> and <kern/mach.server.h>. (vm_object_sync, vm_msync): New functions.
* Fix typoSamuel Thibault2018-11-031-1/+1
|
* Drop spurious changesSamuel Thibault2018-08-133-3/+3
|
* Fix building out of sourceSamuel Thibault2018-08-134-5/+5
| | | | * configure.ac: Fix patching Makefile.in in $srcdir.
* Fix bootstrap hack for automake 1.16Samuel Thibault2018-08-132-1/+22
| | | | | | * Makefile.in.dep.patch: New file. * configure.ac: Try to apply Makefile.in.dep.patch if config.status.dep.patch failed to apply.
* device: Fix d_mmap typeSamuel Thibault2018-07-2811-13/+12
| | | | | | | | | | | | | | | * device/conf.h (dev_ops): Make d_mmap return vm_offset_t instead of int. (nomap): Update accordingly. * device/blkio.c (block_io_mmap): Likewise. * device/blkio.h (block_io_mmap): Likewise. * device/dev_name.c (nomap): Likewise. * i386/i386at/kd.c (kdmmap): Likewise. * i386/i386at/kd.h (kdmmap): Likewise. * i386/i386at/mem.c (memmmap): Likewise. * i386/i386at/mem.h (memmmap): Likewise. * i386/i386at/model_dep.c (timemmap): Likewise. * i386/i386at/model_dep.h (timemmap): Likewise.
* Fix dev_ops typesSamuel Thibault2018-07-2823-73/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * device/conf.h: Include <device/device_types.h>. (dev_ops): Make d_getstat and d_setstat fields use dev_flavor_t, dev_status_t, and mach_msg_type_number_t types. * device/tty.h: (t_getstat, t_setstat): Likewise. * device/conf.h (nulldev_getstat, nulldev_setstat): Fix parameter types accordingly. * device/dev_name.c (nulldev_getstat, nulldev_setstat): Likewise. * device/kmsg.c (kmsggetstat): Likewise. * device/kmsg.h (kmsggetstat): Likewise. * device/net_io.c (net_getstat): Likewise. * device/net_io.h (net_getstat): Likewise. * i386/i386at/com.c (comgetstat, comsetstat): Likewise. * i386/i386at/com.h (comgetstat, comsetstat): Likewise. * i386/i386at/kd.c (kdgetstat, kdsetstat): Likewise. * i386/i386at/kd.h (kdgetstat, kdsetstat): Likewise. * i386/i386at/kd_event.c (kbdgetstat, kbdsetstat): Likewise. * i386/i386at/kd_event.h (kbdgetstat, kbdsetstat): Likewise. * i386/i386at/kd_mouse.c (mousegetstat): Likewise. * i386/i386at/kd_mouse.h (mousegetstat): Likewise. * i386/i386at/lpr.c (lprgetstat, lprsetstat): Likewise. * i386/i386at/lpr.h (lprgetstat, lprsetstat): Likewise. * xen/console.c (hypcngetstat, hypcnsetstat): Likewise. * xen/console.h (hypcngetstat, hypcnsetstat): Likewise. * device/dev_hdr.h: Forward-declare struct dev_ops and dev_ops_t type instead of including <device/conf.h>. * device/dev_pager.c: Include <device/conf.h> * i386/i386/pcb.h: Include <machine/io_perm.h> * i386/i386/thread.h: Do not include <i386/tss.h>
* Fix warningSamuel Thibault2018-07-281-1/+1
| | | | * i386/intel/pmap.c (pmap_enter): Fix panic format.
* Add gcc-8 compatibilitySamuel Thibault2018-07-281-0/+67
| | | | * linux/src/include/linux/compiler-gcc8.h: New file.
* Add ffs to clib_routinesSamuel Thibault2018-07-031-1/+1
| | | | | | Since pmap.c uses it in SMP mode. * Makefile.am (clib_routines): Add ffs.
* Fix interrupt_processor prototypeSamuel Thibault2018-06-272-0/+7
| | | | | | * i386/i386/mp_desc.h [MULTIPROCESSOR] (interrupt_processor): Add prototype. * i386/intel/pmap.c [NCPUS > 1]: Include <i386/mp_desc.h>
* Add missing includeSamuel Thibault2018-06-271-0/+1
| | | | * i386/intel/pmap.c: Include <i386/spl.h>.
* Fix pmap nameSamuel Thibault2018-06-271-2/+2
| | | | | * i386/intel/pmap.c (pmap_map_bd): Lock kernel_pmap, not just the inexistent pmap.
* Add splvm prototypeSamuel Thibault2018-06-271-0/+1
| | | | * i386/i386/spl.h (splvm): Add prototype.
* Add cause_ast_check prototypeSamuel Thibault2018-06-271-0/+5
| | | | | | As reported by Almudena Garcia <liberamenso10000@gmail.com> * kern/ast.h [NCPUS > 1] (cause_ast_check): Add prototype.
* Define CPU_L1_SIZE even when NCPUS != 1Samuel Thibault2018-06-271-1/+2
| | | | | | As reported by Almudena Garcia <liberamenso10000@gmail.com> * kern/cpu_number.h [NCPUS != 1] (CPU_L1_SIZE): Define macro.
* Disable position-independant compilationSamuel Thibault2018-06-271-0/+4
| | | | | | | | as now enabled automatically by some distributions... Reported and tested by Almudena Garcia <liberamenso10000@gmail.com> * Makefile.am (AM_CFLAGS): Add -no-pie -fno-pic.
* Add missing prototypeSamuel Thibault2018-06-171-0/+1
| | | | * kern/machine.h (action_thread): Add prototype.
* Re-fix typoSamuel Thibault2018-06-171-1/+1
| | | | * machine/lock.h (_simple_lock_xchg_): Remove spurious parenthesis.
* Fix typoSamuel Thibault2018-06-171-1/+1
| | | | * machine/lock.h (_simple_lock_xchg_): Add missing parenthesis.
* Keep DMA enabled on QEMU disksSamuel Thibault2018-06-131-0/+8
| | | | | | | | When the host is very loaded, some requests might time out, but that is not a reason for disabling DMA, so keep it enabled. * linux/src/drivers/block/triton.c (config_drive_for_dma): When disk is QEMU, set using_dma and keep_settings to 1.
* vm_map: Fix bugs on huge masks parametersSamuel Thibault2018-04-222-3/+5
| | | | | * vm/vm_map.c (vm_map_find_entry_anywhere): Also check that (min + mask) & ~mask remains bigger than min.
* Avoid old typeSamuel Thibault2018-03-031-4/+2
| | | | | * include/device/bpf.h: Do not include <sys/types.h> (struct bpf_version): Use unsigned short type instead of u_short.
* Add const MIG typesSamuel Thibault2018-01-282-0/+2
| | | | | | * i386/include/mach/i386/mach_i386_types.h (const_descriptor_list_t): New type. * include/mach/port.h (const_mach_port_array_t): New type.
* Fix warningSamuel Thibault2018-01-281-1/+1
| | | | * i386/i386at/lpr.c (lpropen): Cast io port to void *.
* Fix warningSamuel Thibault2018-01-281-1/+1
| | | | * vm/vm_map.c (vm_map_copyout): Fix panic format.
* Fix warningSamuel Thibault2018-01-281-1/+1
| | | | * kern/sched_prim.c (assert_wait): Fix panic format.
* Fix warningSamuel Thibault2018-01-281-1/+1
| | | | * kern/ast.c (ast_check): Fix panic format.
* Fix halt messageSamuel Thibault2017-11-121-1/+2
| | | | | * i386/i386at/model_dep.c (halt_all_cpus): Change halt message to better explain what happened.
* linux block: fix outbound access to non-directmap user dataSamuel Thibault2017-11-011-4/+6
| | | | | * linux/dev/glue/block.c (rdwr_full): Set BH_Bounce if the physical address of the user data is not in directmap.
* linux-block: Fix calling vm_map_copy_discard on uninitialized variableSamuel Thibault2017-10-311-2/+1
| | | | | | | | | This happens if passed count is 0. Reported by Richard Braun. * linux/dev/glue/block.c (device_write): Set copy variable before vm_map_copy_discard() is called.
* Fix commit 10ebf9565f69760e46a8f271e22c5367d54e10ff.Justus Winter2017-10-271-13/+0
| | | | | | * kern/task.c (task_ledger_acquire): Remove function that I added by accident. (task_ledger_release): Likewise.
* kern: Fix new task notifications.Justus Winter2017-10-261-1/+3
| | | | * kern/task.c (task_create_kernel): Handle NULL parent tasks.
* kern: Fix crash.Justus Winter2017-10-263-2/+32
| | | | | | | | | | Check receiver in task_create. Fixes a crash when sending that message to a non-task port. * kern/bootstrap.c (boot_script_task_create): Use the new function. * kern/task.c (task_create): Rename to task_create_internal, create a new function in its place that checks the receiver first. * kern/task.h (task_create_internal): New prototype.
* linux: Fix warnings.Justus Winter2017-10-261-2/+1
| | | | * linux/dev/glue/net.c (device_write): Remove unused variables.
* Drop the register qualifier.Justus Winter2017-10-236-14/+14
| | | | | | | | | * i386/intel/pmap.c: Drop the register qualifier. * ipc/ipc_kmsg.h: Likewise. * kern/bootstrap.c: Likewise. * kern/profile.c: Likewise. * kern/thread.c: Likewise. * vm/vm_object.c: Likewise.
* linux: Fix interrupt glue.Justus Winter2017-09-301-2/+16
| | | | | | | | | | | Previously, we used an invalid pointer to mark interrupts as reserved by Mach. This, however, crashes code trying to iterate over the list of interrupt handlers. Use a valid structure instead. * linux/dev/arch/i386/kernel/irq.c (reserved_mach_handler): New function. (reserved_mach): New variable. (reserve_mach_irqs): Use the new variable.
* device: Remove unused file.Justus Winter2017-09-211-44/+0
| | | | * device/dev_forward.defs: Remove unused file.
* vm: Remove old memory manager remnants.Justus Winter2017-09-211-5/+0
| | | | | * vm/vm_object.c (vm_object_accept_old_init_protocol): Remove. (vm_object_enter): Adapt.
* ddb: More gracefully handle address errorsSamuel Thibault2017-08-274-10/+12
| | | | | | | | | | | * i386/i386/db_interface.h (db_read_bytes): Return boolean_t instead of void. * i386/i386/db_interface.c (db_user_to_kernel_address): Return -1 instead of calling db_error() if address is bogus. (db_read_bytes): Return FALSE instead of calling db_error() if address is bogus. * ddb/db_access.c (db_get_task_value): Return 0 if db_read_bytes failed. * ddb/db_examine.c (db_xcdump): Only print * if db_read_bytes failed.
* i386: Fix pmap_remove on PAE kernels.Justus Winter2017-08-141-5/+3
| | | | | * i386/intel/pmap.c (pmap_remove): Fix iteration over page directory. (pmap_enter): Explain why it is ok here.
* vm: Improve error handling.Justus Winter2017-08-141-1/+5
| | | | | * vm/vm_map.c (vm_map_create): Gracefully handle resource exhaustion. (vm_map_fork): Likewise at the callsite.
* Fix typo.Justus Winter2017-08-141-1/+1
|
* ddb: Add magic variable $mapXX.Justus Winter2017-08-124-0/+38
| | | | | | | | | | Maps '$mapXX' to a VM map structure address. @var{xx} is a task identification number printed by a @code{show all tasks} command. * ddb/db_task_thread.c (db_get_map): New function. * ddb/db_task_thread.h (db_get_map): New declaration. * ddb/db_variables.c (db_vars): Add new variable. * doc/mach.texi: Document this.
* vm: Mute paging error message.Justus Winter2017-08-121-1/+1
| | | | | | * vm/vm_fault.c (vm_fault_page): Mute paging error message if the objects pager is NULL. This happens when a pager is destroyed, e.g. at system shutdown time when the root filesystem terminates.
* ddb: debug traps and port referencesJustus Winter2017-08-056-0/+80
| | | | | | | | | | | * ddb/db_command.c (db_debug_all_traps_cmd): New declaration and function. (db_debug_port_references_cmd): Likewise. * doc/mach.texi: Describe new commands. * i386/i386/db_interface.h (db_debug_all_traps): New declaration. * i386/i386/trap.c (db_debug_all_traps): New function. * ipc/mach_port.c (db_debug_port_references): New function. * ipc/mach_port.h (db_debug_port_references): New declaration.