History log of /dragonfly/sys/kern/kern_checkpoint.c (Results 1 – 25 of 43)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2
# 80d831e1 25-Jul-2020 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Refactor in-kernel system call API to remove bcopy()

* Change the in-kernel system call prototype to take the
system call arguments as a separate pointer, and make the
contents read-onl

kernel - Refactor in-kernel system call API to remove bcopy()

* Change the in-kernel system call prototype to take the
system call arguments as a separate pointer, and make the
contents read-only.

int sy_call_t (void *);
int sy_call_t (struct sysmsg *sysmsg, const void *);

* System calls with 6 arguments or less no longer need to copy
the arguments from the trapframe to a holding structure. Instead,
we simply point into the trapframe.

The L1 cache footprint will be a bit smaller, but in simple tests
the results are not noticably faster... maybe 1ns or so
(roughly 1%).

show more ...


Revision tags: v5.8.1
# b1999ea8 28-Mar-2020 Sascha Wildner <saw@online.de>

kernel: Remove <sys/n{amei,lookup}.h> from all files that don't need it.


Revision tags: v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2
# 4b566556 17-Feb-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Implement sbrk(), change low-address mmap hinting

* Change mmap()'s internal lower address bound from dmax (32GB)
to RLIMIT_DATA's current value. This allows the rlimit to be
e.g. redu

kernel - Implement sbrk(), change low-address mmap hinting

* Change mmap()'s internal lower address bound from dmax (32GB)
to RLIMIT_DATA's current value. This allows the rlimit to be
e.g. reduced and for hinted mmap()s to then map space below
the 4GB mark. The default data rlimit is 32GB.

This change is needed to support several languages, at least
lua and probably another one or two, who use mmap hinting
under the assumption that it can map space below the 4GB
address mark. The data limit must be lowered with a limit command
too, which can be scripted or patched for such programs.

* Implement the sbrk() system call. This system call was already
present but just returned EOPNOTSUPP and libc previously had its
own shim for sbrk() which used the ancient break() system call.
(Note that the prior implementation did not ENOSYS or signal).

sbrk() in the kernel is thread-safe for positive increments and
is also byte-granular (the old libc sbrk() was only page-granular).

sbrk() in the kernel does not implement negative increments and
will return EOPNOTSUPP if asked to. Negative increments were
historically designed to be able to 'free' memory allocated with
sbrk(), but it is not possible to implement the case in a modern
VM system due to the mmap changes above.

(1) Because the new mmap hinting changes make it possible for
normal mmap()s to have mapped space prior to the RLIMIT_DATA resource
limit being increased, causing intermingling of sbrk() and user mmap()d
regions. (2) because negative increments are not even remotely
thread-safe.

* Note the previous commit refactored libc to use the kernel sbrk()
and fall-back to its previous emulation code on failure, so libc
supports both new and old kernels.

* Remove the brk() shim from libc. brk() is not implemented by the
kernel. Symbol removed. Requires testing against ports so we may
have to add it back in but basically there is no way to implement
brk() properly with the mmap() hinting fix

* Adjust manual pages.

show more ...


Revision tags: v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1
# 35949930 20-Apr-2018 Matthew Dillon <dillon@apollo.backplane.com>

kernel - per-thread fd cache, p_fd lock bypass

* Implement a per-thread (fd,fp) cache. Cache hits can keep fp's
in a held state (avoiding the need to fhold()/fdrop() the ref count),
and bypasse

kernel - per-thread fd cache, p_fd lock bypass

* Implement a per-thread (fd,fp) cache. Cache hits can keep fp's
in a held state (avoiding the need to fhold()/fdrop() the ref count),
and bypasses the p_fd spinlock. This allows the file pointer structure
to generally be shared across cpu caches.

* Can cache up to four descriptors in each thread, LRU. This is the common
case. Highly threaded programs tend to focus work on a distinct
file descriptors in each thread.

* One file descriptor can be cached in up to four threads. This is
a significant limitation, though relatively uncommon. On a cache miss
the code drops into the normal shared p_fd spinlock lookup.

show more ...


Revision tags: v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0
# fb578eac 13-Oct-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Improve mountlist_scan() performance, track vfs_getvfs()

* Use a shared token whenever possible, and do not hold the token
across the callback in the mountlist_scan() call.

