Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ xctrace
build
cmake-*
.vscode
.worktrees/
release
benchmarks*
Makefile
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ target_include_directories(test_pgas_controller_counters PRIVATE include src ${s
target_link_libraries(test_pgas_controller_counters cxlmemsim spdlog::spdlog_header_only ${RT_LIB} ${ATOMIC_LIB})
add_test(NAME test_pgas_controller_counters COMMAND test_pgas_controller_counters)

add_executable(test_pgas_poll_policy tests/test_pgas_poll_policy.cpp)
target_include_directories(test_pgas_poll_policy PRIVATE include)
add_test(NAME test_pgas_poll_policy COMMAND test_pgas_poll_policy)

add_executable(test_cxl_memsim_wait_policy tests/test_cxl_memsim_wait_policy.c)
target_include_directories(test_cxl_memsim_wait_policy PRIVATE lib/qemu/include)
add_test(NAME test_cxl_memsim_wait_policy COMMAND test_cxl_memsim_wait_policy)

add_executable(test_coherence_protocol_v2 tests/test_coherence_protocol_v2.cpp)
target_include_directories(test_coherence_protocol_v2 PRIVATE include)
target_link_libraries(test_coherence_protocol_v2 cxlmemsim)
Expand Down
82 changes: 82 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# PGAS fast-poll live evidence

## Configuration

The server ran the synchronous PGAS shared-memory protocol with one polling
worker and transport-only accounting:

```text
./build/cxlmemsim_server --comm-mode=pgas-shm \
--pgas-shm-name=/cxlmemsim_pgas --capacity=256 \
--pgas-workers=1 --pgas-spin-us=1000 --pgas-yield-count=10 \
--pgas-idle-sleep-us=100 --pgas-record-accesses=false
```

`record-accesses=false` skips the controller's linear per-address occupation
history. It does not skip address validation, data reads/writes, synchronous
responses, or protocol counters.

The guest allocator mapped the working buffer `rw-s` from `/dev/dax0.0`, and
the device remained bound to `/sys/bus/dax/drivers/device_dax`.

## Adaptive-client result

The exact guest command was:

```text
LD_PRELOAD=target/debug/libcxlalloc_preload.so \
/root/lmbench/bin/x86_64-linux-gnu/lat_mem_rd -t -N 4 128 64
```

The adaptive QEMU client completed all 115 numeric rows with no zero values and
exit status 0. Its final row was:

```text
128.00000 5009.636
```

QEMU reported a 497.7 ns average successful server-response wait after
771,000,000 operations. It also reported one isolated 100 millisecond response
timeout; this is retained as a limitation even though the benchmark completed.

## Original-wait mediated control

The same QEMU integration checkout was rebuilt with the adaptive wait reverted.
To avoid repeating the full logarithmic sweep, only the 128 MiB endpoint was
selected while retaining `-N 4`:

```text
LD_PRELOAD=target/debug/libcxlalloc_preload.so \
/root/lmbench/bin/x86_64-linux-gnu/lat_mem_rd -t -N 4 \
-s 134217728 -e 134217728 128 64
```

That control exited 0 at:

```text
128.00000 31963.106
```

Server reads advanced from 404,900,000 to 430,000,000 and writes from
370,898,371 to 400,260,303 during this endpoint, proving mediation. Relative
to this control, adaptive polling reduced endpoint latency by 84.3%.

## Rejected direct control

An installed-QEMU run completed at 4062.530 ns/load, but the server log and
counters did not advance during that run. It is retained as a non-mediated
devdax lower-bound reference and is not used as evidence of server-path
performance.

## Correctness boundary

- Adaptive run: 115 numeric rows, zero zero-valued rows, exit status 0.
- Original-wait endpoint: one numeric row, exit status 0.
- `/dev/dax0.0` remained in `devdax` mode.
- No invalid-opcode trap or `lat_mem_rd` segfault appeared in either accepted
mediated run.

The remaining approximately 5 microseconds includes KVM MMIO exit, QEMU
dispatch, and a synchronous memory-server round trip. The approximately 4
microsecond non-mediated result is not an achievable server-path target without
changing the per-load mediation requirement.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
boot_id=e1794343-43fe-41f0-bc19-bc1c84486528
dmesg_lines=675
invalid_opcode=0
segfaults=0
driver=/sys/bus/dax/drivers/device_dax
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
boot_id=e1794343-43fe-41f0-bc19-bc1c84486528
dmesg_lines=675
invalid_opcode=0
segfaults=0
driver=/sys/bus/dax/drivers/device_dax
14 changes: 14 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/acceptance.after
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2026-08-21T00:39:00Z
bc9911b6-4ca8-4da6-bd9f-97d1e35daeed
675
0
0
[
{
"chardev":"dax0.0",
"size":262144000,
"target_node":1,
"align":2097152,
"mode":"devdax"
}
]
5 changes: 5 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/acceptance.before
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2026-08-20T23:38:14Z
bc9911b6-4ca8-4da6-bd9f-97d1e35daeed
675
0
0
6 changes: 6 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/acceptance.summary
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
numeric_rows=115
zero_rows=0
final=128.00000 5009.636
exit_status=0
qemu_timeout_lines=1
qemu_last_wait=qemu-system-x86_64: info: CXL Type3: PGAS response waits @ 771000000 ops: avg=497.7 ns, max=36712215 ns
29 changes: 29 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/devdax-transport.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"region":"region0",
"resource":45365592064,
"size":268435456,
"type":"pmem",
"interleave_ways":1,
"interleave_granularity":256,
"decode_state":"commit",
"mappings":[
{
"position":0,
"memdev":"mem0",
"decoder":"decoder2.0"
}
],
"qos_class_mismatch":true
}
crw------- 1 root root 250, 0 Aug 20 23:37 /dev/dax0.0
[
{
"chardev":"dax0.0",
"size":262144000,
"target_node":1,
"align":2097152,
"mode":"devdax"
}
]
driver=device_dax
trap_count=0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"stride=64
128.00000 31963.106
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
116 changes: 116 additions & 0 deletions artifact/pgas_fast_poll/2026-08-20T2255Z/lat_mem_rd-128m-oldclient.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
"stride=64
0.00049 3880.099
0.00098 3850.937
0.00195 3812.414
0.00293 3816.505
0.00391 3831.690
0.00586 3809.867
0.00781 3997.977
0.00977 3961.080
0.01172 3948.675
0.01367 3941.966
0.01562 3967.314
0.01758 3915.214
0.01953 3920.662
0.02148 3944.414
0.02344 3937.980
0.02539 3925.585
0.02734 3911.098
0.02930 3938.489
0.03125 3949.359
0.03516 3949.021
0.03906 3940.404
0.04297 3907.563
0.04688 3924.560
0.05078 3932.792
0.05469 3927.114
0.05859 3930.498
0.06250 3925.270
0.07031 3922.500
0.07812 3944.494
0.08594 3935.692
0.09375 3943.227
0.10156 3930.114
0.10938 3931.193
0.11719 3939.480
0.12500 3986.726
0.14062 3935.157
0.15625 3932.020
0.17188 3942.709
0.18750 4020.261
0.20312 3908.714
0.21875 3939.343
0.23438 3948.240
0.25000 3934.413
0.28125 3944.317
0.31250 3964.635
0.34375 3944.335
0.37500 3955.657
0.40625 4002.744
0.43750 3925.687
0.46875 3922.028
0.50000 3936.220
0.56250 4015.515
0.62500 3981.464
0.68750 3926.495
0.75000 3950.716
0.81250 3906.167
0.87500 3935.968
0.93750 3910.107
1.00000 3937.218
1.12500 3926.483
1.25000 3926.360
1.37500 3935.962
1.50000 3977.177
1.62500 3930.438
1.75000 3928.246
1.87500 3935.483
2.00000 3930.229
2.25000 3898.459
2.50000 3907.599
2.75000 3915.876
3.00000 3908.618
3.25000 3910.582
3.50000 3923.836
3.75000 3905.502
4.00000 3914.360
4.50000 3928.022
5.00000 3910.570
5.50000 3940.843
6.00000 3927.730
6.50000 3922.701
7.00000 3944.560
7.50000 3945.148
8.00000 3940.061
9.00000 3908.915
10.00000 3942.309
11.00000 3954.706
12.00000 3962.717
13.00000 4025.502
14.00000 3937.633
15.00000 3929.874
16.00000 3955.542
18.00000 3997.153
20.00000 3980.909
22.00000 3942.205
24.00000 4005.660
26.00000 4003.155
28.00000 4031.798
30.00000 4014.516
32.00000 4026.946
36.00000 4004.409
40.00000 4025.850
44.00000 4061.681
48.00000 4105.995
52.00000 4065.266
56.00000 4066.803
60.00000 4077.514
64.00000 4138.188
72.00000 4067.699
80.00000 4081.586
88.00000 4088.746
96.00000 4052.300
104.00000 4060.704
112.00000 4135.704
120.00000 4090.074
128.00000 4062.530
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Loading
Loading