Method for reducing time delay of application of mobile device and mobile device

By detecting the input/output throughput and garbage collection mode of the foreground application and optimizing storage operations, the mobile device response time and ANR problems are solved, and the user experience and performance are improved.

CN119127824APending Publication Date: 2024-12-13SAMSUNG (CHINA) SEMICONDUCTOR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411252075.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The response time of the mobile device is too long or has lag, which affects the user experience, and frequent application unresponsive (ANR) problems occur, resulting in performance degradation.

Method used

By detecting the input/output throughput of the foreground application, determining the status of the mobile device, and determining the method and granularity of sending discard commands to the storage device based on the priority of the status and garbage collection mode and the usage information of the storage device, to optimize the storage operation , reduce application delay.

Benefits of technology

It effectively reduces the application response time of mobile devices, reduces the occurrence of ANR problems, improves user experience and performance, and takes into account both reducing response time and reducing ANR while improving system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127824A_ABST
    Figure CN119127824A_ABST
Patent Text Reader

Abstract

The invention discloses a method for reducing time delay of application of a mobile device and the mobile device. The method includes: detecting at least one foreground application and obtaining an input / output (I / O) throughput of the at least one foreground application; determining a state of the mobile device based on an input / output (I / O) throughput of the at least one foreground application; based on the determined state of the mobile device, a manner in which a drop command is transmitted to a storage device of the mobile device is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of storage, and more particularly, to a method and system for reducing the response time of a mobile device. Background Art

[0002] The response time of an application on a mobile device is an important factor in determining its performance. If the application's response time is too long or there is a freeze, it will seriously affect the user experience of the mobile device.

[0003] In addition, Application Not Response (ANR) is also an important performance indicator of mobile devices. ANR refers to the inability of an application to respond to user input or operation for a period of time.

[0004] Therefore, methods and systems for reducing the response time of applications in mobile devices and reducing the occurrence of ANR problems are crucial to improving the performance and user experience of mobile devices. Summary of the invention

[0005] This Summary is provided to introduce in simplified form a selection of concepts that are further described below in the Detailed Description. This Summary is not intended to identify key features and / or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.

[0006] According to one aspect of the present disclosure, a method for reducing the latency of an application of a mobile device includes: detecting at least one foreground application and obtaining the input / output (I / O) throughput of the at least one foreground application; determining a state of the mobile device based on the I / O throughput of the at least one foreground application; and determining a manner of sending a discard command to a storage device of the mobile device based on the determined state of the mobile device.

[0007] The state of the mobile device may include an idle state and a busy state.

[0008] The method for reducing the latency of an application of a mobile device may further include: determining whether a garbage collection mode obtained from a file system is the highest priority, wherein, based on the garbage collection mode being the highest priority, a discard command is sent to a storage device in a coarse-grained manner, wherein the step of determining a manner of sending a discard command to a storage device of the mobile device based on a determined state of the mobile device includes: determining a manner of sending a discard command to a storage device of the mobile device based on the determined state of the mobile device and based on the garbage collection mode not being the highest priority.

[0009] The step of determining a manner of sending a discard command to a storage device of a mobile device may include: based on the mobile device being in a busy state, not sending a discard command to the storage device; based on the mobile device being in an idle state and the determined priority being a first priority lower than the highest priority, sending a discard command to the storage device in a fine-grained manner.

[0010] Based on the mobile device being in an idle state and the determined priority being a second priority lower than the highest priority, a manner of sending a discard command to the storage device may be determined based on usage information of the storage device, wherein the second priority is higher than the first priority.

[0011] The usage information of the storage device may include the fill rate of the storage device, wherein when the fill rate of the storage device is lower than a first threshold, a discard command is sent to the storage device with a coarse granularity, wherein when the fill rate of the storage device is not lower than the first threshold, a discard command is sent to the storage device with a fine granularity.

[0012] The step of determining the state of the mobile device may include: comparing the I / O throughput of the at least one foreground application with a second threshold; when the I / O throughput of the at least one foreground application is greater than the second threshold, determining that the mobile device is in a busy state; when the I / O throughput of the at least one foreground application is less than or equal to the second threshold, determining that the mobile device is in an idle state.

[0013] The storage device may include a first storage area and a second storage area, wherein the first storage area includes a turbo write buffer including a single-level cell and the second storage area includes a memory including a multi-level cell.

[0014] The method for reducing latency of applications of a mobile device may further include: writing data of the at least one foreground application into a Turbo write buffer of a first storage area, and writing data of a background application into a second storage area.

[0015] The method for reducing latency of an application of a mobile device may further include: when a Turbowrite buffer of the first storage area is full, flushing data from the first storage area to the second storage area in a first-in-first-out manner.

[0016] The file system may be a flash-friendly file system F2FS, wherein the storage device may be a universal flash device UFS.

[0017] According to one aspect of the present disclosure, a system for reducing the latency of applications of a mobile device includes: a detector, configured to detect at least one foreground application and obtain a process list of the at least one foreground application; a status monitor, configured to obtain an input / output (I / O) throughput of the at least one foreground application based on the process list of the at least one foreground application, and determine a status of the mobile device based on the I / O throughput of the at least one foreground application; and a discard command manager, configured to determine a manner of sending a discard command to a storage device of the mobile device based on the determined status of the mobile device.

[0018] According to one aspect of the present disclosure, a mobile device includes at least one processor, and the at least one processor is configured to implement: a detector, configured to detect at least one foreground application and obtain a process list of the at least one foreground application; a status monitor, configured to obtain the input / output I / O throughput of the at least one foreground application based on the process list of the at least one foreground application, and determine the status of the mobile device based on the I / O throughput of the at least one foreground application; a discard command manager, configured to determine a method of sending a discard command to a storage device of the mobile device based on the determined status of the mobile device.

[0019] The state of the mobile device may include an idle state and a busy state.

[0020] The discard command manager may also be configured to determine whether a garbage collection mode obtained from a file system is of the highest priority, wherein based on the garbage collection mode being of the highest priority, a discard command is sent to a storage device in a coarse-grained manner, wherein the discard command manager may also be configured to determine a manner of sending a discard command to a storage device of a mobile device based on a determined state of the mobile device and based on the garbage collection mode not being of the highest priority.

[0021] The discard command manager can also be configured to: not send a discard command to the storage device based on the mobile device being in a busy state, and send a discard command to the storage device with fine granularity based on the mobile device being in an idle state and the determined priority is a first priority lower than the highest priority.

[0022] The discard command manager can also be configured to determine a method of sending a discard command to the storage device based on the usage information of the storage device, based on the mobile device being in an idle state and the determined priority being a second priority lower than the highest priority, wherein the second priority is higher than the first priority.

