Permanent storage device, host and control method of permanent storage device
Patent Information
- Application Number
- CN202210915096.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-22
- Filing Date
- 2022-08-01
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-08-01
AI Technical Summary
In existing technologies, it is difficult to effectively save key-value pairs to non-volatile memory, especially when dealing with variable-length key-value pairs, which can easily lead to conflicts and low management efficiency.
A compression algorithm is used to generate compressed keys, and key-value pairs are managed by generating unique key IDs. Combined with an access key mapping table and a high-speed caching mechanism, the uniqueness of key-value pairs and efficient access are ensured.
It enables efficient storage and retrieval of variable-length key-value pairs, avoids key conflicts, and improves the processing efficiency and data management capabilities of the storage device.
Smart Images

Figure CN116825156B_ABST
Abstract
Description
[0001] This application claims priority to Japanese Patent Application No. 2022-046003 (filed on March 22, 2022). This application incorporates the entire contents of that basic application by reference. Technical Field
[0002] This invention relates to a permanent storage device, a host computer, and a control method for the permanent storage device. Background Technology
[0003] For persistent storage devices with non-volatile memory, key-value pairs, consisting of a key and a value, are sometimes saved to the non-volatile memory. For persistent storage devices, it is desirable to be able to appropriately save key-value pairs to non-volatile memory. Summary of the Invention
[0004] The purpose of this invention is to provide a permanent storage device, a host computer, and a control method for the permanent storage device that can properly save key-value pairs to non-volatile memory.
[0005] According to one technical solution, a permanent storage device with a storage medium and a controller is provided. The storage medium is capable of storing key-value pairs. A key-value pair consists of a key and a value. The controller generates identification information to identify the key. The controller is capable of sending the identification information to a host. Attached Figure Description
[0006] Figure 1 This is a diagram illustrating the hardware structure of the host and permanent storage device in the implementation method.
[0007] Figure 2 This is a diagram showing the structure of a permanent storage device according to an embodiment.
[0008] Figure 3 This is a diagram showing the structure of the host memory in an implementation method.
[0009] Figure 4 This is a diagram representing the fields of key-value (KV) commands in the implementation method.
[0010] Figure 5 This is a diagram illustrating the functional structure of the host and permanent storage device in the implementation method.
[0011] Figure 6 This is a diagram of fields representing the values of the implementation method.
[0012] Figure 7 This is a diagram representing the fields of the Completion Queue Entry (CQE) of the implementation method.
[0013] Figure 8 This is a diagram representing the field of the access key in the implementation method.
[0014] Figure 9 This is a diagram showing the registration content of the access key cache in the implementation method.
[0015] Figure 10 This is a diagram representing the data structure of the access key mapping table in the implementation method.
[0016] Figure 11 This is a diagram representing the data structure of the address translation mapping table in the implementation method.
[0017] Figure 12 This is a diagram showing the key-value pairs stored in the non-volatile memory of the implementation.
[0018] Figure 13 This is a flowchart illustrating the startup process of the information processing system in the implementation method.
[0019] Figure 14 This is a flowchart illustrating the actions of the host regarding the storage command in an implementation method.
[0020] Figure 15 This is a flowchart illustrating the operation of a permanent storage device for storing commands in an implementation method.
[0021] Figure 16 This is a flowchart illustrating the actions of the host regarding the retrieval command in an implementation method.
[0022] Figure 17 This is a flowchart illustrating the operation of the permanent storage device for the retrieval command in an implementation method.
[0023] Figure 18 This is a flowchart illustrating the actions of the host regarding the retrieval command in a modified embodiment. Detailed Implementation
[0024] Hereinafter, the permanent storage device, host computer, and control method of the permanent storage device according to the relevant embodiments will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to this embodiment.
[0025] (Implementation Method)
[0026] The permanent storage device of the embodiment has a non-volatile memory, and key-value pairs obtained by pairing keys and values are stored in the non-volatile memory, with a design applied to properly store the key-value pairs in the non-volatile memory.
[0027] Information processing systems that include permanent storage devices can be like Figure 1 It is constructed as shown. Figure 1 This is a diagram showing the hardware structure of the information processing system 1, which includes a permanent storage device 100.
[0028] The permanent storage device 100 is communicatively connected to the host 2 and functions as an external storage device relative to the host 2. The permanent storage device 100 is capable of permanently storing data. The permanent storage device 100 can also be a device that permanently stores data using non-volatile memory. The permanent storage device 100 can also be an embedded flash memory or SSD (Solid State Drive) conforming to UFS (Universal Flash Storage) or eMMC (embedded Multi Media Card) specifications. Alternatively, the permanent storage device 100 can also be a device that permanently stores data using disk media. The permanent storage device 100 can also be an HDD (Hard Disk Drive). The host 2 is, for example, a microprocessor, personal computer, server, portable terminal, camera device, gaming device, etc.
[0029] Hereinafter, the permanent storage device 100 is illustrated as a device that uses non-volatile memory to permanently store data. The host 2 and the permanent storage device 100 can transmit and receive data via a communication line compliant with NVMe (Non-Volatile Memory Express) (NVMe). TM The signal specifications.
[0030] The host 2 has a host controller 3 and a host memory 4. The host controller 3 can be installed as a SOC (System On Chip). The host controller 3 has a CPU (Central Processing Unit) to perform the processing required to issue commands to the permanent storage device 100.
[0031] The permanent storage device 100 includes a controller 110, a cache memory 140, and a non-volatile memory 130. The controller 110 includes a host interface 111, a cache interface 112, a CPU 113, RAM (Random Access Memory) 114, and a memory interface 115.
[0032] The non-volatile memory 130 can be composed of multiple memory chips. Each memory chip has a memory cell array. For each memory cell array of a memory chip, the unit of access that enables batch writing and reading of data is a physical page. The smallest access unit, consisting of multiple physical pages, that enables independent deletion of data is a physical block.
[0033] The non-volatile memory 130 is, for example, a NAND flash memory, but it can also be other non-volatile semiconductor memories such as NOR flash memory, MRAM (Magnetoresistive Random Access Memory), PRAM (Phase Change Random Access Memory), ReRAM (Resistive Random Access Memory), and FeRAM (Ferroelectric Random Access Memory). Furthermore, the non-volatile memory 130 can also be a three-dimensional memory.
[0034] The host controller 3 and the host interface 111 operate in accordance with the protocol specified by the NVMe specification.
[0035] RAM 114 is a memory that functions as the operating area of CPU 113.
[0036] The cache memory 140 functions as a storage area for temporarily storing information. The cache memory 140 may be composed of general-purpose memory such as SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory). Furthermore, the cache memory 140 may be installed inside the controller 110 or independently of the controller 110.
[0037] The memory interface 115 is connected to the non-volatile memory 130 via a bus and controls communication with the non-volatile memory 130.
[0038] Cache interface 112 is a controller that controls access from controller 110 to cache memory 140, for example, a controller that enables access to cache memory 140 in DDR (Double Data Rate). CPU 113 saves data transferred between non-volatile memory 130 to cache memory 140 as needed, and performs data transfer between host memory 4 via host interface 111.
[0039] CPU 113 comprehensively controls the various parts of controller 110. CPU 113, for example... Figure 2 As shown, it includes a memory translation layer 113a and an access key processing layer 113b. Figure 2This is a diagram that roughly represents the structure of the permanent storage device 100. The memory translation layer 113a converts data received from the host interface 111 into a format suitable for use with the non-volatile memory 130 and supplies it to the memory interface 115, or converts data received from the memory interface 115 into a format suitable for use with the host interface 2 and supplies it to the host interface 111. The memory translation layer 113a has an address translation mapping table 900. The address translation mapping table 900 is information that establishes a correspondence between logical addresses and physical addresses for multiple logical addresses. The memory translation layer 113a converts the logical addresses associated with data received from the host interface 111 into physical addresses through the address translation mapping table 900 and supplies them to the memory interface 115. When the non-volatile memory 130 is flash memory, the memory translation layer 113a is also called the flash translation layer (FTL). The access key processing layer 113b will be described later.
[0040] The host 2 has a host memory 4, such as DRAM (Dynamic Random Access Memory). The host memory 4 is such as... Figure 3 As shown, it includes a management SQ (Submission Queue) 41, a management CQ (Completion Queue) 42, an I / O SQ 43, an I / O CQ 44, and a buffer area 45. Figure 3 This is a diagram illustrating an example of the structure of host memory 4.
[0041] The management SQ 41 is the issue queue, which enqueues commands when they are issued. The management CQ 42 is the completion queue, which enqueues the completion queue entry (CQE) of a command when it completes. The I / O SQ 43 is the issue queue, which enqueues commands when they are issued. The I / O CQ 44 enqueues CQEs when they complete. Buffer area 45 is used as a buffer for data I / O.
[0042] If host 2 issues a data I / O command, it enters I / O SQ 43 to notify permanent storage device 100 of the command issuance. Correspondingly, permanent storage device 100 accesses host 2's I / O SQ 43 to obtain the command and executes it. Furthermore, if permanent storage device 100 completes command execution, it accesses I / O CQ 44, causing the command's CQE to enter I / O CQ 44. Host 2 can determine the completion of command execution by confirming I / O CQ 44.
[0043] An example of a publish queue and a complete queue is a circular buffer. The entries in each queue (publish queue and complete queue respectively) are managed by two variables: head and tail. The host 2 or permanent storage device 100 can determine the reference position of each queue (e.g., the position of newly enqueued command information) based on the positions indicated by the head and tail (head pointer, tail pointer).
[0044] Data I / O commands include, for example, the store and retrieve commands contained in the key-value command set (KV command set). A store command is a command that requests the writing of key-value pairs. A key-value pair consists of a key and a value, with the value associated with the key. The value length is variable, containing data of any size. A retrieval command is a command that requests the reading of key-value pairs.
[0045] For example, for permanent storage device 100, CPU 113 writes key-value pairs to non-volatile memory 130 according to a store command. In non-volatile memory 130, the value containing the data is written in a form associated with the key. CPU 113 reads the key-value pairs from non-volatile memory 130 according to a retrieve command. That is, the value associated with the key is read from non-volatile memory 130.
[0046] The commands contained in the key-value command set can treat data as variable-length values compared to block-based commands (e.g., write commands, read commands). Since they do not require mapping to logical block addresses, they can perform efficient command processing.
[0047] The key-value command set contains 300 commands (KV commands) that can be configured according to the NVMe specification, such as... Figure 4 Defined as shown. Figure 4 This example represents the command field of KV command 300. Each field within the command is composed of 32 bits = 4 bytes, matching the size of a general-purpose register in the CPU. KV command 300 includes fields such as command ID 301, keys 302, 303, 308, 309, and data pointers 304, 305, 306, and 307. Command ID 301 includes opcodes identifying storage commands, retrieval commands, etc. Keys 302, 303, 308, and 309 are areas designed to store the keys in key-value pairs, with sizes limited according to NVMe specifications. For example, according to NVMe specifications, the maximum key size is limited to 16 bytes. When these 16 bytes are divided into 4-byte units, the four keys 302, 303, 308, and 309 are each less than 32 bits, totaling a limit of 32 × 4 = 128 bits.
[0048] like Figure 5As shown, host 2 compresses user key 231 to generate compressed key 231a. This enables the processing of keys exceeding the size limit of the command field of KV command 300 (e.g., 128 bits), improving the flexibility of KV command 300. Figure 5 This is a diagram illustrating the functional structure of host 2 and permanent storage device 100. Host 2 issues KV command 300 (e.g., a store command) and enters I / O SQ 43, and prepares value 120 in a form associated with KV command 300 (see reference). Figure 6 At this point, host 2 includes the compression key 231a in the fields of keys 302, 303, 308, and 309 of the KV command 300. Furthermore, host 2 includes the user key 231 in value 120 in addition to the user value 232. The size restrictions of the fields in value 120 are relaxed compared to the fields of the keys in the KV command 300. Therefore, it is easy to include the user key 231 in value 120. Host 2 sends the queuing notification of the KV command 300 to I / O SQ 43 to the permanent storage device 100 via network 5.
[0049] In the permanent storage device 100, logically divided regions (namespaces 116) are provided. Within this region, the keys in key-value pairs are unique, but according to the compression algorithm, there are cases where compressed keys conflict with other compressed keys (i.e., have the same value). Therefore, as... Figure 2 As shown, in the permanent storage device 100, the access key processing layer 113b has a key ID management unit 113b1 and an access key mapping table 113b2.
[0050] If the permanent storage device 100 obtains the KV command 300 and the value 120 from the host 2, it executes the KV command 300 while using the value 120. Simultaneously, the key ID management unit 113b1 of the access key processing layer 113b refers to the access key mapping table 113b2, which contains the correspondence between compressed key 231a and logical addresses, to check whether compressed key 231a conflicts with other compressed keys. If compressed key 231a conflicts with other compressed keys, the key ID management unit 113b1 generates a flag indicating a conflict. The key ID management unit 113b1 extracts the user key 231 from the value 120 and generates a key ID (identification information) 118 that identifies the user key 231. The key ID management unit 113b1 constructs an access key 117 containing the key ID 118 and its corresponding compressed key 231a (see reference). Figure 8 ), and establish a correspondence with its logical address and append it to the access key mapping table 113b2 (see reference). Figure 10 )middle.
[0051] If the KV command 300 completes execution, then Figure 5The permanent storage device 100 shown will serve as the completion queue entry (CQE) 400 for the completion notification of the KV command 300 (see reference). Figure 7 The permanent storage device 100 is then able to include a flag indicating a conflict with key ID 118 in the CQE 400.
[0052] Host 2 dequeues CQE 400 from I / O using CQ 44. Host 2 extracts key ID 118 from CQE 400, which, together with its corresponding compression key 231a, constitutes access key 117. Thus, host 2 and permanent storage device 100 can uniquely determine their associated value 120 through access key 117 in subsequent command processing.
[0053] Furthermore, host 2 extracts a flag indicating a conflict from CQE 400, and saves cache entry 222 to access key cache 22a based on this flag. Thus, host 2 can manage conflicts between compression key 231a and other compression keys by referring to access key cache 22a.
[0054] use Figure 5 The functional structure of the host 2 and the permanent storage device 100 will be described in more detail.
[0055] In information processing system 1, permanent storage device 100 can be connected to host 2 via network 5. Network 5 can be a wired communication network such as a serial communication line, a tree network, or a fabric network. Host 2 communicates with permanent storage device 100 by issuing commands via network 5.
[0056] When it is desired to persist the user value 232 associated with user key 231 via persistent storage device 100, application 23 supplies a PUT request containing user key 231 and user value 232 to KV library 22. KV library 22 associates the value 120 consisting of user key 231 and user value 232 with access key 117 to form KV command 300 (e.g., a save command). KV library 22 supplies the save command to operating system 21. If operating system 21 causes the save command to enter I / O function SQ 43, a notification of the save command being queued is sent to persistent storage device 100 via network 5.
[0057] The structure of access key 117 can be implemented by the KV library 22 or the kernel layer of the operating system 21, or by hardware. Access key 117 is a management key used when accessing data on permanent storage device 100. Access key 117 includes key ID 118 and compression key 231a. Compression key 231a is generated by host 2 performing data compression on user key 231. For the compression method of user key 231, compression algorithms such as hash calculation can be applied.
[0058] When the storage command is issued, KV library 22 will assign access key 117 to the storage command. Figure 4 The fields shown in keys 302, 303, 308, and 309 are stored. Data pointers 304, 305, 306, and 307 store data in cache area 45 (see reference). Figure 3 The address of the value 120 in ).
[0059] for Figure 5 The permanent storage device 100 shown, host interface 111 (see reference) Figure 2 The cache area 45 of the host memory 4 (refer to) can be accessed from the data pointers 304, 305, 306, and 307 in the store command. Figure 3 The value 120 is obtained via DMA transfer. The permanent storage device 100 is configured with one or more logically partitioned namespaces 116. If the permanent storage device 100 receives a storage command, it extracts the compression key 231a from the storage command and retrieves its corresponding value 120 (refer to...). Figure 6 Extract user key 231 from ). Key ID Management Department 113b1 (refer to Figure 2 For each namespace 116, the access key mapping table 113b2 is consulted to check for duplicate compression keys 231a. If a duplicate compression key 231a is found, the key ID management unit 113b1 generates a key ID 118 to identify that user key 231a. Therefore, within each namespace 116, there are no duplicate key IDs 118 among conflicting compression keys 231a, and no duplicate access keys 117 containing key ID 118.
[0060] Furthermore, when multiple namespaces 116 exist, key ID 118 may be repeated between different namespaces 116 and between conflicting compression keys 231a. Additionally, within each namespace 116, key ID 118 may be repeated between non-conflicting compression keys 231a.
[0061] The permanent storage device 100 associates the value 120, consisting of the user key 231 and user value 232 included in the storage command, with the access key 117 and saves it permanently to the non-volatile memory 130. After the value 120 is saved to the non-volatile memory 130, the permanent storage device 100 includes the key ID 118 in the CQE 400 and notifies the host 2.
[0062] The host 2 receives key ID 118 at the moment the storage command to the permanent storage device 100 is completed. The KV library 22 constructs a cache entry 222 with the user key 231 corresponding to the received key ID 118 and saves it to the access key cache 22a. The access key cache 22a can be constructed on the host memory 4 by the host controller 3 at the startup of the host 2.
[0063] KV library 22 can obtain key ID 118 by retrieving key ID 118 from CQE 400. If KV library 22 obtains key ID 118, it assumes that the corresponding compressed key 231a has conflicted with other compressed keys, and constructs a cache entry 222 including key ID 118 and its corresponding user key 231, which is cached in access key cache 22a.
[0064] The management of the access key cache 22a can be implemented by the KV library 22, the kernel layer of the operating system 21, or hardware. The access key cache 22a is a cache structure that stores the key ID 118 corresponding to the user key 231 as a cache entry 222. The access key cache 22a preferentially stores cache entries 222 that conflict with the compressed key 231a. When it is desired to read the user value 232 associated with the user key 231, the application 23 supplies a GET request to the KV library 22. The KV library 22, based on the GET request, refers to the cache entry 222 within the access key cache 22a.
[0065] For example, when issuing I / O commands, the KV library 22 accesses the access key cache 22a. If the key ID 118 corresponding to user key 231 is cached in the access key cache 22a, the KV library 22 constructs an access key 117a including key ID 118 and its corresponding compressed key 231a. If the key ID 118 corresponding to user key 231 is not cached in the access key cache 22a, the KV library 22 constructs an access key 117a including wildcard key ID 118a and compressed key 231a. Wildcard key ID 118a represents any ID. For wildcard key ID 118a, its corresponding compressed key 231a refers to the initially generated compressed key among multiple compressed keys that, although not conflicting with other compressed keys, will conflict in the future.
[0066] When application 23 reads user value 232 associated with user key 231 from permanent storage device 100, application 23 provides a GET request for user key 231 to KV library 22. KV library 22 constructs access key 117 based on the GET request and issues a retrieval command to permanent storage device 100.
[0067] When the retrieval command is issued, KV library 22 will assign access key 117 to the retrieval command. Figure 4 The fields shown are stored in keys 302, 303, 308, and 309. Data pointers 304, 305, 306, and 307 store data from cache area 45 (see reference). Figure 3 The address of the region reserved in the code for storing values.
[0068] The permanent storage device 100, having obtained the retrieval command, retrieves the access key 117 that matches the access key 117 contained in the retrieval command, reads the value 120 associated with the access key 117, and sends it to the host 2. The host interface 111 transfers the value 120 corresponding to the access key 117 via DMA (Direct Memory Access) to the area whose address is specified by data pointers 304, 305, 306, and 307.
[0069] Upon receiving the response to the retrieval command, the KV library 22 extracts the user key 231 and user value 232 from value 120 and supplies the user value 232 to the application 23.
[0070] Next, use Figure 6 Provide a description of the field with the value 120. Figure 6 This is a graph representing the field with the value 120.
[0071] The size (value length) of value 120 is variable and is specified by KV command 300. Value 120 is as follows: Figure 6 As shown, the data includes multiple fields such as column 601 (user key length), column 602 (user key 231), column 603 (user value length), and column 604 (user value 232). The dimensions of columns 601 (user key length) and 603 (user value length) are maintained longer than the value of 120. The dimensions of each field are limited to 32 bits according to the NVMe specification's definition of a field representing a value length. On the other hand, the dimension of column 602 (user key 231) is variable-length, and can be specified by the field in column 601 (user key length) to store any size of user key 231. Similarly, the dimension of column 604 (user value 232) is variable-length, and can be specified by the field in column 603 (user value length) to store any size of user value 232.
[0072] For example, when a storage command is issued, host 2 constitutes... Figure 6The value 120 shown indicates that the user key 231 and user value 232 to be written are saved to the fields of column 602 of user key 231 and column 604 of user value 232, respectively. During the retrieval command response, the permanent storage device 100 is configured... Figure 6 The value 120 shown will save the read user key 231 and user value 232 to the fields of column 602 of user key 231 and column 604 of user value 232, respectively.
[0073] Next, use Figure 7 The fields of Completion Queue Entry (CQE) 400 are described. Figure 7 This is a diagram representing the field of Complete Queue Entry (CQE) 400.
[0074] CQE 400 is a notification of command completion. CQE 400 includes fields such as command-specific data 401, 402, and status / command ID 403. The command-specific data fields 401 and 402 can be up to 32 × 2 = 64 bits. However, by extending the command-specific data 401 and 402, a key ID 118 can be included that is the sum of the keys 302, 303, 308, and 309 of the KV command 300 (e.g., 32 × 4 = 128 bits) or longer. In the status / command ID 403, in addition to indicating the completion or error status of the KV command 300 and the ID used to identify the KV command 300, a flag indicating a conflict with compressed key 231a may also be included. The size of the status / command ID 403 is, for example, 32 bits.
[0075] For example, when key ID 118 is generated by key ID management unit 113b1, host interface 111, upon notifying host 2 that the storage command is complete, saves key ID 118 to the fields of data 401 and 402 inherent to the command of CQE 400, and saves the flag indicating a conflict to the field of status / command ID 403 of CQE 400. Host interface 111 then notifies CQE 400 to KV library 22 via network 5 and operating system 21.
[0076] Next, use Figure 8 For access key 117 (see reference) Figure 5 (This will be explained.) Figure 8 This is a diagram representing the field of access key 117.
[0077] The size (access key length) of access key 117 is limited to the combined size of the fields of keys 302, 303, 308, and 309 of KV command 300 (e.g., 32 × 4 = 128 bits). Access key 117 is as follows: Figure 8As shown, the fields include key ID 118 and compressed key 231a. The size of key ID 118 can be specified as a maximum of 64 bits, as indicated by data 401 and 402 inherent to the CQE 400 commands. Correspondingly, the size of compressed key 231a is reserved, for example, a minimum of 64 bits.
[0078] Alternatively, the size of the compressed key 231a could be changed to correspond to the size of the user key 231. The size of the compressed key 231a could also be, for example, retained to be 64 bits or more, while the size of key ID 118 could be retained as the size obtained by subtracting the size of the compressed key 231a from the size of the access key 117.
[0079] For the use case of access key 117, host interface 111 drives the processing of each received KV command 300.
[0080] In the case of a storage command, considering a conflict between the compressed key 231a received from host 2 and the access key mapping table 113b2, the key ID management unit 113b1 generates a key ID 118. The key ID management unit 113b1 includes the generated key ID 118 and its corresponding compressed key 231a to form an access key 117. The permanent storage device 100 receives the value 120, including the user key 231 and the user value 232, from host 2 and saves the logical address within the address space used by the access key processing layer 113b into the access key mapping table 113b2. The memory interface 115 retains the physical address of the non-volatile memory 130 and performs non-volatile conversion, whereby the non-volatile memory 130 represents the physical write target for storing the value 120, including the user key 231 and the user value 232. The memory translation layer 113a stores the correspondence between logical addresses and physical addresses.
[0081] In the case of a retrieval command, the access key processing layer 113b retrieves the logical address containing the value 120 corresponding to the access key 117 from the access key mapping table 113b2, and requests the memory translation layer 113a to read the value 120. The memory translation layer 113a retrieves the physical address containing the value 120 based on the logical address, and the memory interface 115 reads the value 120 from that physical address. The host interface 111 sends the read value 120 to the host 2.
[0082] Next, use Figure 9 Access key cache 22a (see reference) Figure 5 The registration details will be explained. Figure 9 This is a diagram representing the registered contents of the access key cache 22a.
[0083] Access key cache 22a is a cache structure that stores the key ID 118 corresponding to user key 231 as cache entry 222. Access key cache 22a prioritizes storing cache entries 222 that conflict with compressed key 231a. The entries in access key cache 22a have a two-dimensional data structure with a column for key ID 118 and a column for user key 231. Each row represents a cache entry 222.
[0084] Access key cache 22a is configured on host memory 4 when host 2 starts up. If host 2 identifies a conflict with compression key 231a by the flag in CQE 400 sent from permanent storage device 100, it combines key ID 118 contained in CQE 400 with its corresponding user key 231 to form cache entry 222 and registers it in access key cache 22a.
[0085] Host 2 can determine the order in which conflicts with compression key 231a occur by referring to the access key cache 22a. Figure 9 In the case of a conflict occurring in the compression key 231a of the user key "User_Key2", firstly, cache entry 222-1 is registered in the access key cache 22a. Next, corresponding to a conflict occurring in the compression key 231a of the user key "User_Key222", cache entry 222-2 is registered in the access key cache 22a.
[0086] Next, use Figure 10 The data structure of access key mapping table 113b2 is explained. Figure 10 This is a diagram representing the data structure of access key mapping table 113b2.
[0087] Access key mapping table 113b2 establishes a correspondence between access key 117 and logical addresses for one or more access keys. Access key mapping table 113b2 has a two-dimensional data structure with columns for access key 117 and logical addresses (column 804). The columns for access key 117 include a column for key ID 118 and a column for compressed key 231a. Each row represents an entry 1132 for a single key-value pair. The logical address column 804 stores the logical address of the key-value pair's storage location (e.g., the logical address of the start bit of the key-value pair).
[0088] Access key mapping table 113b2 is constructed on cache memory 140 by access key processing layer 113b when permanent storage device 100 is started. In the case of writing key-value pairs to non-volatile memory 130, access key processing layer 113b constructs entry 1132 using access key 117 and the logical address to be written, and adds it to access key mapping table 113b2. In access key mapping table 113b2, entries 1132 are arranged in writing order (e.g., from top row to bottom row).
[0089] When reading a value stored in the non-volatile memory 130, the access key processing layer 113b retrieves the corresponding logical address from the column of logical address 804 in the column of access key 117, and the memory translation layer 113a performs address translation on the logical address through the address translation mapping table 900, and reads the value from the translated physical address.
[0090] exist Figure 10 In this case, the three entries 1132-1 to 1132-3 share the same key ID 118 of "00", while the compressed keys 231a are "XXXX", "YYYY", and "ZZZZ", which are different from each other. That is, during periods when the compressed key 231a is not repeated, the key ID management unit 113b1, as key ID 118, can continue to apply the previously assigned values for the key-value pairs. Therefore, in entries 1132-1 to 1132-3, since the access keys "00XXXX", "00YYYY", and "00ZZZZ" are different, they are distinguished from each other, and the key-value pairs can be saved to different logical addresses "00000000", "00010000", and "00020000".
[0091] On the other hand, the two entries below, 1132-3 to 1132-4, have different key IDs 118, "00" and "01", while their compressed key 231a, "ZZZZ" and "ZZZZ", is repeated. That is, if the compressed key 231a is repeated, the key ID management unit 113b1 applies a different value as key ID 118 than the value previously assigned to the key-value pair. Therefore, in entries 1132-3 to 1132-4, the access keys "00ZZZZ" and "01ZZZZ" are different, thus distinguishing them and allowing the key-value pairs to be saved to different logical addresses "00020000" and "00030000". In other words, because the user key 231 is different, different key IDs 118 are assigned, allowing for differentiation even if the compressed key 231a is the same.
[0092] Next, use Figure 11 The data structure of address translation mapping table 900 is explained. Figure 11This is a diagram representing the data structure of address translation mapping table 900.
[0093] Address translation mapping table 900 establishes a correspondence between logical addresses and physical addresses based on one or more logical addresses. Address translation mapping table 900 has a two-dimensional data structure with columns 901 for logical addresses and 902 for physical addresses. Each row represents an entry 1133 for a single key-value pair. In column 902, the physical address of the storage location of the key-value pair in non-volatile memory 130 is stored (e.g., the physical address of the start bit of the key-value pair).
[0094] In addition, when the logical addresses of each bit of a key-value pair are consecutive but the physical addresses are not consecutive, the key-value pairs can be divided into consecutive physical address units and constructed as separate entries 1133.
[0095] Address translation mapping table 900 is constructed on cache memory 140 via memory translation layer 113a when permanent storage device 100 is started.
[0096] When writing key-value pairs to the non-volatile memory 130, the memory translation layer 113a adds entry 1133 to the address translation mapping table 900 by forming an entry 1133 with the logical address of the key-value pair and the physical address assigned to that logical address.
[0097] For example, when the memory translation layer 113a stores the key value of logical address "00000000" corresponding to the physical address "10001000", it adds entry 1133-1, which includes both the logical address "00000000" and the physical address "10001000", to the address translation mapping table 900. When the memory translation layer 113a stores the key value of logical address "00030000" corresponding to the physical address "40004000", it adds entry 1133-4, which includes both the logical address "00030000" and the physical address "40004000", to the address translation mapping table 900.
[0098] When reading a value stored in the non-volatile memory 130, the memory translation layer 113a retrieves the corresponding physical address by referring to the physical address column 902 of the address translation mapping table 900 logical address column 901, and reads the value from the translated physical address.
[0099] In addition, the correspondence between logical addresses and physical addresses can be updated through garbage collection or wear leveling performed by the permanent storage device 100.
[0100] Next, use Figure 12 The key-value pairs stored in the non-volatile memory 130 are described. Figure 12 It is a diagram representing key-value pairs stored in non-volatile memory 130.
[0101] Figure 12 This conceptually represents key-value pairs stored in non-volatile memory 130. Figure 12 In the table, column 1001 represents the physical address, column 1002 represents the user key 231, and column 1003 represents the user value 232. Each row represents one key-value pair.
[0102] For example, in the storage area starting from physical address "10001000", key-value pair 132-1 containing the user key "User_Key0" and the user value "User_Value0" is stored. In the storage area starting from physical address "20002000", key-value pair 132-2 containing the user key "User_Key1" and the user value "-(null)" is stored. Although the user value "-(null)" has a data length of 0, null can also be treated as a valid value representing some information. In the storage area starting from physical address "30003000", key-value pair 132-3 containing the user key "User_Key2" and the user value "User_Value2" is stored. In the storage area starting from physical address "40004000", key-value pair 132-4 containing the user key "User_Key222" and the user value "User_Value222" is stored.
[0103] for Figure 5 The information processing system 1 shown has a variable-length user key 231 in the command field of the KV command 300 (see reference). Figure 4 ) and CQE 400 fields (see Figure 7 The KV command 300 is processed in the [processing unit]. Since the command field of the KV command 300 is of fixed length, although it cannot directly process variable-length user keys 231, it uniquely manages the user key 231 using a fixed-length compressed key 231a generated based on the user key 231 and a key ID 118 generated by the permanent storage device 100. For example, when a hash value is used as the compressed key 231a, hash value collisions may occur, although the probability is low; however, these collisions can be resolved by assigning different key IDs 118. Furthermore, by managing the correspondence between access keys 117 and user keys 231 through the permanent storage device 100, the correspondence between access keys 117 and user keys 231 can be guaranteed.
[0104] Furthermore, the information processing system 1 provides the efficient function of sharing the key ID 118 with the host 2 when the permanent storage device 100 generates the key ID 118. Even if the KV library 22 does not specify the key ID 118, the permanent storage device 100 can still identify the user key 231 through the compressed key 231a when no conflict occurs with the compressed key 231a. Therefore, the KV library 22 preferentially caches the key ID 118 corresponding to the user key 231 that conflicts with the compressed key 231a in the access key cache 22a. At this time, since the conflict is notified to the KV library 22 when the storage command processing is completed, the key ID 118 of the conflicting user key 231 whose storage command processing was completed first is not cached. However, since the order of appending to the access key mapping table 113b2 can be managed by the key ID management unit 113b1, the KV library 22 can specify the wildcard key ID as the key ID for data access.
[0105] Next, use Figure 13 The actions taken when information processing system 1 starts up are described. Figure 13 This is a flowchart representing the startup process of information processing system 1.
[0106] Information processing system 1 remains in standby mode until startup ("No" in S1). If startup occurs ("Yes" in S1), hardware initialization processing is performed (S2). In the hardware initialization process, in addition to the usual initialization settings, a method for generating key ID 118 is set for the namespace 116 of each permanent storage device 100. For example, the method for generating key ID 118 could be a two-digit format in hexadecimal representation, starting with 00 as the initial value and incrementing from 00 when different values are required. Information processing system 1 performs driver initialization processing (S3). When key ID 118 is generated by the driver, in addition to the usual initialization settings, a method for generating compression key 231a (compression algorithm) is set during driver initialization. Information processing system 1 then applies 23 to start (S4).
[0107] Next, use Figure 14 The actions of host 2 regarding the storage command are explained. Figure 14 This is a flowchart showing the actions of host 2 regarding the storage command.
[0108] For host 2, if a PUT request is received from application 23 (S11), the KV library 22 extracts the user key 231 from the PUT request and generates a compressed key 231a using the compression algorithm set in S3 (S12). In this compression algorithm, hash calculations, etc., can be specified. The KV library 22 determines whether the user key 231 received in the PUT request in S11 is stored in column 702 of the user key in the access key cache 22a (S13).
[0109] If user key 231 is not stored in column 702 of user key in access key cache 22a ("No" in S13), KV library 22 uses wildcard key ID in key ID 118 (S14).
[0110] If user key 231 is stored in column 702 of user key in access key cache 22a (yes in S13), KV library 22 reads cache entry 222 from access key cache 22a and obtains key ID 118 contained in cache entry 222 (S15).
[0111] KV library 22 uses the key ID 118 specified in S14 or S15 and the compressed key 231a generated in S12 to construct access key 117 (S16). KV library 22 uses access key 117 to construct the command field for storing commands (see reference). Figure 4 The operating system 21 sends a storage command to the permanent storage device 100 via the operating system 21 (S17). That is, the operating system 21 causes the storage command to enter the I / O function SQ 43 and sends the queuing notification to the permanent storage device 100.
[0112] KV library 22 remains on standby until it receives a CQE 400 indicating the completion of a storage command from permanent storage device 100 via operating system 21 ("No" in S18). If KV library 22 receives CQE 400 from permanent storage device 100 via operating system 21 ("Yes" in S18), operating system 21 removes CQE 400 from I / O CQ 44 and notifies KV library 22 of CQE 400. KV library 22 determines whether CQE 400 contains a flag indicating a compression key conflict (S19).
[0113] If CQE 400 contains a flag indicating a compression key conflict ("Yes" in S19), KV library 22 retrieves the key ID 118 contained in CQE 400 and constructs a cache entry 222 including key ID 118 and user key 231. KV library 22 appends cache entry 222 to access key cache 22a (S20). At this time, KV library 22 completes storage before the store command, and can update access key cache 22a by reading user key 231, which conflicts with compression key 231a but is not cached in access key cache 22a, and key ID 118 used to identify user key 231, from permanent storage device 100. KV library 22 notifies application 23 that the processing corresponding to the PUT request has been completed (S21).
[0114] If CQE 400 does not contain a flag indicating a compression key conflict ("No" in S19), KV library 22 does not constitute cache entry 222, and notifies application 23 that the processing corresponding to the PUT request has been completed (S21).
[0115] Next, use Figure 15 The operation of the permanent storage device 100 regarding storage commands will be explained. Figure 15 This is a flowchart illustrating the operation of the permanent storage device 100 regarding storage commands.
[0116] For the permanent storage device 100, if the controller 110 receives a storage command from the host 2 (S31), it determines whether key ID 118 is a wildcard ID (S32). The controller 110 accesses key 117 (see reference) from the fields of keys 302, 303, 308, and 309 obtained from the storage command. Figure 8 Extract key ID 118 from ).
[0117] If the extracted key ID 118 is a wildcard key ID (e.g., expressed in hexadecimal as "FF") ("Yes" in S32), the controller 110 determines whether the user key 231 for the storage command request actually exists in the access key mapping table 113b2 (S33). Although the user key 231 does not explicitly exist in the access key mapping table 113b2, the controller 110 manages the correspondence between the user key 231 and the access key 117. Therefore, the controller 110 can determine whether the user key 231 for the storage command request actually exists in the access key mapping table 113b2.
[0118] Controller 110 retrieves the value 120 specified by the storage command from the field of column 602 of user key 231 (see reference). Figure 6 Extract user key 231 from the access key mapping table 113b2. Controller 110 refers to the access key mapping table 113b2 (refer to...). Figure 10The controller 110 lists multiple user keys 231 corresponding to multiple access keys 117 on the access key mapping table 113b2. The controller 110 determines whether there is a user key 231 among the listed multiple user keys 231 that matches the user key 231 of the storage command request.
[0119] If a matching user key 231 exists ("Yes" in S33), the controller 110 determines that no conflict has occurred. For example, when storing a previously stored user key 231, if an access key "00XXXX" exists, the storage is considered an overwrite, and it can be determined that no conflict has occurred (see reference). Figure 10 ).
[0120] If no matching user key 231 exists ("No" in S33), the controller 110 can determine that a conflict has occurred. For example, when storing a compressed key (e.g., ZZZZ obtained by compressing User_Key2), if "User_Key2" does not exist among the listed user keys 231, then this storage can be set as the first write of user key "User_Key2", and a conflict can be determined (see [reference]). Figure 9 , Figure 10 Alternatively, when storing a user key with a compression key conflict (e.g., ZZZZ obtained by compressing User_Key222), if "User_Key222" does not exist among the listed user keys 231, then this storage can be considered the first write of user key "User_Key222", and a conflict can be determined (see [reference]). Figure 9 , Figure 10 ).
[0121] If the user key 231 for storing the command request does not actually exist in the access key mapping table 113b2 ("No" in S33), the controller 110 generates a flag indicating a conflict and generates a key ID 118, constituting access key 117 (S34). The controller 110 refers to the access key mapping table 113b2 (refer to...) Figure 10The controller 110 determines a key ID 118 corresponding to the same compression key 231a as the compression key 231a requested in the storage command request. The controller 110 generates a key ID 118 different from the determined key ID 118, using the key ID 118 corresponding to the compression key 231a requested in the storage command request. The controller 110 can increment the value of the determined key ID 118 to generate a key ID 118 with the incremented value. The controller 110 constructs an access key 117 including the generated key ID 118 and the compression key 231a requested in the storage command request, and assigns a logical address to the access key 117. The controller 110 constructs an entry 1132 using the access key 117 and its corresponding logical address, and updates the access key mapping table 113b2 by appending entry 1132.
[0122] For example, if the compression key "ZZZZ" is extracted in S33, the controller 110 refers to... Figure 10 The access key mapping table 113b2, which shows a state without entries 1132-4, determines that the compressed key "ZZZZ" (identical to the compressed key "ZZZZ") exists in entry 1132-3, resulting in a conflict of compressed key "ZZZZ". Correspondingly, the controller 110 determines the key ID "00" of entry 1132-3 as the key ID 118 corresponding to the extracted compressed key "ZZZZ". The controller 110 can generate a key ID 118 with the value "01" incremented from "00" as the key ID 118 corresponding to the compressed key "ZZZZ" extracted in S33. The controller 110 constructs an access key 117 including key ID "01" and the compressed key "ZZZZ". The controller 110 assigns a logical address to the access key 117, and uses the access key 117 and the logical address to form entry 1132-4. The access key mapping table 113b2 is updated by appending entry 1132-4.
[0123] If the extracted key ID is not a wildcard key ID ("No" in S32), the controller 110 assumes that the key ID has been generated and assigns a logical address to the access key 117 contained in the storage command. The controller 110 constructs entry 1132 using access key 117 and logical address, and updates the access key mapping table 113b2 by appending entry 1132.
[0124] If the user key 231 requested in the storage command actually exists in the access key mapping table 113b2 ("Yes" in S33), the controller 110 assigns a logical address to the access key 117 included in the storage command. The controller 110 updates the access key mapping table 113b2 by appending the entry 1132, which is constructed using the access key 117 and the logical address.
[0125] Controller 110 obtains the physical address of the write target of the key-value pair based on the updated access key mapping table 113b2 and address translation mapping table 900 (S35). Controller 110 refers to access key mapping table 113b2 to determine the logical address corresponding to the access key 117 of the key-value pair. Controller 110 refers to address translation mapping table 900 to determine the physical address corresponding to the determined logical address. Controller 110 sets the determined physical address as the physical address of the write target.
[0126] The controller 110 issues a write instruction to the non-volatile memory 130, including the acquired physical address and key-value pair. The non-volatile memory 130 then writes the user key 231 and user value 232 to the physical address in a non-volatile manner according to the write instruction (S36). If the non-volatile memory 130 has completed the execution of the write instruction, it sends a completion notification to the controller 110. If the controller 110 receives the completion notification from the non-volatile memory 130, it generates a CQE 400 as a completion notification of the storage command. At this point, if a conflict is determined to have occurred in S33 ("No"), the controller 110 can generate a CQE 400 containing the flag indicating a conflict generated in S33 and the key ID 118 generated in S34. The controller 110 sends the generated CQE 400 to the host 2 (S37).
[0127] Next, use Figure 16 The actions of host 2 regarding the retrieval command are explained. Figure 16 This is a flowchart illustrating the actions taken by host 2 regarding the retrieval command. Figure 16 In this example, host 2's KV library 22 does not guarantee that the user key 231 received from permanent storage device 100 is consistent with the user key 231 requested by application 23. Therefore, it is guaranteed that appropriate data is read in processes such as confirming whether application 23 is consistent with the request or scheduling the request.
[0128] For host 2, if the KV library 22 receives a GET request from application 23 (S41), it extracts the user key 231 from the GET request and generates a compressed key 231a using the compression algorithm set in S3 (S42). The KV library 22 then determines whether the user key 231 included in the GET request in S41 is stored in column 702 of the user key in the access key cache 22a (S43).
[0129] If user key 231 is not stored in column 702 of user key in access key cache 22a ("No" in S43), KV library 22 specifies wildcard key ID in key ID 118 (S44).
[0130] If user key 231 is stored in column 702 of user key in access key cache 22a ("Yes" in S43), KV library 22 reads cache entry 222 from access key cache 22a and obtains key ID 118 contained in cache entry 222 (S45).
[0131] KV library 22 uses the key ID 118 specified in S44 or S45 and the compressed key 231a generated in S42 to construct access key 117 (S46). KV library 22 uses access key 117 to construct the command field of the retrieval command (see reference). Figure 4 The operating system 21 sends a retrieval command to the permanent storage device 100 via the operating system 21 (S47). That is, the operating system 21 causes the retrieval command to enter the I / O function SQ 43 and sends the queuing notification to the permanent storage device 100.
[0132] KV library 22 remains in standby mode until it receives a key-value pair (user key 231, user value 232) from permanent storage device 100 via operating system 21 ("No" in S48). If KV library 22 receives a key-value pair from permanent storage device 100 via operating system 21 ("Yes" in S48), it supplies the key-value pair to application 23 (S49).
[0133] Next, use Figure 17 The operation of the permanent storage device 100 for retrieval commands will be explained. Figure 17 This is a flowchart illustrating the operation of the permanent storage device 100 regarding retrieval commands.
[0134] For the permanent storage device 100, if the controller 110 receives a retrieval command from the host 2 (S51), it determines whether key ID 118 is a wildcard key ID (S52). The controller 110 accesses the first half of key 117 (refer to the first half of the access key 117 of the fields obtained from the retrieval command of keys 302, 303, 308, and 309) (refer to the first half of the access key 117). Figure 4 Extraction key ID 118.
[0135] If the extracted key ID 118 is a wildcard key ID ("Yes" in S52), it is possible that the compressed key 231a included in the retrieval command is the first compressed key 231a generated among multiple compressed keys 231a that may conflict in the future. Therefore, the controller 110 reads the key ID 118 of the compressed key 231a that has the same compressed key 231a as the compressed key 231a included in the retrieval command from column 802 of the access key mapping table 113b2 (S53), and constructs the access key 117 by using the key ID 118 with the earliest write order among the read key IDs (S54).
[0136] For example, if the compression key 231a included in the search command is "ZZZZ", then... Figure 10 In the access key mapping table 113b2 shown, there are two entries 1132-3 and 1132-4 where the compression key 231a is "ZZZZ". When the entries 1132 in the access key mapping table 113b2 are arranged from top to bottom in writing order, entry 1132-3 is the earliest written entry, and the key ID "00" of entry 1132-3 is the earliest written key ID 118. The controller 110 combines the key ID "00" and the compression key "ZZZZ" to form "00ZZZZ", which constitutes access key 117.
[0137] like Figure 17 As shown, if the extracted key ID 118 is not a wildcard key ID ("No" in S52), the controller 110 extracts the access key 117 from the retrieval command.
[0138] Controller 110 extracts the physical address of the read target of the key-value pair based on access key mapping table 113b2 and address translation mapping table 900 (S55). Controller 110 refers to access key mapping table 113b2 to determine the logical address corresponding to access key 117 of the key-value pair. Controller 110 refers to address translation mapping table 900 to determine the physical address corresponding to the determined logical address. Controller 110 uses the determined physical address as the physical address of the read target.
[0139] The controller 110 issues a read instruction to the non-volatile memory 130 containing the acquired physical address. The non-volatile memory 130 then reads a key-value pair, including user key 231 and user value 232, from that physical address according to the read instruction (S56). The non-volatile memory 130 sends the read user key 231 and user value 232 to the controller 110. If the controller 110 receives user key 231 and user value 232 from the non-volatile memory 130, it sends user key 231 and user value 232 to the host 2 (S57).
[0140] As described above, in this implementation, for information processing system 1, host 2 generates a compressed key by generating a compressed user key, and includes the compressed key in the key field when the KV command is issued. Therefore, variable-length user keys can be managed within the constraints of the key length specified by the command field of the KV command, enabling data exchange that is not limited by the command field.
[0141] Furthermore, in the implementation, when the permanent storage device 100 receives a KV command containing a compression key, it determines for each namespace whether the compression key conflicts with other compression keys. If a conflict occurs, it generates a key ID that identifies the user key before compression. Thus, as long as an access key containing both the key ID and the compression key is constructed, compression key conflicts can be prevented.
[0142] Furthermore, in this embodiment, for information processing system 1, permanent storage device 100 sends a key ID to host 2. Host 2 uses the key ID and compression key to generate an access key and issues a KV command requesting data access to permanent storage device 100 using the access key. This prevents compression key conflicts, enables information exchange using KV commands and limited fields of CQE, and allows for unique data access.
[0143] Furthermore, in this embodiment, for information processing system 1, in order to uniquely access data, the key ID is shared between permanent storage device 100 and host 2, and host 2 preferentially caches key IDs with key conflicts in access key cache 22a. This reduces the usage of host memory 4 on host 2 and improves tail latency during reads.
[0144] Furthermore, in this implementation, for the information processing system 1, the host 2 prioritizes caching the key ID in the access key cache 22a in the event of a compression key conflict; otherwise, it accesses the permanent storage device 100 using the wildcard key ID. This significantly reduces the number of key IDs that need to be shared between the permanent storage device 100 and the host 2, thereby improving read performance and tail latency.
[0145] Furthermore, in this embodiment, the permanent storage device 100 manages the correspondence between access keys and user keys for the information processing system 1. This ensures the correspondence between access keys and user keys.
[0146] For example, in an information processing system, suppose the host and permanent storage devices use an interface that processes data in block form. In this case, when processing data in the form of variable-sized, unstructured objects, data conversion between the object level and the block level is performed through the interface. As a result, the overhead of command processing increases, and command processing time can easily increase.
[0147] In contrast, in this embodiment, the information processing system 1, the host 2, and the permanent storage device 100 employ a key-value (KV) interface as one of the object-level interfaces. Therefore, when processing data in object form, command processing can be performed without conversion to the block level, easily reducing command processing time. This not only improves I / O latency and reduces traffic, but also reduces resource requests to the CPU and memory on the host 2 side.
[0148] Alternatively, for an information processing system, suppose the host and persistent storage process data based on a Log Structured Merge Tree (LSM tree). In this case, the LSM tree has a multi-level hierarchical structure, but memory usage is saved because only the highest level is stored in memory. Most LSM tree implementations use Bloom filters that probability-wise skip a portion of the levels. Since Bloom filters perform predefined processing regardless of the number of bits used, performance degrades if the average number of bits used per key-value pair is low. On resource-constrained key-value persistent storage, the number of bits used per key-value pair is limited when using an LSM tree, potentially resulting in insufficient performance.
[0149] In contrast, in this embodiment, the host 2 and the permanent storage device 100 process compressed keys using compression algorithms such as hash calculation. Therefore, processing time can be shortened in line with the reduction in the average number of bits used per KV pair, and performance degradation can be suppressed.
[0150] Furthermore, as a variation of the implementation method, such as Figure 18 As shown, the KV library 22 can also provide functionality to ensure that the user key 231 requested by application 23 is consistent with the user key 231 sent to application 23 in response to the request. Figure 18 This is a flowchart illustrating the operation of host 2 regarding the retrieval command in a modified example of the implementation method.
[0151] Regarding search commands, such as Figure 18 As shown, the following aspects differ from the implementation method.
[0152] For host 2, KV library 22 performs interaction with... Figure 16 The same process as S41 and 42 shown determines whether a conflict with the compression key 231a has occurred (S61i). The KV library 22 manages and associates each cache entry 222 of the access key cache 22a with the compression key 231a. For example, when appending a cache entry 222 to the access key cache 22a, the KV library 22 can append management information to the access key cache 22a that establishes a correspondence between the identifier of the cache entry and the compression key 231a.
[0153] If a compression key 231a associated with each cache entry 222 is identical to the compression key 231a generated in S42, the KV library 22 determines that a compression key 231a conflict has occurred. If no compression key 231a associated with each cache entry 222 is identical to the compression key 231a generated in S42, the KV library 22 determines that no compression key 231a conflict has occurred.
[0154] If no conflict occurs with compression key 231a ("No" in S61i), proceed with... Figure 16 The processing shown in S44, S46 to S48 is the same.
[0155] In the event of a conflict with the compression key 231a (which is "yes" in S61i), the KV library 22 determines whether the user key 231 contained in the GET request of S41 is stored in the user key column 702 of the access key cache 22a (S43).
[0156] If user key 231 is stored in column 702 of user key in access key cache 22a ("Yes" in S43), KV library 22 reads cache entry 222 from access key cache 22a and obtains key ID 118 contained in cache entry 222 (S45).
[0157] If user key 231 is not stored in column 702 of the user key in access key cache 22a ("No" in S43), KV library 22 obtains a list of key ID 118 and user key 231 that conflict with compressed key 231a (S62i). KV library 22 receives the list into cache area 45. KV library 22 scans the fields of the received list to determine whether the user key 231 requested in S41 exists in the list (S63i).
[0158] If the user key 231 requested in S41 does not exist in the list (in S63i it is "No"), then the KV library 22 is set to an error and the process ends.
[0159] If the user key 231 requested in S41 ("Yes" in S63i) exists in the list, then the KV library 22 extracts the key ID 118 and user key 231 corresponding to the compressed key 231a generated in S42. The KV library 22 constructs a cache entry 222 using the obtained key ID 118 and user key 231, and appends it to the access key cache 22a. Then, it performs... Figure 16 The same processing is applied to S45 to S48 as shown.
[0160] If the KV library 22 receives a key-value pair from the permanent storage device 100 via the operating system 21 ("Yes" in S48), it determines whether the user key 231 requested in S41 is consistent with the user key 231 received in S48 (S64i).
[0161] If the user key 231 requested in S41 is inconsistent with the user key 231 received in S48 (in S64i, this is "No"), the KV library 22 will return the processing to S62i. That is, the loop processing from S61i to S64i is repeated until the user key 231 requested in S41 is consistent with the user key 231 received in S48.
[0162] If the user key 231 requested in S41 matches the user key 231 received in S48 ("Yes" in S64i), the KV library 22 supplies the user value 232 to the application 23 (S64i). At this time, the KV library 22 may also choose not to supply the user key 231 to the application 23.
[0163] Thus, in a variation of the implementation, for host 2, the KV library 22 repeatedly performs the loop processing of S61i to S64i until the user key 231 requested in S41 matches the user key 231 received in S48. This ensures that the user key 231 requested by application 23 matches the user key 231 sent to the application based on that request.
[0164] Several embodiments of the present invention have been described, but these embodiments are merely illustrative and not intended to limit the scope of the invention. These new embodiments can be implemented in a wide variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included within the scope or spirit of the invention, and are included within the scope of the invention as described in the claims and its equivalents.
[0165] Label Explanation
[0166] 1. Information processing system; 2. Host; 3. Host controller; 4. Host memory; 100. Permanent storage device; 110. Controller; 130. Non-volatile memory.
Claims
1. A permanent storage device comprising: Storage media capable of storing key-value pairs composed of keys and values; and The controller generates identification information for the key and can send the identification information to the host. When the first compressed key obtained by compressing the key is consistent with other second compressed keys, the controller generates identification information that is different from that corresponding to the second compressed key for the key. The controller is able to receive commands from the host, the commands containing at least the first compression key in a fixed-length first field and a key and value corresponding to the first compression key in a variable-length second field.
2. The permanent storage device as claimed in claim 1, wherein, The first field contains the identification information of the key corresponding to the first compression key.
3. The permanent storage device as claimed in claim 1, wherein, The controller, in response to receiving a command containing the first compression key, determines whether the first compression key is consistent with the second compression key. If the first compression key is consistent with the second compression key, it generates identification information corresponding to the first compression key using information that is different from the identification information corresponding to the second compression key.
4. The permanent storage device as claimed in claim 1, wherein, The controller determines whether the first compression key is consistent with the second compression key. If the first compression key is consistent with the second compression key, it can notify the host of a flag indicating that they are consistent.
5. A host computer, wherein, The device has a controller that compresses the key in a key-value pair (composed of a key and a value) to generate a compressed key, generates a first command, and is able to send the generated first command to a permanent storage device. If the compressed key is consistent with other compressed keys, the device is able to receive identification information identifying the key and a sign indicating consistency from the permanent storage device. The first command contains the compressed key in a fixed-length first field and contains the key and the value in a variable-length second field.
6. The host computer as described in claim 5, wherein, The controller appends an entry containing the identification information and the key corresponding to the compression key to the cache according to the flag, retrieves the identification information from the cache, and generates a second command. The second command contains the retrieved identification information and the compression key in the first field, and contains the key and the value in the second field.
7. A method for controlling a permanent storage device, comprising the following steps: Obtain the first compressed key obtained by compressing the key; Determine whether the obtained first compression key is consistent with other second compression keys; If the obtained first compression key is consistent with other second compression keys, identification information is generated to identify the key corresponding to the obtained first compression key; The generated identification information is sent to the host. When generating the identification information, if the first compression key and the second compression key are the same, identification information is generated for the key corresponding to the first compression key that is different from the key corresponding to the second compression key. When the first compression key is obtained, a command is received from the host, the command containing at least the first compression key in a fixed-length first field and a key and value corresponding to the first compression key in a variable-length second field.
8. The control method for a permanent storage device as described in claim 7, wherein, The first field contains the identification information of the key corresponding to the first compression key.
9. The control method for a permanent storage device as described in claim 7, wherein, In response to the receipt of a command containing the first compression key, it is determined whether the first compression key is consistent with the second compression key. If the first compression key is consistent with the second compression key, identification information corresponding to the first compression key is generated using information that is different from the identification information corresponding to the second compression key.
10. The control method for a permanent storage device as described in claim 7, wherein, Determine whether the first compression key is consistent with the second compression key. If the first compression key is consistent with the second compression key, notify the host of a flag indicating that they are consistent.
Citation Information
Patent Citations
Duty ratio calculation device
JP2022046003A
Database key compression
US20200409915A1
Integrity verification in cloud key-value stores
US20210334409A1
