NVMe Read Recovery Level: Recovery Effort, Scope, and Configuration

23 minute read

繁體中文

00.01.When data is difficult to recover, should a controller spend more effort or use less recovery before returning a result to the host? Read Recovery Level provides this tradeoff. Start with levels and affected scope, then connect capability bits, configuration, readback and reset behavior so each field answers a concrete question.

controller
The interface entity that receives and processes host NVMe commands.
scope
The objects sharing a setting, such as one NVM Set or an entire subsystem.
Host
The system running the operating system and issuing NVMe commands.

The main ideas

01

Understand the tradeoff

01-01Levels adjust read-error recovery effort. Compare maximum, default and minimum recovery, separating policy from measured latency and successful recovery.

default
The default value; RRL defaults to level 4, independently of the current value.
02

Find who shares the setting

02-01Determine whether sets exist and which namespaces share a set. This identifies the affected spaces and those that cannot independently choose different levels.

03

Connect capability, request and result

03-01Discover supported levels, choose the target and value, then read back using the correct format. Level support, current value and saveability answer different questions.

current
The feature value currently in use.
04

Follow the setting over time

04-01Use successful completion to distinguish earlier and later commands. Then consider reset scope, current and saved values to explain when a new or restored value applies.

saved
The saved feature value used in applicable restoration cases.

00.02.Assumes operating systems, computer organization and basic SSD knowledge. Sets 7/9, namespaces A/B/C and encoded values are illustrative and depend on actual device capabilities.

00.03.Follow one set’s configuration, then compare easily confused values and scopes. The goal is to explain which spaces share a setting and what each query actually answers.

Connecting the main ideas

00.04.Follow one question: to use minimum recovery for reads in set 7, what must be discovered, which parameters are needed, and how can the current setting be confirmed?

00.05.The comparisons distinguish identical numbers in different result formats and identical settings under different reset scopes.

A forward route through the specification

R-1Establish the overview first, then open the Base PDF: 499 → 715–716, with one forward jump. These are PDF viewer page numbers. On shared pages, start at the named heading and stop before the next section. The Chinese tutorial explains the necessary references without repeated detours.

Page sequencePrimary scopeFocus and stop heading
R1 · Base PDF 499§5.2.30.1.12Start at Read Recovery Level Config. Explain set/subsystem scope, connect Figures 484/485 with set 7 and level 15, then show Get’s return location and the SEL=3 exception. Stop before §5.2.30.1.13.
R2 · Base PDF 715–716§8.1.23Start at Read Recovery Level. Connect configuration to the recovery tradeoff, namespace inheritance and the LR limitation. Use Figure 755 to conclude with level direction and mandatory versus optional support. Stop before §8.1.24.
namespace
A logical storage space accessed by a host through a controller.
SEL
Select; chooses current, default, saved or supported-capability information in Get Features.
LR
Limited Retry; I/O-command recovery control whose interaction with RRL is implementation-specific.

01 How much recovery should a difficult read receive?

01.01.Read Recovery Level (RRL) balances read completion time against recovery effort. When the feature is supported, level 4 is the mandatory default and level 15 is mandatory Fast Fail. Optional level 0 provides maximum recovery. Higher levels provide less recovery; interaction with an I/O command’s LR field is implementation-specific.

Fast Fail
The name of RRL level 15, providing minimum recovery without a fixed completion-time guarantee here.
I/O
Input/Output, the class of data operations performed on a namespace.
RRL
Read Recovery Level; selects the recovery effort applied to difficult reads.
Sources: Base 2.4 §8.1.23

Source: NVME-BASE-2.4, Rev. 2.4, §8.1.23, printed pages 689-690, PDF pages 715-716

02 Which storage spaces share one setting?

Namespaces in one set share a levelIllustrative example: targeting set 7 gives A/B level 15; C retains set 9’s level 4. Without NVM Sets, all namespaces share one subsystem RRL. Sources: Base §§8.1.23, 5.2.30.1.12 and Figure 67.NVM subsystemNVM Set 7RRL: 4 → 15NVM Set 9RRL: 4namespace A + BRRL = 15namespace CRRL = 4
Illustrative example: targeting set 7 gives A/B level 15; C retains set 9’s level 4. Without NVM Sets, all namespaces share one subsystem RRL. Sources: Base §§8.1.23, 5.2.30.1.12 and Figure 67.
NVM subsystem
An NVMe storage subsystem that may contain multiple controllers and namespaces.
NVM Set
A logically separate collection of non-volatile memory that may contain multiple namespaces sharing an RRL.
NVM
Non-Volatile Memory, memory that retains data without power.