[0023] The usage information of the storage device may include the fill rate of the storage device, wherein the discard command manager is further configured to: send a discard command to the storage device at a coarse granularity when the fill rate of the storage device is lower than a first threshold, and send a discard command to the storage device at a fine granularity when the fill rate of the storage device is equal to or higher than the first threshold.

[0024] The status monitor can also be configured to: compare the I / O throughput of the at least one foreground application with a second threshold; when the I / O throughput of the at least one foreground application is greater than the second threshold, determine that the mobile device is in a busy state; when the I / O throughput of the at least one foreground application is less than or equal to the second threshold, determine that the mobile device is in an idle state.

[0025] The status monitor can also be configured to: write the data of the at least one foreground application to a Turbo write buffer of a first storage area within the storage device, and write the data of the background application to a second storage area within the storage device, wherein the first storage area includes a Turbo write buffer comprising a single-layer unit, and the second storage area includes a memory comprising multi-layer units.

[0026] According to one aspect of the present disclosure, an electronic device includes: at least one processor; and a storage device, including one or more memories, wherein the one or more memories are configured to store instructions, and when the instructions are executed by the at least one processor, the at least one processor performs the following processing: detecting at least one foreground application and obtaining the input / output I / O throughput of the at least one foreground application; determining a state of a mobile device based on the I / O throughput of the at least one foreground application; and determining a method of sending a discard command to the storage device of the mobile device based on the determined state of the mobile device.

[0027] According to one aspect of the present disclosure, an electronic device includes: a storage device; and a processor configured to perform the following processing: detecting at least one foreground application and obtaining the input / output (I / O) throughput of the at least one foreground application; determining a state of the mobile device based on the I / O throughput of the at least one foreground application; and determining a method of sending a discard command to the storage device of the mobile device based on the determined state of the mobile device.

[0028] Additional aspects and / or advantages of the inventive concepts will be set forth in part in the description which follows and, in part, will be apparent from the description, and / or may be learned by practice of various example embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description in conjunction with the accompanying drawings.

[0030] Figure 1 An example of a discard command in the prior art is shown.

[0031] Figure 2 It is shown that a flash-friendly file system (F2FS) generates a discard command in the prior art.

[0032] Figure 3 An example of a fill rate of a Universal Flash Storage (UFS) device in the prior art is shown.

[0033] Figure 4 It is a flow chart of sending a discard command in real-time mode in the prior art.

[0034] Figure 5 A UFS system according to an example embodiment of the present disclosure is shown.

[0035] Figure 6 Another example of a UFS system according to an example embodiment of the present disclosure is shown.

[0036] Figure 7 A method of reducing the latency of an application according to an example embodiment of the present disclosure is shown.

[0037] Figure 8 A method of reducing the latency of an application according to an example embodiment of the present disclosure is shown.

[0038] Fig. 9 is a flowchart of sending a discard command according to an example embodiment of the present disclosure.

[0039] Fig.10 A system for reducing latency of an application according to an example embodiment of the present disclosure is shown.

[0040] Fig.11 The operation of the detector and the state monitor according to an example embodiment of the present disclosure is shown.

[0041] Fig.12 Shows the response time of the foreground application.

[0042] Fig.13 A mobile device according to an example embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0043] The following detailed description is provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, except for the operations that must occur in a specific order, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.

[0044] The features described herein may be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein that will be clear after understanding the disclosure of the present application.

[0045] The structural or functional description of the examples disclosed herein below is intended only for the purpose of describing the examples, and the examples may be implemented in various forms. The examples are not intended to be limiting, but various modifications, equivalents, and substitutes are also intended to be included within the scope of the claims.

[0046] Although the terms "first" or "second" are used to explain various components, the components are not limited to the terms. These terms should only be used to distinguish one component from another component. For example, within the scope of the rights according to the concept of the present disclosure, a "first" component may be referred to as a "second" component, or similarly, a "second" component may be referred to as a "first" component.

[0047] When a component is referred to as being “connected to” another component, the component may be directly connected or coupled to the other component or intervening components may be present.

[0048] As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. It should also be understood that when the terms "include" and / or "comprising" are used in this specification, it indicates the presence of stated features, integers, steps, operations, elements, components or combinations thereof, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0049] When the phrase "at least one" is used with a list of items, it means that different combinations of one or more of the listed items may be used, and only one item in the list may be needed. For example, "at least one of A, B, and C" includes any of the following combinations: A, B, C, A and B, A and C, B and C, A and B and C, and any variations thereof. As an additional example, the expression "at least one of a, b, or c" may mean only a, only b, only c, both a and b, both a and c, both b and c, all of a, b, and c, or variations thereof. Similarly, the term "group" means one or more. Thus, the group of items may be a single item or a collection of two or more items.

[0050] Unless otherwise defined, all terms (including technical or scientific terms) used herein have the same meaning as those commonly understood by those skilled in the art to which the examples belong. It will also be understood that, unless expressly defined as such herein, terms (such as those defined in general dictionaries) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and will not be interpreted in an idealized or overly formal sense.

[0051] Hereinafter, examples will be described in detail with reference to the accompanying drawings. Regarding reference numerals assigned to elements in the drawings, it should be noted that the same elements will be denoted by the same reference numerals and redundant descriptions thereof will be omitted.

[0052] In order to better understand the present disclosure, the following discusses discard commands that cause an application to respond too long or generate an application not responding (ANR) problem.

[0053] Figure 1 An example of a discard command in the prior art is shown.

[0054] When the data in a specific logical block address (LBA) space within the file system is invalid, the file system can send a discard command to a storage device, such as a universal flash storage device (UFS). UFS updates the logical address to physical address (L2P) mapping table and marks the data at the corresponding physical address as invalid. When UFS performs garbage collection on a physical block, if the data in a page on the physical block is marked as invalid, there is no need to move the data in the page. Obviously, the discard command can reduce the additional overhead caused by the storage device performing garbage collection.

[0055] As a log-type file system, the Flash-Friendly File System (F2FS) updates data in a remote update manner, so F2FS generates a large number of discard commands. Figure 2 An example of F2FS generating a discard command in the prior art is shown.

[0056] Reference Figure 2 , the LBA space of F2FS includes areas A1 to A3, areas B1 to B2, and area C. When F2FS updates data in area A2', F2FS can send a discard command to UFS, so that the data corresponding to area A2 is marked as invalid. In addition, when data located in area C is deleted, F2FS can also send a discard command to UFS, so that the data corresponding to area C is marked as invalid.

