A storage device wake-up method and electronic device
Patent Information
- Application Number
- CN202610941963.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-06-29
AI Technical Summary
然而,从低功耗模式唤醒需要重建映射关系、恢复命令队列上下文、重新读取数据或生成响应码,会消耗较长时间,导致存储设备性能降低
[0014]综上所述,本发明提供一种存储设备唤醒方法及电子设备,通过将写指令的映射关系与响应代码段预先存入不掉电的保持存储区,唤醒后直接使用,无需重新建表或查表,可降低存储设备的功耗,且保持存储设备的性能。通过在执行读指令时,若已传输的数据量超过预设值,存储设备不休眠,优先完成剩余数据的传输,可以防止因频繁休眠唤醒导致读延迟增加。若已传输的数据量未超过预设值,将未传输的数据拷贝至保持存储区,并设置休眠阈值,可以保证存储设备自动唤醒时,能快速唤醒,无需再访问非易失性存储器,提升了存储设备性能。通过根据两次实际休眠时长更新待处理的读指令与休眠阈值的反比系数,可以自适应调整存储设备的休眠时间,平衡存储设备性能和功耗。
Smart Images

Figure CN122470245B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a method for waking up a storage device and an electronic device. Background Technology
[0002] In storage devices, due to the bursty nature of command queues, there may be long idle intervals between multiple commands issued by the host. When the idle time exceeds the sleep threshold set internally by the storage device, the storage device will actively enter a low-power mode. However, waking up from low-power mode requires rebuilding the mapping relationship, restoring the command queue context, rereading data, or generating response codes, which consumes a considerable amount of time and leads to a decrease in storage device performance. Summary of the Invention
[0003] The purpose of this invention is to provide a method and electronic device for waking up a storage device, which can reduce the power consumption of the storage device while maintaining its performance.
[0004] This invention provides a method for waking up a storage device, comprising at least: If the host does not continue to send instructions within a preset time, obtain the type of instruction currently pending. If the currently pending instruction is a write instruction, the relevant response information in the write instruction is stored in the holding memory, and the storage device enters hibernation mode. At this time, if the host resends the instruction, it executes the unfinished write instruction based on the response information in the holding memory, and the storage device exits hibernation mode. If the current pending instruction is a read instruction, and the amount of data already transmitted for the current pending instruction does not exceed a preset value, the untransmitted data of the current pending instruction is stored in the holding storage area, and the storage device enters a hibernation mode. A hibernation threshold for the hibernation mode is set according to the number of pending read instructions. At this time, if the hibernation mode of the storage device reaches the hibernation threshold or the host resends an instruction in the hibernation mode to execute the read instructions that were not completed before hibernation, read the data in the holding storage area and return it to the host, the storage device exits the hibernation mode.
[0005] In one embodiment of the present invention, storing the relevant response information in the write instruction into the holding storage area includes the following steps: updating the relevant mapping relationship in the write instruction to the holding storage area, and storing the response code segment into the holding storage area.
[0006] In one embodiment of the present invention, the mapping relationship is stored in the mapping storage area of the holding storage area, and the response code segment is stored in the response storage area of the holding storage area.
[0007] In one embodiment of the present invention, if the instruction to be processed is a write instruction, after the storage device is woken up, the storage device wake-up method further includes the following steps: establishing a mapping table according to the mapping relationship when the host is idle.
[0008] In one embodiment of the present invention, if the instruction to be processed is a read instruction, the storage device enters a hibernation mode, and the storage device wake-up method further includes the following steps: recording the first hibernation timestamp of the storage device.
[0009] In one embodiment of the present invention, the storage device wake-up method further includes the following steps: if the amount of data that has been transmitted for the current pending instruction exceeds a preset value, the data that has not been transmitted for the current pending instruction is read and returned to the host, and the storage device does not enter a sleep mode.
[0010] In one embodiment of the present invention, if the instruction to be processed is a read instruction, after the storage device enters a sleep mode, the storage device wake-up method further includes the following steps: Monitor whether the hibernation mode has reached the hibernation threshold or whether the host resends commands within the hibernation mode; If the hibernation mode reaches the hibernation threshold or the host resends the command within the hibernation mode, the storage device exits the hibernation mode and records the first wake-up timestamp and the first actual hibernation duration of the storage device. If the hibernation mode does not reach the hibernation threshold and the host does not resend instructions within the hibernation mode, the storage device remains in hibernation mode.
[0011] In one embodiment of the present invention, the number of read instructions to be processed is inversely proportional to the sleep threshold.
[0012] In one embodiment of the present invention, if the instruction to be processed is a read instruction, after the storage device is woken up, if the host does not continue to send instructions within a preset time, the storage device enters sleep mode again. The storage device wake-up method further includes the following steps: Record the second hibernation timestamp, the second wake-up timestamp, and the second actual hibernation duration; Based on the second actual sleep duration and the first actual sleep duration, update the inverse ratio coefficient between the number of read instructions to be processed and the sleep threshold.
[0013] The present invention also provides an electronic device, the electronic device comprising: Memory, which stores computer programs; and The processor runs the computer program to implement any of the storage device wake-up methods described above.
[0014] In summary, this invention provides a storage device wake-up method and electronic device. By pre-storing the mapping relationship of write instructions and response code segments in a non-volatile holding memory area, the device can be used directly after wake-up without rebuilding or looking up tables, thus reducing the power consumption of the storage device while maintaining its performance. When executing a read instruction, if the amount of data already transferred exceeds a preset value, the storage device does not go into sleep mode, prioritizing the transfer of the remaining data, preventing increased read latency due to frequent sleep-wake cycles. If the amount of data already transferred does not exceed the preset value, the untransferred data is copied to the holding memory area, and a sleep threshold is set, ensuring rapid wake-up when the storage device automatically wakes up without accessing non-volatile memory, thus improving storage device performance. By updating the inverse ratio coefficient between the pending read instructions and the sleep threshold based on the actual sleep durations of two separate sleep cycles, the sleep time of the storage device can be adaptively adjusted, balancing storage device performance and power consumption.
[0015] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a storage device wake-up method in one embodiment.
[0018] Figure 2 This is a schematic diagram illustrating the specific steps of a storage device wake-up method in one embodiment.
[0019] Figure 3 This is a schematic diagram illustrating the specific steps of a method for waking up a storage device in one embodiment.
[0020] Figure 4 This is a schematic diagram of an electronic device in one embodiment.
[0021] Label Explanation: 11. Processor; 12. Memory. Detailed Implementation
[0022] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0024] In the description of this invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," and "right," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Similarly, the terms "high" and "low," indicating degree, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a high or low position, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0025] In storage devices such as embedded multi-media cards (EMMCs), the command queue (CMD Queue) function allows the host to submit multiple read and write commands to the storage device at once. However, if the idle time between commands exceeds a preset sleep threshold within the storage device, the device automatically enters a low-power mode to reduce standby power consumption. Waking the storage device from low-power mode involves clock recovery, power domain restart, and response template context reconstruction. Particularly time-consuming is the need to reload the flash translation layer mapping from the flash memory medium, rebuild the logical address to physical address translation, and restore the state of any unfinished queue commands. This wake-up process is lengthy, leading to a degraded storage device performance. Therefore, this invention provides a storage device wake-up method and electronic device that can reduce the power consumption of the storage device while maintaining its performance.
[0026] Please see Figure 1 As shown, the present invention provides a method for waking up a storage device, which includes the following steps.
[0027] Step S100: When the host does not continue to send instructions within a preset time, obtain the type of instruction to be processed.
[0028] Step S210: If the instruction to be processed is a write instruction, store the relevant response information in the write instruction into the holding storage area, and the storage device enters sleep mode.
[0029] Step S310: If the host resends the instruction, it executes the write instruction that was not completed before hibernation based on the response information of the storage area, and the storage device exits hibernation mode.
[0030] Step S220: If the instruction to be processed is a read instruction and the amount of data already transmitted by the instruction to be processed has not exceeded the preset value, store the data that has not been transmitted by the instruction to be processed in the holding storage area, the storage device enters the hibernation mode, and the hibernation threshold of the hibernation mode is set according to the number of read instructions to be processed.
[0031] Step S320: If the storage device reaches the hibernation threshold or the host resends an instruction in hibernation mode, executes the read instruction that was not completed before hibernation, reads the data in the hold storage area and returns it to the host, and the storage device exits hibernation mode.
[0032] Please see Figure 2 As shown, in one embodiment of the present invention, in step S210, the response information includes a mapping relationship and a response code segment. Before the host enters hibernation, the mapping relationship related to the write instruction is updated to the holding memory area, and the response code segment is stored in the holding memory area. Specifically, step S210 includes step S211.
[0033] Step S211: Update the relevant mapping relationship in the write instruction to the holding memory area, and store the response code segment in the holding memory area. The storage device then enters hibernation mode.
[0034] Please see Figure 2 As shown, in one embodiment of the present invention, in step S211, when the storage device executes a write instruction, the mapping relationship is written to the mapping storage area in the holding storage area, and the response code segment is written to the response storage area in the holding storage area. The mapping relationship is the correspondence between logical addresses and physical addresses, used to quickly locate the data write position. The response code segment is used to quickly reply to the host.
[0035] Please see Figure 2 As shown, in one embodiment of the present invention, in step S310, when the storage device is woken up, it first calls the response code segment in the storage area to respond to the host, and then establishes a mapping table according to the mapping relationship when the host is idle. Specifically, step S310 includes step S311.
[0036] Step S311: Execute any unfinished write instructions before hibernation, call the response code segment in the hold storage area to respond to the host, the storage device exits hibernation mode, and establishes a mapping table according to the mapping relationship when the host is idle.
[0037] Please see Figure 2As shown, in one embodiment of the present invention, after obtaining the type of instruction to be processed in step S100, the storage device wake-up method further includes determining whether the instruction to be processed is a read instruction. If it is a read instruction, and the amount of data already transmitted by the instruction to be processed exceeds a preset value, the untransmitted data is saved to the holding storage area, and the storage device enters a sleep mode. If the amount of data already transmitted by the instruction to be processed does not exceed the preset value, the storage device normally reads the untransmitted data of the instruction to be processed and returns it to the host, and the storage device does not enter a sleep mode. Specifically, this includes steps S201 to S204.
[0038] Step S201: Determine whether the instruction to be processed is a read instruction. If the instruction to be processed is a write instruction, proceed to step S211. If the instruction to be processed is a read instruction, proceed to step S202.
[0039] Step S202: Determine whether the amount of data already transmitted for the current instruction to be processed exceeds a preset value. If the amount of data already transmitted for the current instruction to be processed does not exceed the preset value, proceed to step S220. If the amount of data already transmitted for the current instruction to be processed exceeds the preset value, proceed to step S204.
[0040] Step S203: Record the first hibernation timestamp of the storage device.
[0041] Step S204: The storage device reads the data that the currently pending instruction has not yet transmitted and returns it to the host. The storage device does not enter hibernation mode.
[0042] Please see Figure 2 As shown, in one embodiment of the present invention, in steps S201 to S204 and steps S211 and S220, since the most frequently executed commands by the storage device are read and write commands, in this application, the currently pending command represents a read command or a write command. The storage area is divided into a data storage area, a mapping storage area, and a response storage area. The data storage area stores the data that has not yet been transmitted by the currently pending read command, the mapping storage area stores the relevant mapping relationships in the write command, and the response storage area stores the response code segment. In this embodiment, the storage area can prevent data loss when the storage device is in a low-power or sleep state, enabling rapid wake-up of the storage device.
[0043] Please see Figure 2As shown, in one embodiment of the present invention, in step S202, the preset value is set, for example, to 10% to 50% of the total capacity of the data buffer. This provides sufficient buffer space to prevent data overflow while maximizing the opportunity for hibernation under light load conditions, achieving an optimal trade-off between throughput and power consumption. In this embodiment, the data buffer is used to temporarily store data read from non-volatile memory but not yet transmitted to the host. When the storage device is powered off, the data in the data buffer is lost.
[0044] Please see Figure 2 As shown, in one embodiment of the present invention, in steps S202 to S220 and S204, when the storage device executes a read instruction, it monitors in real time the amount of data that has been transmitted by the read instruction and compares this amount of data with a preset value. If the amount of data transmitted by the read instruction exceeds the preset value, it indicates that the current read operation is about to be completed. At this time, the storage device does not enter hibernation mode, executes the current read instruction, and after execution, continues to execute the next instruction to be processed. If the amount of data transmitted by the read instruction does not exceed the preset value, it indicates that there is still a large amount of data to be transmitted. At this time, the storage device is allowed to enter hibernation mode to save power. Before entering hibernation mode, the storage device writes the untransmitted data stored in the data buffer to the data storage area to prevent data loss in the data buffer due to power failure during hibernation, ensuring absolute data security. This embodiment, by setting this decision branch, ensures that the storage device is allowed to start the hibernation process only when the data transmission activity is lower than the preset value and the system truly enters a light load or idle state, thereby avoiding performance loss under high load at the source and ensuring the maximum theoretical bandwidth of the storage device in continuous read and write scenarios.
[0045] Please see Figure 2 As shown, in one embodiment of the present invention, in step S220, the number of read commands to be processed is inversely proportional to the sleep threshold. In the command queue, the number of read commands to be processed directly reflects the urgency of subsequent data requests from the host. The inverse coefficient between the number of read commands to be processed and the sleep threshold is preset to a fixed value. When the number of read commands to be processed is large, it indicates that the host has a large backlog of read requests. In this case, the storage device should wake up as soon as possible to prepare data, thus the sleep threshold is set relatively low. When the number of read commands to be processed is small, it indicates that the data requests from the host are not urgent. The storage device can remain in sleep for a longer period to save power, thus the sleep threshold is set relatively high, achieving an adaptive balance between power consumption and performance. In this embodiment, the inverse coefficient is, for example, 1000. When the number of read commands to be processed is, for example, 10, the sleep threshold is, for example, 100s. When the number of read commands to be processed is, for example, 5, the sleep threshold is, for example, 200s.
[0046] Please see Figure 2As shown, in one embodiment of the present invention, if the storage device enters a hibernation mode after executing a write instruction, the storage device wake-up method further includes waking the storage device by having the host resend an instruction to wake it up, and then performing corresponding operations based on the unfinished write instruction after waking up. Specifically, this includes steps S301 to S302.
[0047] Step S301: Determine whether the host resends the command. If the host resends the command, proceed to step S311. If the host does not resend the command, proceed to step S302: The storage device remains in hibernation mode, and return to step S301.
[0048] Please see Figure 2 As shown, in one embodiment of the present invention, in steps S301 to S302 and step S311, since the instructions not completed before the storage device enters hibernation mode are write instructions, when the host resends the instruction to wake up the storage device, the storage device responds to the host first in a state where it has not rebuilt and has not loaded the complete mapping table from the non-volatile storage medium. This eliminates the blocking caused by table building at the first moment of wake-up, reducing the wake-up latency perceived by the host. At this time, after responding to the host, the storage device uses the idle time of waiting for the host to send subsequent data to asynchronously build the mapping table in the background. By performing the reconstruction of the mapping table in batches and with small granularity when the host is idle, write performance is significantly improved, and data transmission stuttering and performance jitter are avoided.
[0049] Please see Figure 2 As shown, in one embodiment of the present invention, when the storage device enters a hibernation mode after executing a read instruction, the storage device wake-up method further includes waking up the storage device by determining whether the hibernation mode exceeds a hibernation threshold or whether the host resends an instruction. After waking up, the storage device performs corresponding operations based on the unfinished read instruction. Specifically, this includes steps S321 to S323.
[0050] Step S321: Monitor whether the hibernation mode has reached the hibernation threshold or whether the host has resent commands within the hibernation mode. If the hibernation mode has reached the hibernation threshold or the host has resent commands within the hibernation mode, proceed to step S320. If the hibernation mode has not reached the hibernation threshold and the host has not resent commands within the hibernation mode, proceed to step S322: The storage device remains in hibernation mode, and return to step S321.
[0051] Step S323: Record the first wake-up timestamp and the first actual sleep duration of the storage device.
[0052] Please see Figure 2As shown, in one embodiment of the present invention, in steps S321 to S323, when the hibernation mode of the storage device exceeds the hibernation threshold or the host resends the instruction within the hibernation mode, the storage device is woken up. Recording the first wake-up timestamp and the first actual hibernation duration of the storage device can provide an initial feedback benchmark for calibrating the mapping relationship between subsequent hibernation duration and the number of read instructions.
[0053] Please see Figure 3 As shown, in one embodiment of the present invention, after executing step S323, the storage device wake-up method further includes the storage device starting normal operation after being woken up for the first time. If step S100 is triggered, subsequent steps are continued. If the currently pending instruction is a read instruction, then step S202 and subsequent steps are continued. Specifically, step S203 is replaced by step S401, step S323 is replaced by step S402, and after the storage device is re-wake up, the sleep threshold is adjusted based on the duration of the two sleep cycles and the number of pending read instructions. Specifically, this includes steps S401 to S403.
[0054] Step S401: Record the second hibernation timestamp of the storage device.
[0055] Step S402: Record the second wake-up timestamp and the second actual sleep duration of the storage device.
[0056] Step S403: Update the inverse ratio coefficient between the number of read instructions to be processed and the sleep threshold based on the second actual sleep duration and the first actual sleep duration.
[0057] Please see Figure 3 As shown, in one embodiment of the present invention, in steps S401 to S403, when the host enters hibernation mode for the second time, the second actual hibernation duration is recorded. Based on the difference between the first actual hibernation duration and the second hibernation duration, the inverse coefficient between the number of read instructions to be processed and the hibernation threshold is updated for setting the hibernation duration for the next time. In this embodiment, the number of read instructions to be processed is, for example, 10, and the hibernation threshold is, for example, 100s. When the first actual hibernation duration is, for example, 50s, it indicates that the storage device has been woken up prematurely by the host. When the number of read instructions to be processed becomes 5 before the second hibernation, the hibernation threshold is, for example, 200s, and the second actual hibernation duration is, for example, 200s, it indicates that the storage device has been woken up automatically. Based on the arithmetic mean of the two actual hibernation durations multiplied by the number of read instructions to be processed, the inverse coefficient is, for example, 625. Therefore, when the number of read instructions to be processed in the next hibernation is, for example, 5, the hibernation threshold is set to, for example, 125s. In other embodiments, the inverse coefficient can also be obtained based on the two actual hibernation durations using, for example, a weighted average method or an exponential smoothing method.
[0058] Please see Figure 2 and Figure 3 As shown, in one embodiment of the present invention, when the storage device enters a third hibernation after a second hibernation, the second hibernation timestamp, the second wake-up timestamp, and the second actual hibernation duration after the second hibernation are compared with the third hibernation, which is equivalent to the first hibernation. The third hibernation also obtains the second hibernation timestamp, the second wake-up timestamp, and the second actual hibernation duration according to steps S401 to S402, which is equivalent to the second hibernation. Subsequent hibernation entry steps follow the same pattern. From the first hibernation, the inverse coefficient between the number of pending read instructions and the hibernation threshold is updated based on the duration of two adjacent hibernations.
[0059] Please see Figure 4 As shown, the present invention provides an electronic device, which includes a processor 11, a memory 12, and a computer program stored on the memory 12 and executable on the processor 11. The processor 11 executes the above-described memory device wake-up method.
[0060] Please see Figure 4 As shown, the memory 12 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 12 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 12 can include both internal and external storage units of the electronic device. The memory 12 can be used not only to store application software and various types of data installed on the electronic device, but also to temporarily store data that has been output or will be output.
[0061] Please see Figure 4 As shown, in some embodiments, the processor 11 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units, microprocessors, digital processing chips, graphics processors, and various control chips. The processor 11 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 12 and calls data stored in the memory 12 (such as programs for waking up storage devices) to perform various functions of the electronic device and process data.
[0062] In some embodiments, the processor 11 executes the operating system of the electronic device and various installed applications. The processor 11 executes the applications to implement the steps in the storage device wake-up method described above.
[0063] In some embodiments, the computer program may be divided into one or more modules, one or more of which are stored in the memory 12 and executed by the processor 11 to perform the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in an electronic device.
[0064] This invention provides a storage device wake-up method and electronic device, which can perform different processing on read and write instructions before the storage device enters hibernation. When executing a write instruction, the mapping relationship related to the write instruction and the response code segment of the host are stored in the holding memory, which can improve the performance of the storage device. When executing a read instruction, if the amount of data already transmitted does not exceed the hibernation threshold, the untransmitted data is written to the holding memory, and the hibernation threshold is set, which can improve the performance when the storage device actively wakes up. By updating the inverse ratio coefficient between the pending read instructions and the hibernation threshold based on the two actual hibernation durations, the hibernation time of the storage device can be adaptively adjusted to balance the performance and power consumption of the storage device.
[0065] The embodiments of the present invention disclosed above are merely illustrative of the invention. The embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for waking up a storage device, characterized in that, At least including: If the host does not continue to send instructions within a preset time, obtain the type of instruction currently pending. If the instruction to be processed is a write instruction, the relevant response information in the write instruction is stored in the holding storage area, and the storage device enters hibernation mode; at this time, if the host resends the instruction, the write instruction that was not completed before hibernation is executed according to the response information in the holding storage area, and the storage device exits hibernation mode. as well as If the current pending instruction is a read instruction, and the amount of data already transmitted for the current pending instruction does not exceed a preset value, the untransmitted data of the current pending instruction is stored in the holding storage area, and the storage device enters a hibernation mode. A hibernation threshold for the hibernation mode is set according to the number of pending read instructions. At this time, if the hibernation mode of the storage device reaches the hibernation threshold or the host resends an instruction in the hibernation mode to execute the read instructions that were not completed before hibernation, read the data in the holding storage area and return it to the host, the storage device exits the hibernation mode.
2. The storage device wake-up method according to claim 1, characterized in that, Storing the relevant response information in the write command into the holding memory area includes the following steps: The relevant mapping relationships in the write instruction are updated to the holding memory area, and the response code segment is stored in the holding memory area.
3. The storage device wake-up method according to claim 2, characterized in that, The mapping relationship is stored in the mapping storage area of the holding storage area, and the response code segment is stored in the response storage area of the holding storage area.
4. The storage device wake-up method according to claim 1, characterized in that, If the instruction to be processed is a write instruction, after the storage device is woken up, the storage device wake-up method further includes the following steps: establishing a mapping table according to the mapping relationship when the host is idle.
5. The storage device wake-up method according to claim 1, characterized in that, If the instruction to be processed is a read instruction, the storage device enters a hibernation mode. The storage device wake-up method further includes the following steps: recording the first hibernation timestamp of the storage device.
6. The storage device wake-up method according to claim 1, characterized in that, The storage device wake-up method further includes the following steps: if the amount of data transmitted by the current pending instruction exceeds a preset value, the data that has not been transmitted by the current pending instruction is read and returned to the host, and the storage device does not enter a hibernation mode.
7. The storage device wake-up method according to claim 1, characterized in that, If the instruction to be processed is a read instruction, after the storage device enters hibernation mode, the storage device wake-up method further includes the following steps: Monitor whether the hibernation mode has reached the hibernation threshold or whether the host resends commands within the hibernation mode; If the hibernation mode reaches the hibernation threshold or the host resends the command within the hibernation mode, the storage device exits the hibernation mode and records the first wake-up timestamp and the first actual hibernation duration of the storage device. If the hibernation mode does not reach the hibernation threshold and the host does not resend instructions within the hibernation mode, the storage device remains in hibernation mode.
8. The storage device wake-up method according to claim 1, characterized in that, The number of read instructions to be processed is inversely proportional to the sleep threshold.
9. The storage device wake-up method according to claim 1, characterized in that, If the currently pending instruction is a read instruction, after the storage device is woken up, if the host does not continue to send instructions within a preset time, the storage device will enter sleep mode again. The storage device wake-up method further includes the following steps: Record the second hibernation timestamp, the second wake-up timestamp, and the second actual hibernation duration; Based on the second actual sleep duration and the first actual sleep duration, update the inverse ratio coefficient between the number of read instructions to be processed and the sleep threshold.
10. An electronic device, characterized in that, The electronic device includes: Memory, which stores computer programs; and The processor runs the computer program to implement the storage device wake-up method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Storage equipment awakening method and device, terminal equipment and storage medium
CN117632272A
Storage equipment energy-saving method and device, equipment, medium and product
CN120428842A