02.01.With NVM Sets, FID 12h has NVM Set scope with one RRL for the selected set. Without NVM Sets, the feature has NVM subsystem scope and all namespaces use one level. Changing RRL does not change their stored data.

FID
Feature Identifier: selects the Feature to read or configure.
Sources: Base 2.4 §5.2.30.1.12

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

03 Read capability bits before choosing a level

From a support bitmap to one selected value
Candidate levelTest in RRLS=8011hValue encoded in RRL
0Bit 0 = 1: supported0h
4Bit 4 = 1: supported4h
8Bit 8 = 0: unsupportedDo not select
15Bit 15 = 1: supportedFh
The bit position in RRLS selects a yes/no answer; RRL directly encodes the chosen level. They are not interchangeable. Sources: Base Figures 338/485.
bitmap
A set of bits, each representing a separate yes/no property rather than an item count.
RRLS
Read Recovery Levels Supported; each bit reports support for its corresponding level.

03.01.Identify Controller reports feature support in CTRATT.RRLVLS and individual levels in the 16-bit RRLS bitmap. CTRATT.NSETS selects set versus subsystem scope. ONCS.SSFS controls support for nonzero SEL and SV. These capabilities answer different questions.

CTRATT
Controller Attributes; a bitmap in Identify Controller.
RRLVLS
Read Recovery Levels; the CTRATT bit reporting RRL support.
NSETS
NVM Sets; the CTRATT bit reporting NVM Set support.
ONCS
Optional NVM Command Support; this report uses its SSFS capability bit.
SSFS
Save and Select Feature Support; indicates support for nonzero SV and SEL.
SV
Save; the Set Features bit requesting a saved setting.
Sources: Base 2.4 §5.2.14.2.1

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.14.2.1, printed pages 344-347,371-372, PDF pages 370-373,397-398

04 Encode the target set and requested level

04.01.Set Features selects Read Recovery Level Config with FID 12h. CDW11 bits 15:0 carry NVMSETID; CDW12 bits 3:0 carry RRL. No data buffer is used, and NSID should be zero for the NVM Set or subsystem scope.

NVMSETID
NVM Set Identifier; a 16-bit set identifier distinct from a namespace NSID.
buffer
A data buffer; this feature does not require one for its attributes.
NSID
Namespace Identifier, a controller-visible numeric handle for a namespace; the identifier is not the namespace object itself.
CDW
CDW (Command Dword): a 32-bit command field. In CDW10, 10 is the field index, not a byte offset.
Sources: Base 2.4 §5.2.30.1.12

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

05 Interpret returned DW0 according to SEL

DW0=4: first identify the queryAssume SSFS=1 and successful completions. SEL=0 uses the RRL layout; SEL=3 uses capability bits. A capability query does not change the current level. Sources: Base Figures 198/201/485.Get Features · FID 12h · CQE DW0 = 00000004hSEL = 0Current valueSEL = 3Supported capabilitiesDW0[3:0] = 4RRL = 4CHANG = 1NSSPEC = 0 · SVBL = 0
Assume SSFS=1 and successful completions. SEL=0 uses the RRL layout; SEL=3 uses capability bits. A capability query does not change the current level. Sources: Base Figures 198/201/485.
NSSPEC
NS Specific; one indicates namespace scope, while zero does not identify another scope.
CHANG
Changeable; reports whether feature values can be changed.
SVBL
Saveable; reports whether the feature values can be saved.
CQE
Completion Queue Entry; reports a command result.

05.01.Successful Get Features with SEL other than 3 returns RRL in CQE DW0 using Figure 485. SEL=3 instead returns Supported Capabilities: CHANG, NSSPEC and SVBL. The same DW0 value can have entirely different meanings; the level bitmap remains in Identify Controller.

Sources: Base 2.4 §5.2.30.1.12

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

06 Use successful completion as the settings boundary

Successful Set completion defines the boundaryTime runs downward. A was submitted before the boundary and is not guaranteed to use the new value. B is submitted after success and must use it. No fixed completion time is implied. Source: Base §5.2.30.1.Submit read A; A may remain outstandingNew setting for A: not guaranteedSubmit Set Features: RRL = 15Set completes successfullySubmit read B after this completionB must use the new setting
Time runs downward. A was submitted before the boundary and is not guaranteed to use the new value. B is submitted after success and must use it. No fixed completion time is implied. Source: Base §5.2.30.1.

06.01.Commands already submitted may or may not use a newly changed feature value. Commands submitted after successful Set Features completion must use the new settings. To separate two read batches clearly, the host should let outstanding commands complete before changing the feature.

