| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Message-Id: <20230508213136.608575-42-bugaevc@gmail.com>
|
|
|
|
|
|
|
| |
Comparing an unsigned to be superior or equals to 0 is always true,
instead move the assert before the substraction and compare it to the
value to substract.
Message-Id: <20220119192945.36654-2-etienne.brateau@gmail.com>
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
|
| |
* libpager/pager-memcpy.c (pager_memcpy): Pass 1 as second parameter to
sigsetjmp.
* libstore/memobj.c (memobj_memcpy): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to save blocked signals, otherwise longjmp will not unblock
SIGSEGV/SIGBUS, and thus next exception will kill us. Also, we need to
make sure that the preemptor is set at the right window in main memory
before letting a handler see it.
* libpager/pager-memcpy.c (do_memcpy): Call __sync_synchronize()
between aligning the fault preemptor and actually accessing data.
(fault): Use siglongjmp instead of longjmp.
(pager_memcpy): Use sigsetjmp instead of setjmp.
* libstore/memobj.c (copy, fault, memobj_memcpy): Likewise.
|
|
|
|
|
|
| |
* libpager/pager-memcpy.c (pager_memcpy): Reset address passed to vm_map
on each loop, to avoid potentially monotonically increasing up to
VM_MAX_ADDRESS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some versions of gnumach actually take address as a mapping hint, and would fail
if the hint is bogus. Make sure to pass 0 for those versions.
* console/pager.c (user_pager_create): Make sure to set *user to 0 before
calling vm_map.
* libdiskfs/disk-pager.c (diskfs_start_disk_pager): Make sure to set *image to 0
before calling vm_map.
* libpager/pager-memcpy.c (pager_memcpy): Set window to 0 before calling
vm_map.
* tmpfs/node.c (diskfs_get_filemap): Make sure to set np->dn->u.reg.memref to 0
before calling vm_map.
|
|
|
|
|
| |
* libpager/pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): Increase to 8 pages.
(VMCOPY_WINDOW_DEFAULT_SIZE, MEMCPY_WINDOW_DEFAULT_SIZE): Increase to 32 pages.
|
|
|
|
|
| |
* pager-memcpy.c (pager_memcpy): Pass not the block but the byte
offset of the page in question to pager_get_error.
|
|
|
|
|
| |
* pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): New macro.
(pager_memcpy): Rewritten to use vmcopy.
|
|
|
|
| |
* pager-memcpy.c: Include <string.h> for memcpy decl.
|
|
|
|
| |
* pager-memcpy.c (pager_memcpy): Short-circuit return for zero size.
|
|
|
|
|
| |
* priv.h: Add #include <sys/mman.h> for munmap decl.
* pager-memcpy.c: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* data-return.c (_pager_do_write_request): Use munmap instead of
vm_deallocate.
* object-terminate.c (_pager_free_structure): Likewise.
* pagemap.c (_pager_pagemap_resize): Likewise.
* pager-memcpy.c (pager_memcpy): Likewise.
* pager.h (pager_write_page): Doc adjustment.
|
|
|
|
| |
`preempter' -> `preemptor'.
|
| |
|
|
|