22
persistent memory. We can see in Step 3 that the store barrier/fence operation waited
for the pointer from Node 2 to Node 1 to update before updating the head pointer. The
updates in the CPU cache matches the persistent memory version, so it now globally
visible. This is a simplistic approach to solving the problem because store barriers do not
provide atomicity or data integrity. A complete solution should also use transactions to
ensure the data is atomically updated.
The PMDK detects the platform, CPU, and persistent memory features when the
memory pool is opened and then uses the optimal instructions and fencing to preserve
write ordering. (Memory pools are files that are memory mapped into the process
address space; later chapters describe them in more detail.)
Figure 2-4. Adding a new node to an existing linked list using a store barrier
Chapter 2 persistent MeMory arChiteCture
persistent memory. We can see in Step 3 that the store barrier/fence operation waited
for the pointer from Node 2 to Node 1 to update before updating the head pointer. The
updates in the CPU cache matches the persistent memory version, so it now globally
visible. This is a simplistic approach to solving the problem because store barriers do not
provide atomicity or data integrity. A complete solution should also use transactions to
ensure the data is atomically updated.
The PMDK detects the platform, CPU, and persistent memory features when the
memory pool is opened and then uses the optimal instructions and fencing to preserve
write ordering. (Memory pools are files that are memory mapped into the process
address space; later chapters describe them in more detail.)
Figure 2-4. Adding a new node to an existing linked list using a store barrier
Chapter 2 persistent MeMory arChiteCture