[0057] The processing of the discard command will occupy the input and output (IO) throughput of the system, thereby affecting the response time of the foreground application of the mobile device. Specifically, when the host continuously sends a large number of discard commands to the storage device (e.g., UFS), the storage device is busy processing the discard commands, which will cause the IO response time of the storage device to the foreground application to be longer.

[0058] In addition, the usage status of the storage device may also be an important factor that causes the application's response time to be too long or generates ANR problems. For example, when the fill ratio of the UFS is too high or exceeds a predetermined threshold, it may easily trigger the garbage collection operation in the UFS, thereby increasing the application's response time.

[0059] The fill rate of a UFS may represent the ratio of the used space to the total space within the UFS. Figure 3 An example of a UFS in the prior art having a filling rate of 90% is shown.

[0060] A fill rate exceeding a predetermined threshold (eg, 80%) indicates a high probability of triggering a garbage collection operation inside the UFS. However, the above threshold is only an example, and the present disclosure is not limited thereto.

[0061] In the prior art, there are two modes for sending discard commands in F2FS: real-time mode and lazy mode.

[0062] Figure 4 A flow chart of sending a discard command in real-time mode in the prior art is shown.

[0063] When there are not enough free segments in F2FS, the garbage collection priority of F2FS becomes "urgent_high". At this time, the garbage collection operation will be triggered to reclaim the valid logical address space. F2FS can send discard commands in real-time mode.

[0064] Reference Figure 4 In operation S410, F2FS first determines whether all discard commands are sent. If "no", in operation S420, F2FS waits or sleeps for a predetermined time, and then in operation S440, F2FS again determines whether all discard commands are sent; if "no", in operation S450, F2FS sends discard commands to UFS in batches. The maximum number of discard commands sent in one batch is 512.

[0065] In operation S410, when it is determined that all discard commands are sent, the F2FS waits or sleeps for 60 seconds in operation S430, and then performs operation S440.

[0066] Therefore, in real-time mode, F2FS may frequently send discard commands. Although real-time mode can reduce the probability of ANR by processing discard commands in a timely manner, the response time of the foreground application will be longer because UFS is busy processing discard commands.

[0067] F2FS can also send discard commands in lazy mode. When there are enough free segments in F2FS, the garbage collection priority of F2FS is urgent_middle or urgent_low. In order to reduce the impact on foreground applications, the existing F2FS generally sends discard commands when the phone is idle (for example, when the phone is charging, the screen is locked, or the system time indicates night mode).

[0068] However, in lazy mode, the ANR problem is easily caused by failure to process the discard command in time. In addition, when the phone is idle based on the system time or lock screen, there may still be foreground applications running. At this time, issuing the discard command may affect the response time of the application.

[0069] In other words, neither real-time mode nor lazy mode can reduce the response time of foreground applications and reduce ANR. In addition, in real-time mode and lazy mode, the granularity of sending discard commands is large (for example, 512 at a time), which makes UFS take a long time to process discard commands.

[0070] The method and system for reducing application latency of the present disclosure will be described below.

[0071] Figure 5 A UFS system 2000 according to an example embodiment of the present disclosure is shown.

[0072] Reference Figure 5 The UFS system 2000 may be a system conforming to the UFS standard announced by the Joint Electronics Engineering Design Development Council (JEDEC), and includes a UFS host 2100 , a UFS device 2200 , and a UFS interface 2300 .

[0073] Reference Figure 5 , the UFS host 2100 may be connected to the UFS device 2200 through the UFS interface 2300. When the host processor is an application processor, the UFS host 2100 may be implemented as a part of the application processor.

[0074] The UFS host 2100 may include a UFS host controller 2110, an application 2120, a UFS driver 2130, a host memory 2140, and a UFS interconnect (UIC) layer 2150. The UFS device 2200 may include a UFS device controller 2210, an NVM 2220, a storage interface 2230, a device memory 2240, a UIC layer 2250, and a regulator 2260. The NVM 2220 may include a plurality of storage elements 2221. Although each storage element 2221 may include a V-NAND flash memory having a 2D structure or a 3D structure, each storage element 2221 may include another NVM, such as a PRAM and / or an RRAM, etc. The UFS device controller 2210 may be connected to the NVM 2220 through a storage interface 2230. The storage interface 2230 may be set to comply with a standard protocol such as Toggle or an open NAND flash interface (ONFI).

[0075] The application 2120 may refer to a program that wants to communicate with the UFS device 2200 to use the functions of the UFS device 2200. The application 2120 may send an input-output request (IOR) to the UFS driver 2130 for an input / output (I / O) operation on the UFS device 2200. The IOR may refer to a data read request, a data storage (or write) request, and / or a data erase (or discard) request, but is not limited thereto.

[0076] The UFS driver 2130 may manage the UFS host controller 2110 through a UFS-Host Controller Interface (UFS-HCI). The UFS driver 2130 may convert the IOR generated by the application 2120 into a UFS command defined by the UFS standard, and send the UFS command to the UFS host controller 2110. One IOR may be converted into a plurality of UFS commands. Although the UFS command may be basically defined by the SCSI standard, the UFS command may be a command dedicated to the UFS standard.

[0077] The UFS host controller 2110 may transmit the UFS command converted by the UFS driver 2130 to the UIC layer 2250 of the UFS device 2200 through the UIC layer 2150 and the UFS interface 2300. During transmission of the UFS command, the UFS host register 2111 of the UFS host controller 2110 may function as a command queue (CQ).

[0078] The UIC layer 2150 on the UFS host 2100 side may include a Mobile Industry Processor Interface (MIPI) M-PHY 2151 and a MIPI UniPro 2152 , and the UIC layer 2150 on the UFS device 2200 side may also include a MIPI M-PHY 2251 and a MIPI UniPro 2252 .

[0079] The UFS interface 2300 may include a line configured to transmit a reference clock signal REF_CLK, a line configured to transmit a hardware reset signal RESET_n of the UFS device 2200 , a pair of lines configured to transmit a pair of differential input signals DIN_t and DIN_c, and a pair of lines configured to transmit a pair of differential output signals DOUT_t and DOUT_c.

[0080] The frequency of the reference clock signal REF_CLK provided from the UFS host 2100 to the UFS device 2200 may be one of 19.2 MHz, 26 MHz, 38.4 MHz, and 52 MHz, but is not limited thereto. The UFS host 2100 may change the frequency of the reference clock signal REF_CLK during operation, that is, during a data transmission / reception operation between the UFS host 2100 and the UFS device 2200. The UFS device 2200 may generate a clock signal having various frequencies from the reference clock signal REF_CLK provided by the UFS host 2100 by using a phase-locked loop (PLL). And, the UFS host 2100 may set the data rate between the UFS host 2100 and the UFS device 2200 by using the frequency of the reference clock signal REF_CLK. That is, the data rate may be determined according to the frequency of the reference clock signal REF_CLK.