* vfs_getvfs(

kernel - Improve mountlist_scan() performance, track vfs_getvfs()

* Use a shared token whenever possible, and do not hold the token
across the callback in the mountlist_scan() call.

* vfs_getvfs() mount_hold()'s the returned mp. The caller is now
expected to mount_drop() it when done. This fixes a very rare
race.

show more ...


Revision tags: v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3
# f5b92db7 10-Jul-2015 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix panic during coredump

* multi-threaded coredumps were not stopping all other threads before
attempting to scan the vm_map, resulting in numerous possible panics.

* Add a new process

kernel - Fix panic during coredump

* multi-threaded coredumps were not stopping all other threads before
attempting to scan the vm_map, resulting in numerous possible panics.

* Add a new process state, SCORE, indicating that a core dump is in progress
and adjust proc_stop() and friends as well as any code which tests the
SSTOP state. SCORE overrides SSTOP.

* The coredump code actively waits for all running threads to stop before
proceeding.

* Prevent a deadlock between a SIGKILL and core dump in progress by
temporarily counting the master exit thread as a stopped thread (which
allows the coredump to proceed and finish).

Reported-by: marino

show more ...


Revision tags: v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1
# 04a31cc9 16-Apr-2013 Sascha Wildner <saw@online.de>

kernel/checkpoint: Fix wrong sizeof (p_sigacts is a pointer).


Revision tags: v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


# 4643740a 15-Nov-2011 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Major signal path adjustments to fix races, tsleep race fixes, +more

* Refactor the signal code to properly hold the lp->lwp_token. In
particular the ksignal() and lwp_signotify() paths.

kernel - Major signal path adjustments to fix races, tsleep race fixes, +more

* Refactor the signal code to properly hold the lp->lwp_token. In
particular the ksignal() and lwp_signotify() paths.

* The tsleep() path must also hold lp->lwp_token to properly handle
lp->lwp_stat states and interlocks.

* Refactor the timeout code in tsleep() to ensure that endtsleep() is only
called from the proper context, and fix races between endtsleep() and
lwkt_switch().

* Rename proc->p_flag to proc->p_flags

* Rename lwp->lwp_flag to lwp->lwp_flags

* Add lwp->lwp_mpflags and move flags which require atomic ops (are adjusted
when not the current thread) to the new field.

* Add td->td_mpflags and move flags which require atomic ops (are adjusted
when not the current thread) to the new field.

* Add some freeze testing code to the x86-64 trap code (default disabled).

show more ...


# f406e2fe 22-Oct-2011 Sascha Wildner <saw@online.de>

Remove some duplicate includes in sys/kern.


Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0, v2.3.2
# 973c11b9 24-Jun-2009 Matthew Dillon <dillon@apollo.backplane.com>

AMD64 - Fix many compile-time warnings. int/ptr type mismatches, %llx, etc.


Revision tags: v2.3.1, v2.2.1
# 6acb4ed8 07-Mar-2009 Simon Schubert <corecode@dragonflybsd.org>

signals: stop all threads of a process before taking a checkpoint

If we want to checkpoint a multi-threaded process, we need to wait until
the process is in a quiescent state, otherwise our checkpoi

signals: stop all threads of a process before taking a checkpoint

If we want to checkpoint a multi-threaded process, we need to wait until
the process is in a quiescent state, otherwise our checkpoint might be
incorrect.

show more ...


# 075a756c 01-Mar-2009 Matthew Dillon <dillon@apollo.backplane.com>

Adjust checkpoint restore to use same note order as coredumps.

Recent changes to the coredump code broke the checkpoint restore
code (checkpt -r) due to reordering of the ELF notes. Adjust the
chec

Adjust checkpoint restore to use same note order as coredumps.

Recent changes to the coredump code broke the checkpoint restore
code (checkpt -r) due to reordering of the ELF notes. Adjust the
checkpoint restore code to deal with the new ordering.

Reported-by: Samuel J. Greear <sjg@evilcode.net>

show more ...


Revision tags: v2.2.0, v2.3.0, v2.1.1, v2.0.1
# 67863d04 17-Sep-2008 Matthew Dillon <dillon@dragonflybsd.org>

* Implement the ability to export NULLFS mounts via NFS.

* Enforce PFS isolation when exporting a HAMMER PFS via a NULLFS mount.

NOTE: Exporting anything other then HAMMER PFS root's via nullfs doe

* Implement the ability to export NULLFS mounts via NFS.

* Enforce PFS isolation when exporting a HAMMER PFS via a NULLFS mount.

NOTE: Exporting anything other then HAMMER PFS root's via nullfs does
NOT protect the parent of the exported directory from being accessed via NFS.

Generally speaking this feature is implemented by giving each nullfs mount
a synthesized fsid based on what is being mounted and implementing the
NFS export infrastructure in the nullfs code instead of just bypassing those
functions to the underyling VFS.

show more ...


# ff7a3478 29-Jun-2007 Matthew Dillon <dillon@dragonflybsd.org>

Flag the checkpoint descriptor so on restore we can identify it and use the
descriptor for the restore rather then trying to look up the original
checkpoint file. This issue occurs when a program ca

Flag the checkpoint descriptor so on restore we can identify it and use the
descriptor for the restore rather then trying to look up the original
checkpoint file. This issue occurs when a program calls sys_checkpoint()
manually.

This allows a checkpoint-resume to be done on a copied checkpoint file,
or a gzipped (then gunzipped) checkpoint file, etc. The original checkpoint
file no longer needs to remain intact.

Requested-by: _why <why@ruby-lang.org>

show more ...


# b1b4e5a6 25-Feb-2007 Simon Schubert <corecode@dragonflybsd.org>

Get rid of struct user/UAREA.

Merge procsig with sigacts and replace usage of procsig with
sigacts, like it used to be in 4.4BSD.

Put signal-related inline functions in sys/signal2.h.

Reviewed-by:

Get rid of struct user/UAREA.

Merge procsig with sigacts and replace usage of procsig with
sigacts, like it used to be in 4.4BSD.

Put signal-related inline functions in sys/signal2.h.

Reviewed-by: Thomas E. Spanjaard <tgen@netphreax.net>

show more ...


# 7d20a8ff 21-Feb-2007 Simon Schubert <corecode@dragonflybsd.org>

1:1 Userland threading stage 2.19/4:

Move p_sig and p_code to struct lwp and add comment for them.
Make elf coredumps and checkpointing more lwp-aware.
Pass the signal responsible for the coredump d

1:1 Userland threading stage 2.19/4:

Move p_sig and p_code to struct lwp and add comment for them.
Make elf coredumps and checkpointing more lwp-aware.
Pass the signal responsible for the coredump down to the service routine.

show more ...


# 08f2f1bb 03-Feb-2007 Simon Schubert <corecode@dragonflybsd.org>

1:1 Userland threading stage 2.11/4:

Move signals into lwps, take p_lwp out of proc.

Originally-Submitted-by: David Xu <davidxu@freebsd.org>
Reviewed-by: Thomas E. Spanjaard <tgen@netphreax.net>


# e7440b28 12-Jan-2007 Matthew Dillon <dillon@dragonflybsd.org>

Fix a number of places where the kernel assumed it could directly access
user memory. Primarily the core dump code.


# 6ea70f76 23-Dec-2006 Sascha Wildner <swildner@dragonflybsd.org>

Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).


