path: root/lpsm_init.3.in
diff options
authorH. Peter Anvin <hpa@zytor.com>2001-10-26 01:58:29 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-26 01:58:29 +0000
commit4bd929b8e7ca1b8b7d4b2479216eb9120b8b7350 (patch)
treed47d6232353ac73108753c753b124501a9702b9b /lpsm_init.3.in
parent9f4b121beb7c16b26f25a694ceba998d3d1a23c8 (diff)
Split up documentation further. Add lpsm_need_checkpoint local variable.
Diffstat (limited to 'lpsm_init.3.in')
1 files changed, 6 insertions, 112 deletions
diff --git a/lpsm_init.3.in b/lpsm_init.3.in
index e07473a..abd87c5 100644
--- a/lpsm_init.3.in
+++ b/lpsm_init.3.in
@@ -10,22 +10,18 @@
.\" -----------------------------------------------------------------------
.\" $Id$
-.TH LPSM_INIT 3 "22 October 2001" "LPSM @@VERSION@@" "Linux Persistent Memory"
+.TH LPSM_INIT 3 "25 October 2001" "LPSM @@VERSION@@" "Linux Persistent Memory"
-lpsm_init, lpsm_checkpoint, lpsm_shutdown \- Manage persistent memory
+lpsm_init \- Open persistent memory in managed mode
.B #include <lpsm.h>
.BI "void **lpsm_init(const char " "*datafile" ", const char " "*logfile" ");"
-.BI "pid_t lpsm_checkpoint(double " "ratio" ", enum psmsync " "wait" ");"
-.BI "void lpsm_shutdown(void);"
-These functions manage a persistent memory arena in managed mode,
-available for use with
+This function is used to manage an LPSM persistent memory arena in
+managed mode, available for use with
.B lpsm_malloc()
and its related functions.
@@ -42,113 +38,11 @@ On success, returns a pointer to an array of
which are available for the application to point to its
fundamental data structures. On failure, returns
-.B lpsm_checkpoint()
-is called to indicate that the memory arena is currently in a
-consistent state and is safe to checkpoint. On a crash, the
-memory arena is
-.I always
-guaranteed to be returned to the state
-as of one of the calls to
-.BR lpsm_checkpoint() ;
-which exact one depends on the
-.I wait
-.I ratio
-parameter indicates if a log flush should take
-place; if the logfile is at least
-.I ratio
-times the size of the datafile, a log flush (replay the log into the
-datafile and truncate the logfile) will happen once the log has been
-written. Specify
-.B 0.0
-to do a log flush every time,
-to specify that no log flush should happen.
-.I wait
-parameter controls the level of asynchronicity of the checkpoint process:
-A checkpoint is unconditionally forked, and
-not waited for. The application is responsible for handing
-or ignoring the resulting
-This provides no guarantees that a checkpoint is complete
-until the
-comes back.
-.B wait()
-for the previous checkpoint process, if it is still running, skip this
-checkpoint opportunity. This provides no guarantees for which
-checkpoint opportunity will be used in the event of a crash, but is
-useful if checkpoint opportunities are very frequent, and continued
-execution of the master process is important.
-.B wait()
-for the previous checkpoint process, if it is still running, sleep
-until the previous checkpoint process has finished. This guarantees
-that in the event of a crash, the recovery point will be no later that
-one checkpoint
-.I before
-the latest checkpoint executed.
-.B wait()
-for the previous
-.I and
-current checkpoint processes. This guarantees that upon exit of
-.B lpsm_checkpoint()
-the persistent memory is fully consistent on disk. This guarantees
-that in the event of a crash, the recovery point will be no later than
-the latest checkpoint executed. This is typically used with a
-.I ratio
-argument of
-.B 0.0
-to perform a clean shutdown.
-.B lpsm_shutdown()
-shuts down the persistent memory system, frees all resources,
-and restores the previous state of the
-signal handler.
-.IR "It does not perform a checkpoint before doing so" ;
-normally a clean shutdown is performed as:
-lpsm_checkpoint(0.0 , PSMSYNC_SYNC);
-.B lpsm_shutdown()
-followed by
-.B lpsm_init()
-can be used in exceptional events to reinitialize the arena to the
-last checkpointed state. This is a very slow operation.
.B lpsm_init()
returns the pointer to the root pointer array, or
on failure.
-.B lpsm_checkpoint()
-returns 0 after a successful synchronous operation,
-.B "(pid_t)-1"
-on failure, or the pid of the spawned asychronous process.
-.B lpsm_shutdown()
-does not return a value.
On error,
.B lpsm_init()
@@ -163,8 +57,8 @@ is set to
.BR lpsm_malloc (3),
.BR lpsm_arena_init (3),
+.BR lpsm_checkpoint (3),
+.BR lpsm_shutdown (3),
.BR lpsm_recover (3).
-Checkpointing failures are currently not handled gracefully.
The persistent memory system is not currently thread-safe.