[0081] The UFS interface 2300 may support multiple channels, each of which may be implemented as a pair of differential lines. For example, the UFS interface 2300 may include at least one receiving channel and at least one transmitting channel. Figure 5 In the embodiment, a pair of lines configured to transmit a pair of differential input signals DIN_T and DIN_C may constitute a receiving channel, and a pair of lines configured to transmit a pair of differential output signals DOUT_T and DOUT_C ​​may constitute a transmitting channel. Figure 5 One transmission channel and one reception channel are shown in FIG. 1 , but the number of transmission channels and the number of reception channels may be changed.

[0082] The receiving channel and the transmitting channel may transmit data based on a serial communication scheme. Due to the structure in which the receiving channel is separated from the transmitting channel, full-duplex communication between the UFS host 2100 and the UFS device 2200 may be enabled. That is, while receiving data from the UFS host 2100 through the receiving channel, the UFS device 2200 may transmit data to the UFS host 2100 through the transmitting channel. In addition, control data (e.g., commands) from the UFS host 2100 to the UFS device 2200 and user data stored in or read from the NVM 2220 of the UFS device 2200 by the UFS host 2100 may be transmitted through the same channel. Therefore, between the UFS host 2100 and the UFS device 2200, in addition to a pair of receiving channels and a pair of transmitting channels, there is no need to further provide a separate channel for data transmission.

[0083] The UFS device controller 2210 of the UFS device 2200 may control all operations of the UFS device 2200. The UFS device controller 2210 may manage the NVM 2220 by using a logical unit (LU) 2211, which is a logical data storage unit. The number of LUs 2211 may be 8, but is not limited thereto. The UFS device controller 2210 may include an FTL, and convert a logical data address (e.g., a logical block address (LBA)) received from the UFS host 2100 into a physical data address (e.g., a physical block address (PBA)) by using address mapping information of the FTL. A logical block configured to store user data in the UFS system 2000 may have a size within a predetermined range. For example, the minimum size of a logical block may be set to 4Kbyte.

[0084] When a command from the UFS host 2100 is applied to the UFS device 2200 through the UIC layer 2250 , the UFS device controller 2210 may perform an operation in response to the command and transmit a completion response to the UFS host 2100 when the operation is completed.

[0085] As an example, when the UFS host 2100 intends to store user data in the UFS device 2200, the UFS host 2100 may send a data storage command to the UFS device 2200. When receiving a response (“Ready to Transfer” response) indicating that the UFS host 2100 is ready to receive user data (Ready to Transfer) from the UFS device 2200, the UFS host 2100 may send the user data to the UFS device 2200. The UFS device controller 2210 may temporarily store the received user data in the device memory 2240, and store the user data temporarily stored in the device memory 2240 in a selected location of the NVM 2220 based on the address mapping information of the FTL.

[0086] As another example, when the UFS host 2100 intends to read user data stored in the UFS device 2200, the UFS host 2100 may send a data read command to the UFS device 2200. The UFS device controller 2210, which has received the command, may read the user data from the NVM 2220 based on the data read command, and temporarily store the read user data in the device memory 2240. During the read operation, the UFS device controller 2210 may detect and correct errors in the read user data by using an ECC engine embedded therein. More specifically, the ECC engine may generate parity bits for write data to be written to the NVM 2220, and the generated parity bits may be stored in the NVM 2220 together with the write data. During the reading of data from the NVM 2220, the ECC engine may correct errors in the read data by using the read data and the parity bits read from the NVM 2220, and output the error-corrected read data.

[0087] In addition, the UFS device controller 2210 may transmit user data temporarily stored in the device memory 2240 to the UFS host 2100. Also, the UFS device controller 2210 may further include an AES engine. The AES engine may perform at least one of an encryption operation and a decryption operation on data transmitted to the UFS device controller 2210 by using a symmetric key algorithm.

[0088] The UFS host 2100 may sequentially store commands to be sent to the UFS device 2200 in the UFS host register 2111, which may be used as a common queue, and sequentially send the commands to the UFS device 2200. In this case, even when the previously sent command is still being processed by the UFS device 2200, that is, even before receiving a notification that the previously sent command has been processed by the UFS device 2200, the UFS host 2100 may send the next command on standby in the CQ to the UFS device 2200. Therefore, during the processing of the previously sent command, the UFS device 2200 may also receive the next command from the UFS host 2100. The maximum number of commands (or queue depth) that can be stored in the CQ may be, for example, 32. Also, the CQ may be implemented as a circular queue in which the start and end of the command line stored in the queue are indicated by a head pointer and a tail pointer.

[0089] Each of the plurality of storage elements 2221 may include a storage cell array and a control circuit configured to control the operation of the storage cell array. The storage cell array may include a 2D storage cell array or a 3D storage cell array. The storage cell array may include a plurality of storage cells. Although each storage cell is a single-layer cell (SLC) configured to store 1 bit of information, each storage cell may be a cell configured to store 2 or more bits of information, such as a multi-layer cell (MLC), a triple-layer cell (TLC), and a quad-layer cell (QLC). The 3D storage cell array may include a vertical NAND string in which at least one storage cell is vertically oriented and located on another storage cell.

[0090] Voltages VCC, VCCQ, and VCCQ2, etc., may be applied to the UFS device 2200 as power supply voltages. The voltage VCC may be a main power supply voltage for the UFS device 2200, and may be in the range of 2.4V to 3.6V. The voltage VCCQ may be a power supply voltage mainly used to supply a low voltage to the UFS device controller 2210, and may be in the range of 1.14V to 1.26V. The voltage VCCQ2 may be a power supply voltage mainly used to supply a voltage lower than the voltage VCC and higher than the voltage VCCQ to an I / O interface such as the MIPI M-PHY 2251, and may be in the range of 1.7V to 1.95V. The power supply voltage may be provided to the various components of the UFS device 2200 by the regulator 2260. The regulator 2260 may be implemented as a group of unit regulators, which are respectively connected to different power supply voltages among the above-mentioned power supply voltages.

[0091] Figure 6 Another example of a UFS system according to an example embodiment of the present disclosure is shown.

[0092] Reference Figure 6, UFS devices can use high-speed, high-cost single-level cell (SLC) NAND as a turbo write buffer to accelerate its write performance. In addition, UFS devices can use low-speed, low-cost triple-level cell / quadruple-level cell (TLC / SLC) NAND as a normal storage area to increase the storage capacity of UFS.

