Skip to main content

S5: CXL memory access

Question: How does a memory access reach a storage model?

Time: 30 minutes. Prerequisites: completed setup. See qualification and limitations before running.

Mechanism​

CXL memory accesses traverse CPU mappings and the FEMU device cache
CPU caching and the emulated cache are distinct; record which path the workload exercises.
  1. The guest discovers the CXL topology and creates a RAM region.
  2. Keep the region in devdax mode for a bounded explicit mapping.
  3. Compare readback and device counters across a controlled access pattern.

Predict​

Which cache must miss before a load reaches the emulated device?

Write down a predicted state or counter change before executing the commands.

Run​

Host terminal, unless a command is explicitly labelled Guest. Source and export the identity fields from connection.env. These labs overwrite the explicit disposable namespace. Use a fresh VM for each independent arm.

# Host: use the CXL-specific image and the recorded QMP socket.
LAB="$PWD/labs" QMP="$RUN_DIR/qmp.sock" bash labs/bin/lab-s5-cxl.sh

Check your evidence​

  • A real devdax region is created and mapped.
  • Written bytes read back correctly.
  • The receipt contains before/after cache counters and their scope.

The host runner retrieves raw receipts and preserves the guest exit status. Keep unsuccessful attempts; do not replace them with a later successful log.

Interpret​

What would need to change before claiming calibrated load latency?

Explain the mechanism and the measurement boundary. A throughput number by itself is not evidence that the intended feature was exercised.

Recover​

  • Region creation fails: check guest config and decoder topology.
  • Device is system RAM: stop; do not force-convert memory in use.
  • No counter change: check CPU caching and whether the mapping was accessed.

Save the receipt before resetting the VM.

Materials and source​

Slides, scripts and worksheet. Videos are not yet recorded. The frozen public source is 1918eb9795ba. The FEMU Manual explains the implementation and supported properties.