Solving submission queue entry overflow using metadata or data pointers
A memory is disclosed. The memory may include a first data structure. The first data structure may include a field, which may store a first pointer to a second data structure. The second data structure may include a second pointer to a data relating to a command and a third pointer to a user data. The memory may also include a queue that may include the first data structure.
1 . A memory, comprising:
a first data structure stored in the memory, the first data structure including a field, the field to store a first pointer to a second data structure, the second data structure including a second pointer and a third pointer, the second pointer pointing to a command parameter and an indication of a format of the command parameter, and the third pointer pointing to a user data; and
a queue stored in the memory, the queue including the first data structure,
wherein the command parameter instructs a storage device how to process the user data, and
wherein a type of the command parameter is determined by the storage device and returned to a host.
2 . The memory according to claim 1 , wherein the field includes a Physical Region Page (PRP) list or a Scatter Gather List (SGL).
3 . The memory according to claim 2 , wherein the field includes a descriptor type.
4 . The memory according to claim 3 , wherein the descriptor type identifies the command parameter or a version number.
5 . The memory according to claim 3 , wherein:
the command parameter includes a first portion of the command parameter and a second portion of the command parameter; and
the first portion of the command parameter describes a structure for the second portion of the command parameter.
6 . The memory according to claim 1 , wherein the type of the command parameter is determined by the storage device and returned to the host in a log page.
7 . The memory according to claim 6 , wherein the storage device is configured to identify the type of the command parameter supported by the storage device based at least in part on a request from the host.
8 . The memory according to claim 1 , wherein the first data structure further includes a second field to store a value indicating the command parameter exists.
9 . A system, comprising:
a processor;
a storage device, the storage device connected to the processor; and
a memory, the memory connected to the processor and the storage device, the memory including:
a first data structure stored in the memory, the first data structure including a field, the field to store a first pointer to a second data structure, the second data structure including a second pointer and a third pointer, the second pointer pointing to a command parameter and an indication of a format of the command parameter, and the third pointer pointing to a user data; and
a queue stored in the memory, the queue including the first data structure,
wherein the command parameter instructs the storage device how to process the user data, and
wherein a type of the command parameter is determined by the storage device and returned to a host.
10 . The system according to claim 9 , wherein the field includes a Physical Region Page (PRP) list or a Scatter Gather List (SGL).
11 . The system according to claim 10 , wherein the field includes a descriptor type.
12 . The system according to claim 11 , wherein the descriptor type identifies the command parameter or a version number.
13 . The system according to claim 11 , wherein:
the command parameter includes a first portion of the command parameter and a second portion of the command parameter; and
the first portion of the command parameter describes a structure for the second portion of the command parameter.
14 . The system according to claim 9 , wherein a type of the command parameter is determined by the storage device and returned to the processor in a log page.
15 . The system according to claim 14 , wherein the storage device is configured to identify the type of the command parameter supported by the storage device based at least in part on a request from the host.
16 . The system according to claim 9 , wherein the first data structure further includes a second field to store a value indicating the command parameter exists.
17 . A method, comprising:
establishing a first data structure by a processor, the first data structure including a field, the field storing a first pointer to a second data structure, the second data structure including a second pointer and a third pointer, the second pointer pointing to a command parameter and an indication of a format of the command parameter, and the third pointer pointing to a user data; and
storing the first data structure in a queue in a memory by the processor,
wherein the command parameter instructs a storage device how to process the user data, and
wherein a type of the command parameter is determined by the storage device and returned to a host.
18 . The method according to claim 17 , further comprising updating a queue tail pointer for the queue in a storage controller of the storage device.
19 . The method according to claim 17 , further comprising receiving a type of the command parameter from the storage device.
20 . The method according to claim 19 , wherein receiving the type of the command parameter from the storage device includes sending a request for the type of the command parameter to the storage device from the host.