[0093] UFS devices can have the Turbo write 2.0 feature. The Turbo write 2.0 feature not only supports the host to write data directly to the Turbo write buffer, but also supports writing data directly to the normal storage area. Figure 6 In Turbo write mode, the host can write data (e.g., data A to F) to the Turbo write buffer. In normal mode, the host can write data to the normal storage area composed of TLC / QLC NAND flash memory.

[0094] In addition, the Turbo write 2.0 feature also supports a partial flush function. When the partial flush function is enabled, if the Turbo write buffer is full, the UFS device can flush part of the data (e.g., data A to C) in the Turbo write buffer to the normal storage area. The UFS device can flush data to the normal storage area in a first-in, first-out (FIFO) manner.

[0095] According to the locality principle, the data recently written into the Turbo write buffer is likely to be accessed again. Therefore, the FIFO strategy can keep the recently written data in the Turbo write buffer, thereby improving the access speed of the data.

[0096] Figure 7 A method of reducing the latency of an application according to an example embodiment of the present disclosure is shown.

[0097] Reference Figure 7 In operation S100, an application running in the foreground may be detected to obtain an input / output (IO) throughput of the foreground application. For example, a process list of the foreground application may be obtained, and the IO throughput of the foreground application may be counted based on the process list.

[0098] In operation S200, the state of the mobile device may be determined based on the IO throughput of the foreground application. For example, the state of the mobile device may include an idle state and a busy state. The busy / idle state of the mobile device may be determined based on a comparison of the IO throughput of the foreground application with a predetermined threshold.

[0099] In operation S300, a manner of transmitting a discard command to a storage device of the mobile device may be determined based on a state of the mobile device.

[0100] Figure 8 A method of reducing the latency of an application according to an example embodiment of the present disclosure is shown. Figure 8 Operations S100, S200 and S300 in Figure 7 Operations S100, S200 and S300 are the same, and for the sake of brevity, repeated descriptions will be omitted.

[0101] Reference Figure 8 , before operation S300, it may be determined in operation S210 whether the garbage collection mode obtained from the file system is the highest priority.

[0102] For example, the garbage collection mode may include "urgent_high", "urgent_middle" or "urgent_low". The garbage collection mode of urgent_high may indicate that the internal space of F2FS is insufficient and the garbage collection operation needs to be triggered as soon as possible. Therefore, the garbage collection mode of urgent_high may have the highest priority. The garbage collection mode of urgent_middle indicates that F2FS needs to perform garbage collection to reclaim the internal space, while the garbage collection mode of urgent_low indicates that the necessity for F2FS to perform garbage collection is not high. Therefore, the priority of the garbage collection mode may be: urgent_high is higher than urgent_middle, and urgent_middle is higher than urgent_low.

[0103] The above description of the garbage collection mode is only an example, and the present disclosure is not limited thereto. The priority of the garbage collection mode can be set according to system or user requirements.

[0104] In operation S210, when it is determined that the garbage collection mode is the highest priority, a discard command may be sent to the storage device at a coarse granularity regardless of the busy / idle state of the mobile device. In operation S210, when it is determined that the garbage collection mode is not the highest priority, operation S300 may be performed.

[0105] although Figure 8 Various operations are shown, but the order of operations is not necessarily limited to Figure 8 For example, operation S210 may be performed in parallel with operation S100 and / or S200.

[0106] Fig. 9 A process of sending a discard command according to an exemplary embodiment of the present disclosure is shown. Fig. 9 The operations in can correspond to Figure 8Operations S210 and S300 in .

[0107] Reference Fig. 9 In operation S211, when it is determined that the priority of the garbage collection mode is the highest priority (eg, urgent_high), a discard command may be sent to the storage device at a coarse granularity in operation S212 regardless of the busy / idle state of the mobile device.

[0108] In operation S211, when it is determined that the priority of the garbage collection mode is not the highest priority, it may be determined in operation S310 whether the mobile device is in an idle state.

[0109] According to an example embodiment, whether the mobile device is in an idle state or a busy state may be determined based on the IO throughput of the foreground application of the mobile device. According to an example embodiment, the IO throughput of the foreground application may be compared with a predetermined threshold. When the IO throughput of the foreground application is greater than the predetermined threshold, it may be determined that the mobile device is in a busy state. When the IO throughput of the foreground application is less than or equal to the predetermined threshold, it may be determined that the mobile device is in an idle state. However, the present disclosure is not limited thereto, and other methods may also be used to determine whether the mobile device is in an idle state or a busy state.

[0110] In response to the mobile device being busy (or based on an indication that the mobile device is busy) (i.e., "No" in S310), a discard command is not sent to the storage device. Not sending a discard command when the IO throughput of the foreground application of the mobile device is high can minimize the negative impact of the UFS device processing the discard command on the response time of the application.

[0111] In response to the mobile device being in an idle state (or based on an indication that the mobile device is in an idle state) (i.e., "yes" in S310), branch S320 or S330 may be executed based on the result of determining the priority of the garbage collection mode in operation S211. For example, in operation S211, when it is determined that the priority of the garbage collection mode is the first priority (e.g., urgent-low) lower than the highest priority, a discard command may be sent to the storage device in fine granularity in operation S340. This is because when the garbage collection mode of F2FS is urgent_low, it indicates that the necessity of performing garbage collection and / or sending a discard command is low. Sending a discard command in fine granularity at this time can enable the UFS to process the discard command in advance and reduce the occurrence of ANR problems, and will not have a significant impact on the operation of the foreground application.

[0112] The number of discard commands sent in the fine-grained mode may be less than the number of discard commands sent in the coarse-grained mode. For example, in the coarse-grained mode, a maximum of 512 discard commands may be sent at a time; in the fine-grained mode, a maximum of 32 discard commands may be sent at a time. However, this is only an example, and the present disclosure is not limited thereto. The number of discard commands sent in the coarse-grained mode and the fine-grained mode may be set differently as needed.

[0113] In operation S211, when it is determined that the priority of the garbage collection mode is the second priority (e.g., urgent_middle) lower than the highest priority, a method of sending a discard command may be further determined based on usage information of the storage device in operation S350. For example, a method of sending a discard command may be determined based on a fill rate of the UFS.

[0114] In operation S350 , when it is determined that the filling rate of the UFS is lower than a predetermined threshold, a discard command may be sent to the UFS with a coarse granularity in operation S360 .

