Skip to contentSkip to conversation

what time does host will re-used the prplist memory region.

DISCUSSION HavenYang 2 participants 3 messages Aug 4, 2015 – Aug 5, 2015 NVMe

lore
Share & tools
lore

HavenYang

author
#0 lore raw

Dear all

There is a description from nvme specification 1.2 as following(Figure 26, Completion Queue Entry DW2):

SQ Head Pointer (SQHD): Indicates the current Submission Queue Head pointer for the Submission Queue indicated in the SQ Identifier field. This is used to indicate to the host the Submission Queue entries that have been consumed and may be re-used for new entries.
Note: The value returned is the value of the SQ Head pointer when the completion queue entry was created. By the time host software consumes the completion queue entry, the controller may have an SQ Head pointer that has advanced beyond the value indicated.

It says the SQhead indicate Submission Queue entries may be re-used, but it not say the PRPlist related to this command may be re-used or not, I confused.

my question is:
1. from host side,?what is the condition can host re-used the prplist memory region for a host command, SQHead or command complete?
2. from device side, what is the condition to update SQHead, fetched command head(simple) or fetched all prp from prplist(complex)?

Beset Regards
Haven(havenyang at 126.com)

#1 lore raw
Quoted 4 lines · HavenYang

It says the SQhead indicate Submission Queue entries may be re-used, but it not say the PRPlist related to this command may be re-used or not, I confused.

my question is:
1. from host side,?what is the condition can host re-used the prplist memory region for a host command, SQHead or command complete?

The host can only reuse the PRP list memory when the command has been completed. The device is entitled to use the PRP list throughout execution of the command.

Quoted 1 line

2. from device side, what is the condition to update SQHead, fetched command head(simple) or fetched all prp from prplist(complex)?

The first; the host only takes this as an indication that it can reuse the SQ entry.

author
#2 lore raw

Dear Matthew

Thank you for your feedback, it's very important to me.
I suggest your comment for my first question should be wrote to the spec, otherwise, there maybe others confused for this issue and go to the wrong way.

Quoted 14 lines · Matthew Wilcox
Quoted 4 lines · HavenYang

It says the SQhead indicate Submission Queue entries may be re-used, but it not say the PRPlist related to this command may be re-used or not, I confused.

my question is:
1. from host side,?what is the condition can host re-used the prplist memory region for a host command, SQHead or command complete?

The host can only reuse the PRP list memory when the command has been completed. The device is entitled to use the PRP list throughout execution of the command.

Quoted 1 line

2. from device side, what is the condition to update SQHead, fetched command head(simple) or fetched all prp from prplist(complex)?

The first; the host only takes this as an indication that it can reuse the SQ entry.