6.5810: Operating Systems Research Seminar

Environment

Ubuntu 22.04.4

SPDK v22.05.x

DPDK v22.03.0 (I have used 22.11.5 and 24.03.0, they have more problem than the version I choose) (At this moment, I use 23.11.1) I did not change any version of the dependencies to build

~$ mkdir spdk_test
~$ cd spdk_test
~/spdk_test$ git clone <https://github.com/DPDK/dpdk>
~/spdk_test$ cd dpdk
~/spdk_test/dpdk$ git checkout v22.11
~/spdk_test/dpdk$ meson setup build
~/spdk_test/dpdk$ meson configure -Dprefix=$PWD/build build
~/spdk_test/dpdk$ cd build
~/spdk_test/dpdk/build$ ninja
~/spdk_test/dpdk/build$ ninja install  

*If the ninja -C build got an error, just ignore at first and run again until there is no process then solve it as the error

Got bug from scripts/pkgdep.sh go to … and delete change python to python3 since python is not available anymore.

Untitled

~/spdk_test$ git clone <https://github.com/spdk/spdk.git>
~/spdk_test$ cd spdk
~/spdk_test/spdk$ git checkout v22.05.x
~/spdk_test/spdk$ sudo scripts/pkgdep.sh
~/spdk_test/spdk$ git submodule update --init
~/spdk_test/spdk$ export DPDK_ROOT=../dpdk
~/spdk_test/spdk$ ./configure --with-dpdk=$(DPDK_ROOT)/build/
~/spdk_test/spdk$ make -j 8
~/spdk_test/spdk$ sudo PCI_ALLOWED=0000:01:00.0 ./scripts/setup.sh
~/spdk_test/spdk$ sudo ./scripts/setup.sh status

~/spdk_test/spdk$ cd build/examples
~/spdk_test/spdk/build/examples$ sudo ./identify 
TELEMETRY: No legacy callbacks, legacy socket not created
=====================================================
NVMe Controller at 0000:01:00.0 [15b7:5011]
=====================================================
Controller Capabilities/Features
================================
Vendor ID:                             15b7
Subsystem Vendor ID:                   15b7
Serial Number:                         211413457702
Model Number:                          WDS100T1X0E-00AFY0
Firmware Version:                      613000WD
Recommended Arb Burst:                 4
IEEE OUI Identifier:                   44 1b 00
Multi-path I/O
  May have multiple subsystem ports:   No
  May have multiple controllers:       No
  Associated with SR-IOV VF:           No
Max Data Transfer Size:                524288
Max Number of Namespaces:              1
NVMe Specification Version (VS):       1.4
NVMe Specification Version (Identify): 1.4
Maximum Queue Entries:                 16384
Contiguous Queues Required:            Yes
Arbitration Mechanisms Supported
  Weighted Round Robin:                Not Supported
  Vendor Specific:                     Not Supported
Reset Timeout:                         10000 ms
Doorbell Stride:                       4 bytes
NVM Subsystem Reset:                   Supported
Command Sets Supported
  NVM Command Set:                     Supported
Boot Partition:                        Not Supported
Memory Page Size Minimum:              4096 bytes
Memory Page Size Maximum:              4096 bytes
Persistent Memory Region:              Not Supported
Optional Asynchronous Events Supported
  Namespace Attribute Notices:         Not Supported
  Firmware Activation Notices:         Supported
128-bit Host Identifier:               Not Supported

Controller Memory Buffer Support
================================
Supported:                             No

Persistent Memory Region Support
================================
Supported:                             No

Admin Command Set Attributes
============================
Security Send/Receive:                 Supported
Format NVM:                            Supported
Firmware Activate/Download:            Supported
Namespace Management:                  Not Supported
Device Self-Test:                      Supported
Directives:                            Not Supported
NVMe-MI:                               Not Supported
Virtualization Management:             Not Supported
Doorbell Buffer Config:                Not Supported
Abort Command Limit:                   5
Async Event Request Limit:             8
Number of Firmware Slots:              2
Firmware Slot 1 Read-Only:             No
Firmware Update Granularity:           4 KiB
Per-Namespace SMART Log:               No
Asymmetric Namespace Access Log Page:  Not Supported
Command Effects Log Page:              Supported
Get Log Page Extended Data:            Supported
Telemetry Log Pages:                   Supported
Error Log Page Entries Supported:      256
Keep Alive:                            Not Supported

NVM Command Set Attributes
==========================
Submission Queue Entry Size
  Max:                       64
  Min:                       64
Completion Queue Entry Size
  Max:                       16
  Min:                       16
Number of Namespaces:        1
Compare Command:             Supported
Write Uncorrectable Command: Supported
Dataset Management Command:  Supported
Write Zeroes Command:        Supported
Set Features Save Field:     Supported
Reservations:                Not Supported
Timestamp:                   Supported
Copy:                        Not Supported
Volatile Write Cache:        Present
Atomic Write Unit (Normal):  1
Atomic Write Unit (PFail):   1
Atomic Compare & Write Unit: 1
Fused Compare & Write:       Not Supported
Scatter-Gather List
  SGL Command Set:           Not Supported
  SGL Keyed:                 Not Supported
  SGL Bit Bucket Descriptor: Not Supported
  SGL Metadata Pointer:      Not Supported
  Oversized SGL:             Not Supported
  SGL Metadata Address:      Not Supported
  SGL Offset:                Not Supported
  Transport SGL Data Block:  Not Supported
Replay Protected Memory Block:  Not Supported