[0115] In operation S350, when it is determined that the filling rate of the UFS is not lower than the predetermined threshold, it indicates that the probability of the UFS triggering garbage collection is high. At this time, if a discard command is sent at a coarse granularity, the application response time will be too long. Therefore, operation S340 may be performed to send a discard command to the UFS at a fine granularity.

[0116] According to further example embodiments of the present disclosure, operations S330 , S350 , and S360 may be omitted.

[0117] According to an example embodiment of the present disclosure, a method for reducing application latency may determine a manner of sending a discard command based on the priority of the garbage collection mode, the state of the mobile device, and usage information of the storage device, thereby taking into account both reducing the response time of the application (especially the response time of the foreground application) and reducing ANR, improving the performance of the mobile device, and improving the user experience.

[0118] Fig.10 A diagram showing a system for reducing the latency of an application according to an exemplary embodiment of the present disclosure. The system for reducing the latency of an application according to an exemplary embodiment may be run in a mobile device in the form of software, or may correspond to software in a mobile device.

[0119] Reference Fig.10 , the system for reducing the delay of the application may include: a detector, a status monitor and a discard command manager. In some embodiments, at least one processor of the mobile device may be configured to implement the detector, the status monitor and the discard command manager

[0120] As shown in the figure, the embodiment can be described and illustrated according to the block of the function described. These blocks (which may be referred to as detectors, state monitors, discard command managers, etc.) can be physically implemented by analog and / or digital circuits including one or more of logic gates, integrated circuits, microprocessors, microcontrollers, memory circuits, passive electronic components, active electronic components, optical components, etc., and can also be implemented or driven by software and / or firmware (configured to perform functions or operations described herein). For example, the circuit can be implemented in one or more semiconductor chips, or implemented on substrate supports such as printed circuit boards. The circuit included in the block can be implemented by dedicated hardware, or by a processor (for example, one or more programmed microprocessors and related circuits), or by a combination of dedicated hardware that performs some functions of the block and a processor that performs other functions of the block. Each block of the embodiment can be physically divided into two or more interactive and discrete blocks. Similarly, the block of the embodiment can be physically combined into more complex blocks.

[0121] The detector can detect the application running in the foreground, query the process list of the foreground application, and send the process list to the status monitor.

[0122] For example, the detector can detect the following application events: the application is loaded into the foreground, the background application is switched to the foreground, the foreground application is killed or removed, etc. Each application can be assigned a unique user identifier UID. The detector can query the process list of the foreground application through the UID. The detector can send commands to add / remove processes to the status monitor through the proc file system.

[0123] The state monitor may receive a process list of the foreground application from the detector, and perform statistics on the IO throughput of the foreground application, thereby determining the state of the mobile device (e.g., busy state or idle state). The state monitor may compare the IO throughput of the foreground application with a predetermined threshold. When the IO throughput of the foreground application exceeds the predetermined threshold, the state of the mobile device may be determined to be busy. When the IO throughput of the foreground application does not exceed the predetermined threshold, the state of the mobile device may be determined to be idle. The state monitor may periodically send the busy / idle state of the mobile device to the discard command manager.

[0124] The discard command manager may obtain a garbage collection mode from a file system, determine a priority of the garbage collection mode, and determine a manner of sending a discard command to a storage device based on the determined priority.

[0125] In addition, the discard command manager may receive the busy / idle status of the mobile device from the status monitor and periodically query the storage device for usage information of the storage device. For example, the discard command manager may obtain the fill rate of the UFS from the UFS.

[0126] When the garbage collection mode of F2FS is urgent_high, the discard command manager immediately sends the discard command at a coarse granularity. In addition, the discard command manager sends the discard command only when the mobile device is idle (i.e., the IO throughput of the foreground application is less than a predetermined threshold). Therefore, the impact of sending the discard command on the foreground application IO can be avoided, and the ANR problem caused by the accumulation of a large number of discard commands can be reduced.

[0127] When the mobile device is in idle state and the garbage collection mode of F2FS is urgent_low, the discard command manager can send discard commands with fine granularity.

[0128] When the mobile device is in an idle state and the garbage collection mode of F2FS is urgent_middle, the discard command manager also determines the way to send the discard command based on the fill rate of UFS. For example, when the fill rate of UFS is lower than a predetermined threshold, the discard command manager can send the discard command in a coarse granularity. For example, when the fill rate of UFS is not lower than a predetermined threshold, the discard command manager can send the discard command in a fine granularity.

[0129] Fig.11 The operation of the detector and the state monitor according to an example embodiment of the present disclosure is shown.

[0130] Reference Fig.11 , application App1 is switched from the background to the foreground, and application App8 is removed from the foreground. The detector may query the processes included in applications App1 and App8. Fig.11 In the example, application App1 includes processes 11 and 12 (process IDs (PIDs) are 11 and 12), and the IO throughputs of processes 11 and 12 are yy and zz respectively; application App5 includes process 51, and the IO throughput of process 51 is xx; application App8 includes processes 82 and 83. The detector may send commands to add processes (11, 12) of application App1 and remove processes (82, 83) of application App8 to the status monitor, respectively.

[0131] The status monitor can maintain a foreground IO monitoring table. The information included in the foreground IO monitoring table may include: the current foreground application name, the process PID included in the foreground application, and the IO throughput of the process. When receiving a command to add a process or remove a process from the detector, the status monitor can add the relevant process to the foreground IO monitoring table, or remove the relevant process from the foreground IO monitoring table. Fig.10 As shown in , currently only applications App1 and App5 are running in the foreground. The status monitor may monitor the IO throughput of three processes (ie, processes 11, 12, and 51) included in the applications App1 and App5.

[0132] When the IO throughput (e.g., the sum of throughputs) of the foreground application exceeds a predetermined threshold, the mobile device may be determined to be in a busy state. When the IO throughput of the foreground application does not exceed a predetermined threshold, the mobile device may be determined to be in an idle state. The state monitor may periodically (e.g., every 60 seconds) send the busy / idle state of the mobile device to the discard command manager.

[0133] Return to reference Fig.10 The status monitor can also distinguish the write requests of the foreground application from the write requests of the background application according to the process list of the foreground application. The status monitor can dispatch the write requests of the foreground application to the Turbo write buffer of the UFS, and dispatch other write requests (for example, the write requests of the background application) to the ordinary storage area of ​​the UFS. In this way, the access speed of the foreground application can be improved and the response time of the foreground application can be reduced through the high-speed, low-latency Turbo write buffer.

[0134] Fig.12 Shows the response time of the foreground application.

[0135] Fig.12 The left side of FIG. 1 shows an example of the delay of the foreground application in the existing delay control scheme. Fig.11 The right side of shows an example of the latency of a foreground application in a latency reduction scheme according to an exemplary embodiment of the present disclosure.