Sources: Base 2.4 §5.2.30.1

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1, printed pages 459, PDF pages 485

07 Persistence depends on saveability and reset scope

Why can current=15 have different reset outcomes?
Capability and prior valuesApplicable event conditionResulting current
Non-saveable; current=15Power cycle or reset: FID12h is persistent15
Saveable; current=15, saved=4Whole-subsystem reset under Figure1264: from saved
Saveable; current=15, no saved valueWhole-subsystem reset under Figure1264: from default
Saveable; current=15, saved=4Subset reset under Figure127; set/subsystem scope15: unchanged
Check saveability, then the configuration and reset scope. Prior values are illustrative; adjacent text states the applicability of both reset tables. Sources: Base §4.4 and Figures 126/127/466.

07.01.Figure 466 lists persistence as Yes for FID 12h, but that column applies only to non-saveable features. If the feature is saveable, distinguish current from saved and use the reset scope: Figure 126 for whole-subsystem scope, Figure 127 for a subset. Resetting one controller in a multi-controller subsystem retains the shared current value. An applicable whole-subsystem reset instead restores saved, or default if no saved value exists.

Sources: Base 2.4 §4.4

Source: NVME-BASE-2.4, Rev. 2.4, §4.4, printed pages 167-169, PDF pages 193-195

Where to continue in the specification

08.01.Use the flow above to frame the problem, then open the corresponding sections for fields and full conditions. The Chinese tutorial also explains every in-scope figure with its takeaway, example, and details.

Concept to explainSpecification sections
How much recovery should a difficult read receive?Base 2.4 §8.1.23
Which storage spaces share one setting?Base 2.4 §5.2.30.1.12 · Base 2.4 §8.1.23 · Base 2.4 §3.2.2
Read capability bits before choosing a levelBase 2.4 §5.2.14.2.1
Encode the target set and requested levelBase 2.4 §5.2.30.1.12 · Base 2.4 §4.4 · Base 2.4 §5.2.30
Interpret returned DW0 according to SELBase 2.4 §5.2.30.1.12 · Base 2.4 §5.2.12
Use successful completion as the settings boundaryBase 2.4 §5.2.30.1 · Base 2.4 §4.4
Persistence depends on saveability and reset scopeBase 2.4 §4.4 · Base 2.4 §5.2.30
Open the complete Chinese tutorial and figure explanations →

Check your understanding

1. With RRLS=8011h, is level 8 available, and should level 15 be encoded as 8000h?

09.01.No: bit 8 is zero. For level 15, check RRLS bit 15, then encode Fh in the four-bit RRL field. The value 8000h is a support-bit mask, not the level code.

Sources

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.14.2.1, printed pages 344-347,371-372, PDF pages 370-373,397-398

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

2. Can A’s NSID select level 15 only for A when A and B share one set?

09.02.No. RRL is shared at set scope and NVMSETID selects the set. NSID should be zero for this scope; nonzero does not narrow the effect and causes the command to be aborted.

Sources

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

Source: NVME-BASE-2.4, Rev. 2.4, §4.4, printed pages 169, PDF pages 195

3. Why is successful Get DW0=4 not enough to conclude that the current level is 4?

09.03.Check SEL: zero returns current, while three makes 4 the CHANG=1/NSSPEC=0/SVBL=0 capability combination. With SEL=1, it is the default value.

Sources

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1.12, printed pages 473, PDF pages 499

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.12, printed pages 209-212, PDF pages 235-238

4. After Set level 15 succeeds, must both an outstanding read A and a subsequently submitted read B use 15?

09.04.B must use the new setting; already-submitted A may or may not use it. Level 15 also has no fixed millisecond bound here. Complete A before changing settings when a clear batch boundary is needed.

Sources

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30.1, printed pages 459, PDF pages 485

Source: NVME-BASE-2.4, Rev. 2.4, §8.1.23, printed pages 689-690, PDF pages 715-716

5. Does successfully setting 15 with SV=0 mean every reset restores 4?

09.05.Not necessarily. Non-saveable FID 12h is persistent. A saveable instance depends on reset scope: Figure 126 restores saved or default, while Figure 127 retains current for set/subsystem scope.

Sources

Source: NVME-BASE-2.4, Rev. 2.4, §4.4, printed pages 167-169, PDF pages 193-195

Source: NVME-BASE-2.4, Rev. 2.4, §5.2.30, printed pages 458-459, PDF pages 484-485

Specification editions

NVM Express Base Specification, Revision 2.4

Jia-Chang

Jia-Chang

Human

Comments

  Write a comment ...