Firmware Slot Information
=========================
Active slot:                 1
Slot 1 Firmware Revision:    613000WD

Commands Supported and Effects
==============================
Admin Commands
--------------
   Delete I/O Submission Queue (00h): Supported 
   Create I/O Submission Queue (01h): Supported 
                  Get Log Page (02h): Supported 
   Delete I/O Completion Queue (04h): Supported 
   Create I/O Completion Queue (05h): Supported 
                      Identify (06h): Supported 
                         Abort (08h): Supported 
                  Set Features (09h): Supported 
                  Get Features (0Ah): Supported 
    Asynchronous Event Request (0Ch): Supported 
               Firmware Commit (10h): Supported Ctrlr-Cap-Change 
       Firmware Image Download (11h): Supported 
              Device Self-test (14h): Supported 
                    Format NVM (80h): Supported LBA-Change NS-Cap-Change Per-NS-Exclusive
                 Security Send (81h): Supported LBA-Change All-NS-Exclusive
              Security Receive (82h): Supported LBA-Change All-NS-Exclusive
                      Sanitize (84h): Supported LBA-Change All-NS-Exclusive
               Vendor specific (C0h): Supported 
               Vendor specific (DFh): Supported 
               Vendor specific (E2h): Supported 
               Vendor specific (E5h): Supported LBA-Change 
               Vendor specific (E6h): Supported 
               Vendor specific (E9h): Supported 
               Vendor specific (EAh): Supported 
               Vendor specific (FAh): Supported 
I/O Commands
------------
                         Flush (00h): Supported 
                         Write (01h): Supported LBA-Change 
                          Read (02h): Supported 
           Write Uncorrectable (04h): Supported LBA-Change 
                       Compare (05h): Supported 
                  Write Zeroes (08h): Supported LBA-Change 
            Dataset Management (09h): Supported LBA-Change Per-NS-Exclusive

Error Log
=========

Arbitration
===========
Arbitration Burst:           16

Power Management
================
Number of Power States:      5
Current Power State:         Power State #0
Power State #0:  Max Power:   9.00 W
Power State #1:  Max Power:   4.10 W
Power State #2:  Max Power:   3.50 W
Power State #3:  Max Power: 0.0250 W
Power State #4:  Max Power: 0.0050 W
Non-Operational Permissive Mode: Supported

Health Information
==================
Critical Warnings:
  Available Spare Space:     OK
  Temperature:               OK
  Device Reliability:        OK
  Read Only:                 No
  Volatile Memory Backup:    OK
Current Temperature:         311 Kelvin (38 Celsius)
Temperature Threshold:       357 Kelvin (84 Celsius)
Available Spare:             100%
Available Spare Threshold:   10%
Life Percentage Used:        12%
Data Units Read:             370582802
Data Units Written:          485055430
Host Read Commands:          26796100412
Host Write Commands:         42160630583
Controller Busy Time:        5147 minutes
Power Cycles:                18296
Power On Hours:              856 hours
Unsafe Shutdowns:            17738
Unrecoverable Media Errors:  0
Lifetime Error Log Entries:  34
Warning Temperature Time:    87 minutes
Critical Temperature Time:   45 minutes

Number of Queues
================
Number of I/O Submission Queues:      64
Number of I/O Completion Queues:      64

Host Controlled Thermal Management
==================================
Minimum Thermal Management Temperature:  273 Kelvin (0 Celsius)
Maximum Thermal Management Temperature:   357 Kelvin (84 Celsius)

Active Namespaces
=================
Namespace ID:1
Error Recovery Timeout:                Unlimited
Command Set Identifier:                NVM (00h)
Deallocate:                            Supported
Deallocated/Unwritten Error:           Not Supported
Deallocated Read Value:                All 0x00
Deallocate in Write Zeroes:            Supported
Deallocated Guard Field:               0xFFFF
Flush:                                 Supported
Reservation:                           Not Supported
Namespace Sharing Capabilities:        Private
Size (in LBAs):                        1953525168 (931GiB)
Capacity (in LBAs):                    1953525168 (931GiB)
Utilization (in LBAs):                 1953525168 (931GiB)
NGUID:                                 E8238FA6BF530001001B444A462E1088
EUI64:                                 001B444A462E1088
Thin Provisioning:                     Not Supported
Per-NS Atomic Units:                   Yes
  Atomic Write Unit (Normal):          8
  Atomic Write Unit (PFail):           8
  Atomic Boundary Size (Normal):       7
  Atomic Boundary Size (PFail):        7
  Atomic Boundary Offset:              7
NGUID/EUI64 Never Reused:              No
Number of LBA Formats:                 2
Current LBA Format:                    LBA Format #00
LBA Format #00: Data Size:   512  Metadata Size:     0
LBA Format #01: Data Size:  4096  Metadata Size:     0
~/spdk_test$ mkdir hello_world
~/spdk_test$ cd hello_world
~/spdk_test/hello_world$ nvim hello_world.c
~/spdk_test/hello_world$ nvim Makefile

~/spdk_test$ export DPDK_ROOT=~/spdk_test/dpdk
~/spdk_test$ export SPDK_ROOT=~/spdk_test/spdk
~/spdk_test/hello_world$ make build
~/spdk_test/hello_world$ make run
TELEMETRY: No legacy callbacks, legacy socket not created
Initializing NVMe Controllers
Attaching to 0000:01:00.0
Attached to 0000:01:00.0
  Namespace ID: 1 size: 1000GB
SPDK initialization completes.
Hello world!