[0136] In the existing latency control solution, since UFS needs to process a large number of discard commands, it will cause the application response time to be too long and cause the ANR problem.

[0137] According to an example embodiment of the present disclosure, a method for reducing application latency may send a discard command when the IO of the foreground application is idle (i.e., the IO throughput of the foreground application is lower than a predetermined threshold), thereby avoiding the long-tail response latency of the foreground application caused by the centralized processing of a large number of discard commands by processing the discard command in advance. In addition, by determining the granularity of sending the discard command according to the priority of the garbage collection mode and the utilization rate of the storage device, it is possible to avoid sending a large number of discard commands when the garbage collection operation of the UFS is easily triggered, thereby improving the user experience by taking into account both reducing ANR and reducing the response time of the application.

[0138] Fig.13 A system 1000 to which a storage device is applied according to an embodiment is shown.

[0139] Fig.13 The system 1000 may basically be a mobile system, such as a portable communication terminal (e.g., a mobile phone), a smart phone, a tablet personal computer (PC), a wearable device, a healthcare device, or an Internet of Things (IOT) device. However, Fig.13 The system 1000 is not necessarily limited to a mobile system, and may be a PC, a laptop, a server, a media player, or an automotive device (eg, a navigation device).

[0140] Reference Fig.13 , the system 1000 may include a main processor 1100, a memory (e.g., 1200a and 1200b), and a storage device (e.g., 1300a and 1300b). In addition, the system 1000 may include at least one of an image capture device 1410, a user input device 1420, a sensor 1430, a communication device 1440, a display 1450, a speaker 1460, a power supply device 1470, and a connection interface 1480.

[0141] The main processor 1100 may control all operations of the system 1000, and more specifically, may control operations of other components included in the system 1000. The main processor 1100 may be implemented as a general-purpose processor, a dedicated processor, an application processor, or the like.

[0142] The main processor 1100 may correspond to at least one processor. The main processor 1100 may include at least one central processing unit (CPU) core 1110, and also include a controller 1120 for controlling memories 1200a and 1200b and / or storage devices 1300a and 1300b. In some embodiments, the main processor 1100 may further include an accelerator 1130, which is a dedicated circuit for high-speed data operations such as artificial intelligence (AI) data operations. The accelerator 1130 may include a graphics processing unit (GPU), a neural processing unit (NPU), and / or a data processing unit (DPU), etc., and is implemented as a chip physically separated from other components of the main processor 1100.

[0143] The memories 1200a and 1200b may be used as main storage devices of the system 1000. Although the memories 1200a and 1200b may respectively include volatile memories, such as static random access memory (SRAM) and / or dynamic random access memory (DRAM), etc., the memories 1200a and 1200b may respectively include non-volatile memories, such as flash memory, phase change random access memory (PRAM) and / or resistive random access memory (RRAM), etc. The memories 1200a and 1200b may be implemented in the same package as the main processor 1100.

[0144] The storage devices 1300a and 1300b may be used as non-volatile storage devices, which are configured to store data regardless of whether they are powered on and have a larger storage capacity than the memories 1200a and 1200b. The storage devices 1300a and 1300b may include memory controllers (STRG CTRL) 1310a and 1310b and non-volatile memories (NVM) 1320a and 1320b, respectively, which are configured to store data via the control of the memory controllers 1310a and 1310b. Although the NVMs 1320a and 1320b may include V-NAND flash memories having a two-dimensional (2D) or three-dimensional (3D) structure, the NVMs 1320a and 1320b may include other types of NVMs, such as PRAM and / or RRAM, etc.

[0145] The storage devices 1300a and 1300b may be physically separated from the main processor 1100 and included in the system 1000, or may be implemented in the same package as the main processor 1100. In addition, the storage devices 1300a and 1300b may have a type of solid-state devices (SSDs) or memory cards, and may be removably combined with other components of the system 100 through an interface such as a connection interface 1480 to be described later. The storage devices 1300a and 1300b may be devices to which a standard protocol such as Universal Flash Storage (UFS), Embedded Multimedia Card (eMMC), or NVMe is applied, but are not limited thereto.

[0146] The image capture device 1410 can capture still images or moving images. The image capture device 1410 may include a camera, a camcorder, and / or a webcam, etc.

[0147] The user input device 1420 may receive various types of data input by a user of the system 1000 and includes a touch pad, a keypad, a keyboard, a mouse, a microphone, and the like.

[0148] The sensor 1430 may detect various types of physical quantities that may be obtained from the outside of the system 1000 and convert the detected physical quantities into electrical signals. The sensor 1430 may include a temperature sensor, a pressure sensor, an illumination sensor, a position sensor, an acceleration sensor, a biosensor, and / or a gyro sensor, etc.

[0149] The communication device 1440 may transmit and receive signals between other devices outside the system 1000 according to various communication protocols. The communication device 1440 may include an antenna, a transceiver, a modem, or the like.

[0150] Display 1450 and speaker 1460 may be used as output devices configured to output visual information and auditory information, respectively, to a user of system 1000 .

[0151] The power supply device 1470 may appropriately convert power supplied from a battery embedded in the system 1000 and / or an external power source, and supply the converted power to each component of the system 1000 .

[0152] The connection interface 1480 may provide a connection between the system 1000 and an external device that is connected to the system 1000 and is capable of transmitting and receiving data to and from the system 1000. The connection interface 1480 may be implemented by using various interface schemes, for example, Advanced Technology Attachment (ATA), Serial ATA (SATA), External Serial ATA (e-SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), Peripheral Component Interconnect (PCI), PCI express (PCIe), NVMe, IEEE 1394, Universal Serial Bus (USB) interface, Secure Digital (SD) card interface, Multimedia Card (MMC) interface, Embedded Multimedia Card (eMMC) interface, UFS interface, Embedded UFS (eUFS) interface, Compact Flash (CF) card interface, and the like.

