| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
tests: add reusable mmap_consistency multi-actor pattern helper Add a reusable test-local helper that drives canonical multi-actor mmap consistency access patterns against a caller-mapped OBMM shmdev range. include/tests/consistency/mmap_consistency.h tests/obmm/consistency/common/mmap_consistency.c Pattern catalogue (selected via enum mmap_consistency_pattern): - EXCLUSIVE: scheduled full-range handover across actors with point-to-point handshake sync (send_to_actor / recv_from_actor with turn_idx validation). The actor_ids array is a schedule of turn-holders; an actor may appear multiple times. {0, 1, 0} means actor 0 writes, actor 1 checks and overwrites, actor 0 checks; both propagation directions are exercised. - PARALLEL: per-role symmetric segment access with centralized actor_barrier sync. The actor_ids array is a participant list; each role owns one segment computed by access_size and num_actors. Phase 3 verification is hybrid: for num_actors == 2 each actor verifies all segments; for num_actors > 2 each actor verifies only its ring-predecessor's segment (each phase 2 overwrite is still cross-verified by exactly one other actor). Ownership model: each actor reports its own cacheability through ownership_fd. A non-negative fd enables PROT_NONE / PROT_WRITE / PROT_READ transitions via obmm_set_ownership() around each access; -1 means the actor mapped PROT_READ | PROT_WRITE directly and the helper falls back to __atomic_thread_fence() for ordering. Mixed-mode pairings are supported because protection transitions are per-actor local state and the shared physical memory carries the data. Exclusive-pattern check state alternates by absolute turn parity to expand coverage of the OBMM coherency paths driven by PROT_* transitions: even turns check with PROT_READ, odd turns check with PROT_WRITE (which also saves one ownership transition before the subsequent fill on middle turns). Seeds are derived internally from get_test_seed() so every actor of a test case computes identical seeds (per the reproducibility guideline). The helper is added under tests/obmm/consistency/common/ matching the existing tests/obmm/performance/common/ pattern for test-local shared helpers (no framework change, auto-globbed by tests/CMakeLists.txt). | 2 个月前 | |
tests/performance: back up and restore printk via /proc, not a shell file perf_backup_and_set_printk and perf_restore_printk shelled out with "ls /tmp/printk.old || cat ..." / "ls ... && cat ..." and cast the system() return to (void), so a failed backup (e.g. read-only /tmp) was silent and the subsequent restore had nothing to read -- printk was then left lowered for the rest of the run. The fixed-path file backup was also trusted blindly: once it existed, the "ls" guard skipped re-backup forever, so a stale file from a crashed prior run would "restore" the perf setting instead of the original. Read and write /proc/sys/kernel/printk directly and keep the backup in a per-process in-memory buffer: the backup cannot go stale, a capture failure is fatal (printk is never lowered without a restore path), and a restore failure is logged. The abnormal-exit cleanup handler restores from the same buffer. | 3 个月前 | |
style: apply clang-format Signed-off-by: Yiqun Liu <yiqun.liu.dev@outlook.com> | 2 个月前 | |
Fix cross-directory includes and memoryless NUMA node handling This commit combines two logical changes that happened in sequence: 1. Fix export tests on memoryless NUMA nodes - Adapt to a new kernel constraint: ubmem no longer allows repeated mami4ubmem_map() calls on the same memory segment (same dcna, uba, tid). query_addr.c previously used uba=0 for all four import devices, violating this constraint. - query_addr.c: use cumulative offset as unique uba for each import - Lower import upper bound from SZ_4G to SZ_1G (four imports ~4GB total) - priv_len.c: fix hardcoded controller-0 NUMA lookup for memoryless nodes - Framework: handle memoryless NUMA nodes gracefully instead of aborting 2. Refactor: eliminate cross-directory #include paths - Create include/tests/ directory for test helper headers - Move import_test_common.h, ras_common.h, and performance/common/*.h to include/tests/ and include/tests/performance/ - Update all test files to use canonical include paths like "tests/import_test_common.h" instead of "../obmm_import_api/import_test_common.h" - Fix framework code to use "framework/tcp_utils.h" instead of "../framework/tcp_utils.h" - Update CMakeLists.txt: change src/framework include path to src/ root so framework code can use canonical "framework/" prefix All include paths now follow the repository's canonical hierarchy: - Framework headers: "framework/...", "utils/...", "compat/..." - Test helper headers: "tests/...", "tests/performance/..." Build verified: obmm_test_cases target builds successfully. Signed-off-by: Gao Tianxiong <318328978@qq.com> | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 个月前 |