# f8c7a42d 20-Dec-2006 Matthew Dillon <dillon@dragonflybsd.org>

Rename sprintf -> ksprintf
Rename snprintf -> knsprintf

Make allowances for source files that are compiled for both userland and
the kernel.


# 88181b08 07-Nov-2006 Matthew Dillon <dillon@dragonflybsd.org>

Misc cleanups and CVS surgery. Move a number of header and source files
from machine/pc32 to cpu/i386 as part of the ongoing architectural separation
work and do a bit of cleanup.


# f8334305 23-Oct-2006 Matthew Dillon <dillon@dragonflybsd.org>

Further normalize the _XXX_H_ symbols used to conditionalize header file
inclusion.

Use _MACHINE_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/include".
Most headers already did this, but s

Further normalize the _XXX_H_ symbols used to conditionalize header file
inclusion.

Use _MACHINE_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/include".
Most headers already did this, but some did not.

Use _ARCH_SUBDIR_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/subdir"
instead of _I386_SUBDIR_BLAH_H_.

Change #include's made in architecture-specific directories to use
<machine/blah.h> instead of "blah.h", allowing the included header files
to be overrdden by another architecture. For example, a virtual kernel
architecture might include a header from arch/i386/include which then
includes some other header in arch/i386/include. But really we want that
other header to also go via the arch/vkernel/include, so the header files
in arch/i386/include must use <machine/blah.h> instead of "blah.h" for most
of their sub-includes.

Change most architecture-specific includes such as <i386/icu/icu.h> to
use a generic path through the "arch" softlink, such as <arch/icu/icu.h>.

Remove the temporary -I@/arch shim made in a recent commit, the <arch/...>
mechanism replaces it.

These changes allow us to implement heirarchical architectural overrides,
primarily intended for virtual kernel support. A virtual kernel uses an
architecture of 'vkernel' but must be able to access actual cpu-specific
header files such as those found in arch/i386. It does this using a
"cpu" softlink. For example, someone including <machine/atomic.h> in a
vkernel build would hit the "arch/vkernel/include/atomic.h" header, and this
header could then #include <cpu/atomic.h> to access the actual cpu's
atomic.h file: "arch/i386/include/atomic.h".

The ultimate effect is that an architecture can build on another
architecture's header and source files.

show more ...


# efda3bd0 05-Sep-2006 Matthew Dillon <dillon@dragonflybsd.org>

Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1


# 753fd850 05-Jun-2006 Matthew Dillon <dillon@dragonflybsd.org>

Modify kern/makesyscall.sh to prefix all kernel system call procedures
with "sys_". Modify all related kernel procedures to use the new naming
convention. This gets rid of most of the namespace ove

Modify kern/makesyscall.sh to prefix all kernel system call procedures
with "sys_". Modify all related kernel procedures to use the new naming
convention. This gets rid of most of the namespace overloading between
the kernel and standard header files.

show more ...


12