[0153] The devices, units, modules and other components described herein are implemented by hardware components. Examples of hardware components that can be used to perform the operations described in this application include, where appropriate, controllers, sensors, generators, drivers, memories, comparators, arithmetic logic units, adders, subtractors, multipliers, dividers, integrators, and any other electronic components configured to perform the operations described in this application. In other examples, one or more hardware components in the hardware components that perform the operations described in this application are implemented by computing hardware (e.g., by one or more processors or computers). A processor or computer may be implemented by one or more processing elements (such as logic gate arrays, controllers and arithmetic logic units, digital signal processors, microcomputers, programmable logic controllers, field programmable gate arrays, programmable logic arrays, microprocessors, or any other device or combination of devices configured to respond and execute instructions in a limited manner to achieve the desired result). In one example, a processor or computer includes or is connected to one or more memories storing instructions or software executed by a processor or computer. The hardware components implemented by a processor or computer may execute instructions or software (such as an operating system (OS) and one or more software applications running on the OS) for performing the operations described in this application. Hardware components can also access, manipulate, process, create and store data in response to the execution of instructions or software. For simplicity, the singular term "processor" or "computer" can be used in the description of the examples described in this application, but in other examples, multiple processors or computers can be used, or processors or computers can include multiple processing elements, or multiple types of processing elements, or both. For example, a single hardware component, or two or more hardware components can be implemented by a single processor, or two or more processors, or a processor and a controller. One or more hardware components can be implemented by one or more processors, or a processor and a controller, and one or more other hardware components can be implemented by one or more other processors, or another processor and another controller. One or more processors, or a processor and a controller can implement a single hardware component, or two or more hardware components. Hardware components can have any one or more of different processing configurations, and examples of different processing configurations include: a single processor, an independent processor, a parallel processor, a single instruction single data (SISD) multiprocessing, a single instruction multiple data (SIMD) multiprocessing, multiple instructions single data (MISD) multiprocessing, and multiple instructions multiple data (MIMD) multiprocessing.

[0154] The method for performing the operations described in this application is performed by computing hardware (e.g., by one or more processors or computers), which is implemented as executing instructions or software as described above to perform the operations performed by the method described in this application. For example, a single operation, or two or more operations may be performed by a single processor, or two or more processors, or a processor and a controller. One or more operations may be performed by one or more processors, or a processor and a controller, and one or more other operations may be performed by one or more other processors, or another processor and another controller. One or more processors, or a processor and a controller may perform a single operation, or two or more operations.

[0155] Instructions or software for controlling a processor or computer to implement hardware components and perform methods as described above may be written as computer programs, code segments, instructions, or any combination thereof to individually or collectively instruct or configure a processor or computer to operate as a machine or special-purpose computer to perform operations performed by hardware components and methods as described above. In one example, instructions and / or software include machine code (such as machine code generated by a compiler) directly executed by a processor or computer. In another example, instructions or software include high-level code executed by a processor or computer using an interpreter. A person of ordinary skill in the art or a programmer may easily write instructions and / or software based on the block diagrams and flow charts shown in the accompanying drawings and the corresponding descriptions in the specification, and the block diagrams and flow charts shown in the accompanying drawings and the corresponding descriptions in the specification disclose algorithms for performing operations performed by hardware components and methods as described above.

[0156] The instructions or software for controlling a processor or computer to implement the hardware components and perform the methods described above, and any associated data, data files, and data structures are recorded, stored, or fixed in or on one or more non-transitory computer-readable storage media. Examples of non-transitory computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R At least one of LTH, BD-RE, Blu-ray or optical disk storage device, hard disk drive (HDD), solid state drive (SSD), flash memory, card memory (such as, multimedia card or micro card (for example, Secure Digital (SD) or Extreme Digital (XD))), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store instructions or software and any associated data, data files and data structures in a non-temporary manner and provide the instructions or software and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the instructions.

[0157] Although various example embodiments have been described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the claims.

Claims

1. A method for reducing the latency of an application of a mobile device, the method include: Detecting at least one foreground application and obtaining an input / output (I / O) throughput of the at least one foreground application; determining a state of the mobile device based on the I / O throughput of the at least one foreground application; Based on the determined state of the mobile device, a manner of sending a discard command to a storage device of the mobile device is determined.

2. The method according to claim 1, in, The state of the mobile device includes an idle state and a busy state.

3. The method according to claim 1, further comprising: include: Determines whether the garbage collection mode obtained from the file system is the highest priority, Among them, the garbage collection mode is the highest priority, and the discard command is sent to the storage device in a coarse-grained manner. Among them, the step of determining the manner of sending a discard command to the storage device of the mobile device based on the determined state of the mobile device includes: determining the manner of sending a discard command to the storage device of the mobile device based on the determined state of the mobile device and based on the garbage collection mode not being the highest priority.

4. The method according to claim 3, in, The step of determining a manner of sending a discard command to a storage device of a mobile device comprises: Based on the mobile device being in a busy state, not sending a discard command to the storage device, Based on the mobile device being in an idle state and the determined priority being a first priority level lower than a highest priority level, a discard command is sent to the storage device in a fine granularity.

5. The method according to claim 4, in, Based on the mobile device being in an idle state and the determined priority being a second priority lower than the highest priority, determining a manner of sending a discard command to the storage device based on usage information of the storage device, Among them, the second priority is higher than the first priority.

6. The method according to claim 5, in, The usage information of the storage device includes the filling rate of the storage device, When the filling rate of the storage device is lower than the first threshold, a discard command is sent to the storage device in a coarse-grained manner. When the filling rate of the storage device is not lower than a first threshold, a discard command is sent to the storage device in fine granularity.

7. The method according to claim 2, in, The step of determining the state of the mobile device comprises: comparing the I / O throughput of the at least one foreground application with a second threshold; When the I / O throughput of the at least one foreground application is greater than a second threshold, determining that the mobile device is in a busy state; When the I / O throughput of the at least one foreground application is less than or equal to a second threshold, it is determined that the mobile device is in an idle state.

8. The method according to any one of claims 1 to 7, in, The storage device comprises a first storage area and a second storage area, The first storage area includes a turbo write buffer including a single-layer unit, and the second storage area includes a memory including a multi-layer unit. The method further includes: writing the data of the at least one foreground application into a Turbowrite buffer of the first storage area, and writing the data of the background application into the second storage area.

9. A mobile device, comprising at least one processor, wherein the at least one processor is configured to implement: The detector is configured to: detect at least one foreground application and obtain a process list of the at least one foreground application; The status monitor is configured as: Based on the process list of the at least one foreground application, obtaining the input / output I / O throughput of the at least one foreground application, determining a state of the mobile device based on the I / O throughput of the at least one foreground application; The discard command manager is configured to determine a manner of sending a discard command to a storage device of the mobile device based on the determined state of the mobile device.

10. An electronic device, include: at least one processor; as well as A storage device, comprising one or more memories, wherein the one or more memories are configured to store instructions, and when the instructions are executed by the at least one processor, the at least one processor performs the following processing: Detecting at least one foreground application and obtaining an input / output (I / O) throughput of the at least one foreground application; determining a state of the mobile device based on the I / O throughput of the at least one foreground application; Based on the determined state of the mobile device, a manner of sending a discard command to a storage device of the mobile device is determined.