CBD (CXL Block Device)
CBD (CXL Block Device) provides two usage scenarios: single-host and multi-hosts.
(1) Single-host scenario, CBD can use a pmem device as a cache for block devices, providing a caching mechanism specifically designed for persistent memory.
+-----------------------------------------------------------------+
| single-host |
+-----------------------------------------------------------------+
| |
| |
| |
| |
| |
| +-----------+ +------------+ |
| | /dev/cbd0 | | /dev/cbd1 | |
| | | | | |
| +---------------------|-----------|-----|------------|-------+ |
| | | | | | | |
| | /dev/pmem0 | cbd0 cache| | cbd1 cache | | |
| | | | | | | |
| +---------------------|-----------|-----|------------|-------+ |
| |+---------+| |+----------+| |
| ||/dev/sda || || /dev/sdb || |
| |+---------+| |+----------+| |
| +-----------+ +------------+ |
+-----------------------------------------------------------------+
(2) Multi-hosts scenario, CBD also provides a cache while taking advantage of shared memory features, allowing users to access block devices on other nodes across different hosts.
As shared memory is supported in CXL3.0 spec, we can transfer data via CXL shared memory. CBD use CXL shared memory to transfer data between node-1 and node-2.
+--------------------------------------------------------------------------------------------------------+
| multi-hosts |
+--------------------------------------------------------------------------------------------------------+
| |
| |
| +-------------------------------+ +------------------------------------+ |
| | node-1 | | node-2 | |
| +-------------------------------+ +------------------------------------+ |
| | | | | |
| | +-------+ +---------+ | |
| | | cbd0 | | backend0+------------------+ | |
| | +-------+ +---------+ | | |
| | | pmem0 | | pmem0 | v | |
| | +-------+-------+ +---------+----+ +---------------+ |
| | | cxl driver | | cxl driver | | /dev/sda | |
| +---------------+--------+------+ +-----+--------+-----+---------------+ |
| | | |
| | | |
| | CXL CXL | |
| +----------------+ +-----------+ |
| | | |
| | | |
| | | |
| +-------------------------+---------------+--------------------------+ |
| | +---------------+ | |
| | shared memory device | cbd0 cache | | |
| | +---------------+ | |
| +--------------------------------------------------------------------+ |
| |
+--------------------------------------------------------------------------------------------------------+
cbd Linux kernel modules
The CBD kernel module is part of the Linux kernel, maintained under the DataTravelGuide organization.
It has currently sent an RFC version to the Linux community.
V1 patchset for CBD sent here:
V2 patchset:
V3 patchset:
cbd userspace tool
The CBD user-space command cbdctrl to manage cbd resources.
cbd test suites
cbd-tests is an automated test suite based on the Avocado test framework, specifically designed for CBD. It includes performance tests (fio), data read/write tests (xfstests), and other tests (continuously being added).
test results
The test reports for cbd-tests are automatically generated by Avocado. They include information about the runtime environment, all test results, detailed test processes for each test case, and more.