CN116097682A - Method and device for responding to user access request and storage device - Google Patents

Method and device for responding to user access request and storage device Download PDF

Info

Publication number
CN116097682A
CN116097682A CN202080104380.7A CN202080104380A CN116097682A CN 116097682 A CN116097682 A CN 116097682A CN 202080104380 A CN202080104380 A CN 202080104380A CN 116097682 A CN116097682 A CN 116097682A
Authority
CN
China
Prior art keywords
access request
storage device
access requests
access
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080104380.7A
Other languages
Chinese (zh)
Other versions
CN116097682A8 (en
Inventor
裘来彬
刘光辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN116097682A publication Critical patent/CN116097682A/en
Publication of CN116097682A8 publication Critical patent/CN116097682A8/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a method, a device and storage equipment for responding to a user access request, relates to the technical field of computers, solves the problem of slow blocking caused by the blocking of a key access request in the prior art, and improves user experience. The specific scheme is as follows: the storage device receives a plurality of access requests from the processor; the plurality of access requests comprise key access requests, wherein the key access requests are access requests which cause a User Interface (UI) thread to wait synchronously, the key access requests comprise first identifiers, the access requests except the key access requests in the plurality of access requests comprise second identifiers, and the priority of the first identifiers is higher than that of the second identifiers; the storage device preferentially responds to the critical access request based on the first identification.

Description

Method and device for responding to user access request and storage device Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, and a storage device for responding to a user access request.
Background
The storage device in the terminal equipment is a single-threaded system with a queue, and can acquire and process the access requests from the queue according to the issuing sequence of the access requests. When the number of access requests in the queue is excessive, important access requests, even if already queued, will be processed after the completion of the previous request processing because of queue blocking needs to be ordered. If the important request is blocked to cause excessive response delay, the critical process is caused to wait synchronously, so that the user experience is affected.
In order to solve the problem that the user experience is affected by the synchronous waiting of a key process, the prior art proposes a method for responding to a user request, wherein the method enables the access request carrying the CP identifier to be processed preferentially on a storage device side by carrying the Command Priority (CP) identifier in the access request issued by a foreground application. However, in this scheme, the access request is divided into an access request carrying the CP identifier and an access request not carrying the CP identifier, and the two-stage priority cannot be used for scheduling under the complex multi-task framework, which may cause that a critical process is blocked, resulting in poor user experience.
Disclosure of Invention
The embodiment of the application provides a method, a device and storage equipment for responding to a user access request, which can solve the problem of slow blocking caused by blocking of a key access request and improve user experience.
In order to achieve the above purpose, the embodiment of the application adopts the following technical scheme:
in a first aspect of embodiments of the present application, there is provided a method for responding to a user access request, the method including: the storage device receives a plurality of access requests from a foreground application; the plurality of access requests comprise key access requests, wherein the key access requests are access requests which lead a User Interface (UI) thread to wait synchronously, the key access requests comprise first identifiers, the access requests except the key access requests comprise second identifiers, and the priority of the first identifiers is higher than that of the second identifiers; the storage device responds preferentially to the critical access request based on the first identification. Based on the scheme, the priorities of the access requests received by the storage device from the foreground application are different, wherein the priority of the key access request is higher than the priority of other access requests, and the storage device can process the key access request sent by the foreground application preferentially by identifying the first identifier. Alternatively, among the plurality of access requests sent by the foreground application, the access request other than the critical access request may be referred to as a non-critical access request, where the non-critical access request may be an access request that does not cause the UI thread to wait synchronously. Alternatively, the critical access request may be a request issued by a UI thread or a request issued by a non-UI thread, but causing the UI thread to wait synchronously. It can be understood that the multiple access requests received by the storage device from the foreground application in the scheme have different priorities, and the priority of the key access requests is higher, so that the storage device can process the key access requests preferentially, the problem that the key access requests sent by the foreground application are blocked by the non-key access requests sent by the foreground application is solved, and the user experience is improved.
Alternatively, the plurality of access requests received by the storage device from the foreground application may be access requests processed by the processor. For example, the processor sends a critical access request to which a first identification has been added and a non-critical access request to which a second identification has been added to the storage device by identifying a critical access request from among a plurality of access requests sent by a foreground application and adding the first identification to the critical access request and adding the second identification to the non-critical access request.
With reference to the first aspect, in one possible implementation manner, the preferentially responding, by the storage device, to the critical access request based on the first identifier includes: and if the storage device determines that the priority of the access request which is being processed by the storage device is lower than the priority of the key access request based on the first identification, the storage device determines that other operations except the operation for ensuring the normal operation of the storage device in the access request which is being processed are not processed, and responds to the key access request. According to the scheme, under the condition that the priority of the access request which is being processed by the storage device is lower than that of the key access request, the storage device only processes the operation which guarantees the normal operation of the storage device in the access request which is being processed, and does not process other operations except the operation which guarantees the normal operation of the storage device, so that the access request which is being processed currently can be processed at the fastest speed, and the synchronous waiting time of the key access request is reduced.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, the other operations in the foregoing processing access request except the operation of guaranteeing the normal operation of the storage device include: one or more of data garbage collection GC, table entry management, physical block erasure, exception handling, or large input output IO write operations. Based on the scheme, the storage device only processes the operation (such as maintaining FTL table items and the like) which can ensure the normal operation of the storage system in the processing access request, so as to ensure that the basic read-write operation is completed, and does not process the additional long time-consuming operation such as GC, table item management, exception processing and the like in the processing access request temporarily, thereby reducing the synchronous waiting time of the key access request, improving the slow clamping problem caused by the blocking of the key access request and improving the user experience.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, the critical access request is an access request corresponding to a page fault interrupt. Based on the scheme, the first identifier in the access request corresponding to the pagefault is identified through the storage device, so that the storage device can preferentially process the access request corresponding to the pagefault, and therefore the problem that the user experience is poor due to the fact that the access request corresponding to the pagefault is blocked is solved.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, the critical access request is a request issued by the UI thread. Based on the scheme, the storage device can respond to the request issued by the UI thread preferentially by identifying the first identifier in the request issued by the UI thread, so that the slow-blocking problem caused by the blocked request issued by the UI thread is solved, and the user experience is improved.
With reference to the first aspect and the foregoing possible implementation manner, in another possible implementation manner, the critical access request further includes the second identifier. Based on the scheme, the second identifiers are included in the plurality of access requests sent by the foreground application, so that the priority of the access requests sent by the foreground application is higher than that of the access requests sent by the background application, and the access requests sent by the foreground application can be processed preferentially by identifying the second identifiers, so that the problem that the access requests sent by the foreground application are blocked by the access requests sent by the background application is solved. Further, the first identifier with higher priority is included in the key access request sent by the foreground application, so that the priority of the key access request sent by the foreground application is higher than that of the non-key access request sent by the foreground application, and the key access request sent by the foreground application can be processed by the priority by identifying the first identifier, so that the problem that the key access request sent by the foreground application is blocked by the non-key access request sent by the foreground application is solved, and the user experience is improved.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, the foreground application is one or more. Based on this scheme, the number of foreground applications may be one or more, and the plurality of access requests may be from the same foreground application or from different foreground applications, which is not limited in this application.
In a second aspect of embodiments of the present application, there is provided a method for responding to a user access request, the method including: receiving a plurality of access requests from a foreground application; identifying a key access request from the plurality of access requests, adding a first identifier to the key access request, and adding a second identifier to the access requests except the key access request from the plurality of access requests; the key access request is an access request which causes the user interface UI threads to wait synchronously; the first identifier has a higher priority than the second identifier; a plurality of access requests are sent to a storage device. Based on the scheme, the first identifier with higher priority is added in the key access requests sent by the foreground application, and the second identifier with lower priority is added in the access requests except the key access requests sent by the foreground application, so that a plurality of access requests sent by the foreground application have different priorities and the priority of the key access requests is higher, thereby improving the slow blocking problem caused by the blocked key access requests and improving the user experience. It will be appreciated that, among the plurality of access requests sent by the foreground application, the access requests other than the critical access request may be referred to as non-critical access requests, which may be access requests that do not cause the UI thread to wait synchronously. Alternatively, the critical access request may be a request issued by a UI thread or a request issued by a non-UI thread, but causing the UI thread to wait synchronously. Alternatively, the execution body of the scheme may be a processor, or may be an operating system OS running on the processor.
Optionally, when the plurality of access requests are sent to the storage device, a first identifier or a second identifier is added to the plurality of access requests that are sent. That is, the processor adds a first identification to a critical access request of the plurality of access requests, and after adding a second identification to a non-critical access request, the processor sends the critical access request to which the first identification has been added and the non-critical access request to which the second identification has been added to the storage device.
With reference to the second aspect, in one possible implementation manner, the key access request is an access request corresponding to a page fault interrupt. Based on the scheme, the access requests corresponding to the pagefault in the access requests are identified, and the first identification with the absolute priority is added to the access requests, so that the access requests sent by the foreground application have different priorities, and the access requests corresponding to the pagefault have the absolute priority, and the problem of poor user experience caused by blocking of the access requests corresponding to the pagefault can be solved.
With reference to the second aspect, in one possible implementation manner, the sending, by the OS, the plurality of access requests to the storage device includes: the OS preferentially sends a key access request to the storage device based on the first identification. Based on the scheme, the priority of the first identifier added in the key access request is higher than that of the second identifier added in the non-key access request, so that the priority of the key access request is higher than that of the non-key access request, and when the access request is sent to the storage device, the key access request with higher priority can be preferentially sent to the storage device by identifying the first identifier, so that the processing speed of the key access request is improved.
With reference to the second aspect and the foregoing possible implementation manner, in another possible implementation manner, the critical access request is a request issued by the UI thread. Based on the scheme, the first identifier with higher priority is added to the request issued by the UI thread, so that the request issued by the UI thread can be processed preferentially, the problem that the request issued by the UI thread is blocked is solved, and user experience is improved.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the foregoing method further includes: and adding the second identifier to the key access request. Based on the scheme, the second identifiers are added in the plurality of access requests sent by the foreground application, so that the priority of the access requests sent by the foreground application is higher than that of the access requests sent by the background application, the access requests sent by the foreground application can be processed preferentially, and the problem that the access requests sent by the foreground application are blocked by the access requests sent by the background application is solved. Further, by identifying the key access request sent by the foreground application and adding the first identifier with higher priority in the key access request, the priority of the key access request sent by the foreground application is higher than that of the non-key access request sent by the foreground application, so that the key access request sent by the foreground application can be processed by the priority, the problem that the key access request sent by the foreground application is blocked by the non-key access request sent by the foreground application is solved, and the user experience is improved.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the foreground application is one or more. Based on this scheme, the number of foreground applications may be one or more, and the plurality of access requests may be from the same foreground application or from different foreground applications, which is not limited in this application.
In a third aspect of embodiments of the present application, there is provided a storage device including: an interface circuit for receiving a plurality of access requests from a foreground application; the plurality of access requests comprise key access requests, wherein the key access requests are access requests which cause a User Interface (UI) thread to wait synchronously, the key access requests comprise first identifiers, the access requests except the key access requests comprise second identifiers, and the priority of the first identifiers is higher than that of the second identifiers; and a storage medium for preferentially responding to the critical access request based on the first identification.
With reference to the third aspect, in one possible implementation manner, the storage medium is specifically configured to, based on the first identifier, determine that, if it is determined that a priority of an access request that is being processed by the storage medium is lower than a priority of the critical access request, the storage medium does not process operations other than an operation that guarantees normal operation of the storage device in the access request that is being processed, and respond to the critical access request.
With reference to the third aspect and the foregoing possible implementation manners, in another possible implementation manner, the other operations in the foregoing processing access request except the operation of guaranteeing the normal operation of the storage device include: one or more of data garbage collection GC, table entry management, physical block erasure, exception handling, or large input output IO write operations.
With reference to the third aspect and the foregoing possible implementation manners, in another possible implementation manner, the critical access request is an access request corresponding to a page fault interrupt.
With reference to the third aspect and the foregoing possible implementation manners, in another possible implementation manner, the critical access request is a request issued by the UI thread.
With reference to the third aspect and the foregoing possible implementation manners, in another possible implementation manner, the critical access request further includes the second identifier.
In a fourth aspect of embodiments of the present application, there is provided an apparatus for responding to a user access request, the apparatus comprising a processor and a first memory, the first memory coupled to the processor; wherein the processor is configured to receive a plurality of access requests from a foreground application; the processor is further configured to identify the critical access request from among a plurality of access requests, and add a first identifier to the critical access request, and add a second identifier to access requests other than the critical access request from among the plurality of access requests; the key access request is an access request which causes the user interface UI threads to wait synchronously; the first identifier has a higher priority than the second identifier; the processor is further configured to send the plurality of access requests to the second memory. Optionally, the first memory and the second memory in this solution are different, and the first memory is an on-chip memory device, and the first memory may be integrated with the processor in a system on chip (SoC). The second memory is an off-chip memory device, for example, a general purpose memory device (Universal Flash Storage, UFS), a Solid State Disk (SSD), a flash memory (flash memory), a hard Disk (HDD), or the like. It will be appreciated that the plurality of access requests sent by the processor to the second memory are access requests to which the first identity or the second identity has been added.
With reference to the fourth aspect, in one possible implementation manner, the key access request is an access request corresponding to a page fault interrupt.
With reference to the fourth aspect, in a possible implementation manner, the processor is specifically configured to send the critical access request to the storage device preferentially based on the first identifier.
With reference to the fourth aspect and the foregoing possible implementation manner, in another possible implementation manner, the critical access request is a request issued by the UI thread.
With reference to the fourth aspect and the foregoing possible implementation manner, in another possible implementation manner, the processor is further configured to add the second identifier to the critical access request.
The description of the effects of the third aspect and the various implementation manners of the third aspect may refer to the description of the corresponding effects of the first aspect, and the description of the effects of the fourth aspect and the various implementation manners of the fourth aspect may refer to the description of the corresponding effects of the second aspect, which are not repeated herein.
In a fifth aspect of the embodiments of the present application, the embodiments of the present application provide a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method for responding to a user access request according to any one of the first to second aspects described above.
In a sixth aspect of the embodiments of the present application, the embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of responding to a user access request according to any one of the first to second aspects described above.
A seventh aspect of embodiments of the present application provides a terminal, where the terminal includes a processor and a storage device, where the processor is configured to implement the method for responding to a user access request according to any one of the second aspect, and the storage device is configured to implement the method for responding to a user access request according to any one of the first aspect.
Drawings
Fig. 1 is a schematic structural diagram of a multi-user parallel access scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a single user access scenario provided in an embodiment of the present application;
FIG. 3 is a flowchart of a method for responding to a user access request according to an embodiment of the present application;
fig. 4 is an application schematic diagram of a method for responding to a user access request according to an embodiment of the present application;
fig. 5 is a schematic diagram of a device for responding to a user access request according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a memory device according to an embodiment of the present disclosure;
Fig. 7 is a schematic diagram of a composition of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In this application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b and c may be single or plural. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second", and the like are used to distinguish the same item or similar items having substantially the same function and effect, and those skilled in the art will understand that the terms "first", "second", and the like do not limit the number and execution order. For example, "first" in the first identifier and "second" in the second identifier in the embodiment of the present application are only used to distinguish different identifiers. The first, second, etc. descriptions in the embodiments of the present application are only used for illustrating and distinguishing the description objects, and no order division is used, nor does it indicate that the number of the devices in the embodiments of the present application is particularly limited, and no limitation on the embodiments of the present application should be construed.
In this application, the terms "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The memory device in the terminal device can acquire and process the access requests from the queue according to the issuing sequence of the access requests. When the number of access requests in the queue is excessive, important access requests, even if already queued, will be processed after the completion of the previous request processing because of queue blocking needs to be ordered. If the important request is blocked to cause excessive response delay, the critical process is caused to wait synchronously, so that the user experience is affected.
In order to solve the problem that the key process synchronously waits to influence the user experience, the access request carrying the CP identification can be processed preferentially on the storage device side by carrying the command priority CP identification in the access request issued by the foreground application. However, all requests issued by the foreground application carry CP identifiers, that is, priorities of all requests issued by the foreground application are the same, so that important requests in the requests issued by the foreground application may be blocked by unimportant requests in the requests issued by the foreground application, which results in excessive response time delay of the important requests, causes synchronous waiting of key processes, affects subjective experience of users, and results in poor user experience. In addition, the scheme only can process the access request carrying the CP mark in advance, and if the processing delay of the access request issued before the access request carrying the CP mark is too long, the access request carrying the CP mark still needs to be queued in a queue for synchronous waiting.
In order to solve the problem of poor user experience caused by blocking of a key process in the prior art, the embodiment of the application provides a method for responding to a user access request, which improves the problem of slow blocking caused by blocking of the access request in the prior art and improves the user experience.
The method for responding to the user access request provided in the embodiment of the present application may be applied to a scenario of multi-user parallel access, or may be applied to a scenario of single-user access, which is not limited in this embodiment of the present application.
For example, in a scenario of multi-user parallel access, access requests that may be sent by multiple users may be sent to a Solid State Disk (SSD) through an Operating System (OS) or a virtual machine, where the OS or the virtual machine runs on a processor. And the solid state disk receives the access requests sent by the plurality of users and responds to the access requests sent by the plurality of users. The access request sent by the user may be a read request or a write request. The OS may be an operating system such as a Windows operating system or a Linux operating system, which is not limited in this application. For example, as shown in fig. 1, user a sends a write request (W in fig. 1) to a server, which is sent to an SSD storage array through an OS or virtual machine running on a processor in the server, the SSD storage array responding to the write request. User B and user C may send read requests (R in fig. 1) to the server, which are sent to the SSD through the OS or virtual machine running on the processor, to the storage array, which responds to the read requests.
It should be noted that, when the method for responding to the user access request provided in the embodiment of the present application is applied to a scenario of parallel access of multiple users, the access request is an access request sent by a certain user among the multiple users, that is, the access requests related in the following embodiments of the present application all come from the same user.
Illustratively, in the scenario of single user access, a user may send an access request to a universal storage device (Universal Flash Storage, UFS) through an OS running on a processor. The OS may be an ios operating system, an Android (Android) operating system, or the like. For example, as shown in fig. 2, user a may send a writable request (W in fig. 2) or a read request (R in fig. 2) to the terminal, which is sent to the UFS by an android system running on a processor in the terminal, in response to the writable request or the read request.
By way of example, the embodiment of the present application is not limited to a specific scenario in which the method for responding to the user access request is applied, and the following embodiment only describes a scenario in which the method for responding to the user access request is applied to single user access.
Fig. 3 is a method for responding to a user access request according to an embodiment of the present application, where the method may include the following steps:
S301, the OS receives a plurality of access requests from a foreground application.
It will be appreciated that the OS in step S301 described above runs on the processor, i.e. a plurality of access requests from the foreground application may be received by the OS running on the processor.
The foreground application refers to an application running in the foreground of the terminal apparatus. For example, when a user sends a message using a WeChat application, the WeChat application is a foreground application.
The foreground application may be one or a plurality of foreground applications. When there are a plurality of foreground applications, the plurality of access requests may be from the same foreground application or from different foreground applications. That is, the OS may receive a plurality of access requests sent from different foreground applications, or may receive a plurality of access requests sent from the same foreground application, which is not limited in this embodiment of the present application. For example, when a user opens a web page in a WeChat application, the foreground application includes both the WeChat application and the browser application. The plurality of access requests received in this scenario may include both access requests sent by the WeChat application and access requests sent by the browser application.
The plurality of access requests may include a read request, a write request, or both a read request and a write request, which is not limited in this embodiment of the present application. The access request may also be referred to as an Input/Output (IO) request.
Illustratively, the plurality of access requests include a critical access request, which is an access request that causes a User Interface (UI) thread to wait synchronously. For example, the critical access request may be a request issued by a UI thread (UI thread). For another example, a critical access request may be issued for a non-UI thread, but may cause a UI thread to wait for a request synchronously. It can be appreciated that, since the critical access request is an access request that causes the UI thread to wait synchronously, when the critical access request is blocked, the system is slowly blocked, which affects the user experience.
Alternatively, the above access request that causes the UI thread to wait synchronously may be an access request corresponding to a page fault interrupt (pagefault). That is, the access request corresponding to the pagefault may be a critical access request.
Alternatively, the request other than the critical access request among the plurality of access requests may be referred to as a non-critical access request, which is an access request that does not cause the UI thread to wait for synchronization. That is, the plurality of access requests received by the OS may include critical access requests and non-critical access requests.
The OS in step S301 is a computer program for managing and controlling computer hardware and software resources, and is the most basic system software directly running on "bare metal", for supporting the running of other software, such as various application programs. In this embodiment of the present application, the OS may be various operating systems, for example, operating systems such as a Windows operating system, a Linux operating system, an iOS operating system, and an Android open source operating system. The embodiments of the present application are not limited to a specific type of OS, but are merely exemplary illustrations herein.
S302, the OS identifies a key access request in a plurality of access requests, adds a first identifier in the key access request, and adds a second identifier in access requests except the key access request in the plurality of access requests.
It will be appreciated that the OS in step S302 may be executed on a processor, where the processor identifies a critical access request among a plurality of access requests, and adds a first identifier to the critical access request, and adds a second identifier to access requests other than the critical access request among the plurality of access requests.
For example, the above-mentioned OS identification key access request may include: the OS identifies an access request corresponding to a page fault interrupt (pagefault), the access request being a critical access request.
Alternatively, in step S302, a File System (FS) layer may specifically identify a critical access request from a plurality of access requests sent by a foreground application, and add a first identifier to the critical access request. For example, as shown in FIG. 4, where the OS is running on a processor, critical access requests may be identified by an FS layer in the OS, and a first identification may be added to the critical access requests and a second identification may be added to the non-critical access requests.
The first identifier has a higher priority than the second identifier. For example, the first identifier is cp+, the second identifier is CP, and the priority of cp+ is higher than the priority of CP. The embodiments of the present application are not limited to specific forms of the first identifier and the second identifier, and only the first identifier is denoted by cp+ and the second identifier is denoted by CP.
Illustratively, the OS adds a first identifier in critical access requests and a second identifier in non-critical access requests, such that the priority of critical access requests is higher than the priority of non-critical access requests. For example, the first access request is a critical access request, the second access request is a non-critical access request, a cp+ identifier is added to the first access request, and a CP identifier is added to the second access request, and the priority of the cp+ is higher than that of the CP, so that the priority of the first access request is higher than that of the second access request.
It can be appreciated that, in the embodiment of the present application, by adding the first identifier to the critical access request and adding the second identifier to the non-critical access request, the priority of the critical access request is higher than that of the non-critical access request. In other words, the method of the embodiment of the application divides the plurality of access requests sent by the foreground application into different priorities, so that the key access requests in the plurality of access requests sent by the foreground application can be processed preferentially, the problem of slow blocking caused by the blocking of the key access requests is solved, and the user experience is improved.
It should be noted that, after the scheme of the embodiment of the present application is adopted, the access request may be divided into three priorities, including an access request to which a first identifier is added, an access request to which a second identifier is added, and an access request to which no identifier is added, where the priority of the access request to which the first identifier is added is higher than the priority of the access request to which the second identifier is added, and the priority of the access request to which the second identifier is added is higher than the priority of the access request to which no identifier is added. It will be appreciated that priority scheduling under complex multitasking may be interfaced through three levels of priority.
Optionally, the access request added with the first identifier and the access request added with the second identifier are access requests sent by a foreground application, and the access request not added with the identifier may be an access request sent by a background application. The background application refers to an application running in the background of the terminal device, i.e. the background application is an application which is not visible to the user but is running. For example, when the user uses the WeChat application in the foreground, the Tencel video application downloads the video in the background, the Tencel video application is the background application, and the WeChat application is the foreground application.
For example, as shown in fig. 4, the access requests sent by the user may be divided into three priorities, a critical access request sent by the foreground application, a non-critical access request sent by the foreground application, and an access request sent by the background application, respectively. The method comprises the steps that a first identifier is added in a key access request sent by a foreground application, a second identifier is added in a non-key access request sent by the foreground application, and no identifier is added in an access request sent by a background application, so that the priority of the key access request sent by the foreground application is higher than that of the non-key access request sent by the foreground application, and the priority of the non-key access request sent by the foreground application is higher than that of the access request sent by the background application.
(optional) S303, the OS adds a second identification in the critical access request.
The OS in step S303 described above may run on the processor, and add the second identifier to the critical access request by the processor.
It may be understood that, step S302 is to add a second identifier to an access request other than a key access request among a plurality of access requests sent by the foreground application, step S303 is to add a second identifier to a key access request sent by the foreground application, and as shown in step S302 and S303, the OS may add the second identifier to all access requests sent by the foreground application.
Alternatively, the OS may add the second identifier to all access requests sent by the foreground application and add the first identifier to the critical access request. For example, the OS adds a CP identifier to all access requests sent by the foreground application, and after the OS identifies a critical access request, the OS adds a cp+ identifier to the critical access request. I.e. the critical access request may include both CP identification and CP + identification.
It will be appreciated that when both the first identifier and the second identifier are included in the key access request, the priority of the key access request corresponds to the priority of the identifier with the higher priority, i.e. the priority of the key access request corresponds to the priority of the first identifier. For example, when the critical access request includes both the CP identifier and the cp+ identifier and the non-critical access request includes only the CP identifier, the priority of the critical access request is higher than that of the non-critical access request because the priority of the cp+ identifier is higher than that of the CP identifier.
The execution sequence of steps S302 and S303 is not limited in the embodiment of the present application. Optionally, the OS may add the second identifier to the multiple access requests sent by the foreground application before identifying the critical access request, and add the first identifier to the critical access request after the OS identifies the critical access request. Optionally, the OS may also add the first identifier and the second identifier to the critical access request and add the second identifier to the non-critical access request after identifying the critical access request.
S304, the OS sends a plurality of access requests to the storage device.
It will be appreciated that the OS in step S304 described above may be running on a processor, through which a plurality of access requests are sent to a storage device. Optionally, the storage device is an off-chip storage device.
The plurality of access requests sent by the OS to the storage device may include the first identifier and/or the second identifier. For example, a critical access request of a plurality of access requests sent by the OS to the storage device includes a first identifier, and a non-critical access request includes a second identifier. For another example, a critical access request of the plurality of access requests sent by the OS to the storage device includes a first identifier and a second identifier, and a non-critical access request includes a second identifier.
Illustratively, the OS sending a plurality of access requests to the storage device may include: the OS preferentially sends a critical access request to the storage device based on the first identification. For example, as shown in fig. 4, the IO scheduling layer in the OS may open a "green channel" for the key access request including the first identifier issued by the FS file system, and preferentially send the key access request, so as to ensure that the key access request can reach the storage device at the fastest speed.
The storage device may be a volatile memory (RAM), for example, a random-access memory (RAM), a non-volatile memory (non-volatile memory), a flash memory (flash memory), a hard disk (HDD), a Solid State Disk (SSD), a universal storage device (UFS), or other storage devices. Alternatively, the storage device may be a combination of the above memories.
It can be appreciated that, in the embodiment of the present application, by identifying multiple access requests sent by a foreground application, adding a first identifier to a critical access request and adding a second identifier to a non-critical access request, so that the priority of the critical access request is higher than that of the non-critical access request, when multiple access requests are sent to a storage device, the critical access request can be sent preferentially, so as to increase the processing speed of the critical access request, improve the phenomenon of slow blocking caused by blocking of the critical access request, and improve user experience.
S305, the storage device receives a plurality of access requests.
It will be appreciated that the storage device in step S305 may receive a plurality of access requests from the processor. The plurality of access requests are access requests sent by a foreground application. Alternatively, step S305 may be performed by the interface circuit in the storage device, i.e. the interface circuit in the storage device receives a plurality of access requests from the processor.
Optionally, the plurality of access requests received by the storage device in step S305 are access requests sent by the foreground application, and the access requests are already identified by the processor, and a first identifier is added to the critical access request, and a second identifier is added to the non-critical access request. That is, the plurality of access requests received by the storage device in step S305 are access requests to which the first identifier and/or the second identifier have been added.
In one implementation, a critical access request received by a storage device includes a first identifier and a non-critical access request includes a second identifier.
In another implementation, the critical access request received by the storage device includes a first identifier and a second identifier, and the non-critical access request includes the second identifier.
S306, the storage device responds to the key access request preferentially based on the first identification.
Alternatively, the step S306 may be performed by a storage medium in the storage device, that is, the storage medium preferentially responds to the critical access request based on the first identifier.
For example, the storage device may determine that the access request is a critical access request based on a first identification included in the access request and preferentially respond to the critical access request.
Optionally, the storage device preferentially responding to the critical access request may include: the storage device adjusts the access requests in the pending queue in a priority order based on the first identification. For example, the requests in the pending queue of the storage device include the request 1, the request 2 and the request 3, the request 1, the request 2 and the request 3 each include only the CP identifier, and after the storage device receives the request 4, the storage device adjusts the pending queue to the request 4, the request 1, the request 2 and the request 3 according to the cp+ identifier because the cp+ identifier is included in the request 4.
Illustratively, the storage device prioritizes responding to the critical access request based on the first identification, including: based on the first identification, if the storage device determines that the priority of the access request being processed by the storage device is lower than the priority of the key access request, the storage device determines that other operations except the operation for ensuring the normal operation of the storage device in the access request being processed are not processed, and responds to the key access request. Other operations in the processing access request than the operation of ensuring the normal operation of the storage device include: data garbage collection (Garbage Collection, GC), table entry GC, table entry management, physical block erase, exception handling, or large IO write operations. It can be understood that, on the storage device side, when the access request being processed by the storage device is a non-critical access request, the storage device processes only the operation that ensures that the storage device is operating normally, and does not process additional operations (other operations than the operation that ensures that the storage device is operating normally), so that the processing access request can be processed at the fastest speed and the critical access request can be responded, and thus the synchronization waiting time of the critical access request can be reduced.
Alternatively, the above access request with a priority lower than that of the critical access request may be an access request including only the second identifier, or may be an access request not including the first identifier and the second identifier.
For example, taking the access request being processed by the storage device as a third access request, where the third access request includes only the CP identifier as an example, after the storage device receives the critical access request including the cp+ identifier, based on the cp+ identifier, the storage device processes only operations (for example, operations of maintaining a flash translation layer (flash translation layer, FTL) table entry, etc.) in the third access request, which can ensure normal operation of the storage system, so as to ensure that the basic operations of reading and writing are completed, and does not process the additional long time-consuming operations in the third access request, such as GC, table entry management, exception handling, etc., so that the critical access request can be responded at the fastest speed, and the synchronization latency of the critical access request can be reduced.
It can be appreciated that, in the method for responding to a user access request provided in the embodiment of the present application, by adding the first identifier to the key access request sent by the foreground application, and adding the second identifier to the non-key access request sent by the foreground application, the priority of the first identifier is higher than that of the second identifier, so that the priority of the key access request sent by the foreground application is higher than that of the non-key access request, and when the storage device responds to the access request sent by the user, the storage device can respond to the key access request with higher priority preferentially, thereby improving the problem that the key access request sent by the foreground application is blocked by the non-key access request sent by the foreground application, and improving user experience. And the scheme can respond to the key access request at the fastest speed, so that the synchronous waiting time of the key access request is reduced.
The foregoing description of the solution provided by the embodiments of the present invention has been presented mainly in terms of method steps. It is understood that the computer, in order to implement the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as a combination of hardware and computer software. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the application may divide the functional modules of the computer according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present invention, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 5 shows a schematic diagram of an apparatus 500 for responding to a user access request, which may include a processor 501 and a memory 502, the memory 502 being coupled to the processor 501.
Illustratively, the processor 501 is configured to control and manage the actions of the apparatus 500 in response to a user access request, e.g., the processor 501 is configured to support the apparatus 500 in response to a user access request to perform S301-S304 in fig. 3, and/or other processes for the techniques described herein. The memory 502 is used for storing program codes and data corresponding to the execution of any of the methods provided above for responding to a user access request by the apparatus 500 for responding to a user access request. The memory 502 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, random access memory (random access memory, RAM), or the like. All relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
It will be appreciated that the memory 502 in fig. 5 is different from the memory device in fig. 3, and that the memory 502 in fig. 5 is an on-chip memory device, and that the memory 502 is coupled to the processor 501 and may be integrated with the processor 501 on a SoC. Whereas the storage device in fig. 3 is an off-chip storage device, for example, may be a memory located off-chip, such as UFS, SSD, or the like.
Fig. 6 shows a schematic structural diagram of a storage device 600, the storage device 600 comprising: interface circuit 601 and storage medium 602.
Illustratively, the interface circuit 601 may be used to support the memory device 600 to perform, for example, step S305 in fig. 3, and/or other processes for the techniques described herein. The storage medium 602 is used to perform, for example, step S306 in fig. 3, and/or other processes for the techniques described herein. All relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
Fig. 7 is a terminal provided in an embodiment of the present application, and as shown in fig. 7, the terminal may include a processor for executing S301 to S304 in fig. 3 and a storage device for executing S305 to S306 in fig. 3. The storage device is an off-chip storage device. The terminal may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) \virtual reality (VR) device, or other terminal devices, and the specific form of the terminal is not limited in the embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the method of responding to a user access request shown in fig. 3.
Embodiments of the present application also provide a computer program product which, when run on a computer, causes the computer to perform the method of responding to a user access request shown in fig. 3.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware, or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access memory (Random Access Memory, RAM), flash memory, erasable programmable read-only memory (Erasable Programmable ROM, EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disk, a removable disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. In addition, the ASIC may be located in a core network interface device. The processor and the storage medium may reside as discrete components in a core network interface device.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention in further detail, and are not to be construed as limiting the scope of the invention, but are merely intended to cover any modifications, equivalents, improvements, etc. based on the teachings of the invention.

Claims (19)

  1. A method of responding to a user access request, the method comprising:
    The storage device receives a plurality of access requests from a foreground application; the plurality of access requests comprise key access requests, wherein the key access requests are access requests which cause a User Interface (UI) thread to wait synchronously, the key access requests comprise first identifiers, the access requests except the key access requests comprise second identifiers, and the priority of the first identifiers is higher than that of the second identifiers;
    the storage device preferentially responds to the critical access request based on the first identification.
  2. The method of claim 1, wherein the storage device prioritizing the response to the critical access request based on the first identification comprises:
    and if the storage equipment determines that the priority of the access request which is being processed by the storage equipment is lower than the priority of the key access request based on the first identification, the storage equipment determines that other operations except the operation which ensures the normal operation of the storage equipment in the access request which is being processed are not processed, and responds to the key access request.
  3. The method of claim 2, wherein the operations of the processing access request other than the operation to ensure that the storage device is functioning properly include: one or more of data garbage collection GC, table entry management, physical block erasure, exception handling, or large input output IO write operations.
  4. A method according to any of claims 1-3, wherein the critical access request is an access request corresponding to a page fault interrupt.
  5. The method of any of claims 1-4, wherein the second identification is further included in the critical access request.
  6. A method of responding to a user access request, the method comprising:
    receiving a plurality of access requests from a foreground application;
    identifying a key access request from the plurality of access requests, adding a first identifier to the key access request, and adding a second identifier to the access requests except the key access request from the plurality of access requests; the key access request is an access request for causing the user interface UI threads to wait synchronously; the first identifier has a higher priority than the second identifier;
    the plurality of access requests are sent to a storage device.
  7. The method of claim 6, wherein the critical access request is an access request corresponding to a page fault interrupt.
  8. The method of claim 6 or 7, wherein the sending the plurality of access requests to the storage device comprises:
    And based on the first identification, preferentially sending the key access request to the storage device.
  9. The method according to any one of claims 6-8, further comprising:
    and adding the second identifier in the key access request.
  10. A storage device, the storage device comprising:
    an interface circuit for receiving a plurality of access requests from a foreground application; the plurality of access requests comprise key access requests, wherein the key access requests are access requests which cause a User Interface (UI) thread to wait synchronously, the key access requests comprise first identifiers, the access requests except the key access requests comprise second identifiers, and the priority of the first identifiers is higher than that of the second identifiers;
    and the storage medium is used for responding to the key access request preferentially based on the first identification.
  11. The storage device of claim 10, wherein the storage medium is specifically configured to determine, based on the first identifier, that no other operations of the processing access request than the operation that ensures normal operation of the storage device are to be processed, and to respond to the critical access request if it is determined that the priority of the access request being processed by the storage medium is lower than the priority of the critical access request.
  12. The storage device of claim 11, wherein the operations of the processing access request other than the operation to ensure that the storage device is functioning properly include: one or more of data garbage collection GC, table entry management, physical block erasure, exception handling, or large input output IO write operations.
  13. The storage device of any of claims 10-12, wherein the critical access request is an access request corresponding to a page fault interrupt.
  14. The storage device of any of claims 10-13, wherein the second identification is further included in the critical access request.
  15. An apparatus for responding to a user access request, the apparatus comprising a processor and a first memory, the first memory coupled to the processor; wherein,
    the processor is used for receiving a plurality of access requests from a foreground application;
    the processor is further configured to identify a key access request from the plurality of access requests, add a first identifier to the key access request, and add a second identifier to access requests other than the key access request from the plurality of access requests; the key access request is an access request for causing the user interface UI threads to wait synchronously; the first identifier has a higher priority than the second identifier;
    The processor is further configured to send the plurality of access requests to a second memory.
  16. The apparatus of claim 15, wherein the critical access request is an access request corresponding to a page fault interrupt.
  17. The apparatus according to claim 15 or 16, wherein the processor is configured to preferentially send the critical access request to the storage device based on the first identification.
  18. The apparatus of any of claims 15-17, wherein the processor is further configured to add the second identification to the critical access request.
  19. A terminal comprising a processor for performing the method of responding to a user access request according to any of claims 6-9 and a storage device for performing the method of responding to a user access request according to any of claims 1-5.
CN202080104380.7A 2020-09-29 2020-09-29 Method and device for responding to user access request and storage device Pending CN116097682A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/119023 WO2022067564A1 (en) 2020-09-29 2020-09-29 Method and apparatus for responding to user access request, and storage device

Publications (2)

Publication Number Publication Date
CN116097682A true CN116097682A (en) 2023-05-09
CN116097682A8 CN116097682A8 (en) 2023-07-21

Family

ID=80949387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080104380.7A Pending CN116097682A (en) 2020-09-29 2020-09-29 Method and device for responding to user access request and storage device

Country Status (2)

Country Link
CN (1) CN116097682A (en)
WO (1) WO2022067564A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636077B (en) * 2013-11-15 2017-10-10 中国电信股份有限公司 Network control techology storage system and method for virtual machine
CN103984655A (en) * 2014-04-29 2014-08-13 三星半导体(中国)研究开发有限公司 Processing method and processing device for data access
CN105550037B (en) * 2015-12-11 2019-07-12 北京元心科技有限公司 Method and device for allocating audio resources in multiple systems
CN105744504A (en) * 2016-03-31 2016-07-06 中国联合网络通信集团有限公司 Communication method of terminal and card applications and terminal
CN113253933B (en) * 2017-04-17 2024-02-09 伊姆西Ip控股有限责任公司 Method, apparatus, and computer readable storage medium for managing a storage system
US11238203B2 (en) * 2017-06-30 2022-02-01 Intel Corporation Systems and methods for accessing storage-as-memory

Also Published As

Publication number Publication date
WO2022067564A1 (en) 2022-04-07
CN116097682A8 (en) 2023-07-21

Similar Documents

Publication Publication Date Title
US20190220418A1 (en) Memory Management Method and Apparatus
US20180173620A1 (en) Data erasure method for solid state drive, and apparatus
EP2529308B1 (en) A system and method for read-while-write with nand memory device
AU2014311463A1 (en) Virtual machine monitor configured to support latency sensitive virtual machines
US10261918B2 (en) Process running method and apparatus
KR20040032199A (en) Method for storing data in non-volatile memory and apparatus therefor
US11360884B2 (en) Reserved memory in memory management system
US20110219373A1 (en) Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform
EP2375324A2 (en) Virtualization apparatus for providing a transactional input/output interface
CN114168271B (en) Task scheduling method, electronic device and storage medium
US11010094B2 (en) Task management method and host for electronic storage device
KR101904955B1 (en) A method and an apparatus allocating for computing resources in the touch based mobile device
CN100530111C (en) Multi-thread access indirect register scheduling method
WO2021238702A1 (en) Task scheduling method, computing device and storage medium
WO2023179388A1 (en) Hot migration method for virtual machine instance
CN112612623A (en) Method and equipment for managing shared memory
CN112306669A (en) Task processing method and device based on multi-core system
CN114281484A (en) Data transmission method, device, equipment and storage medium
CN102750493B (en) Access right control method, Apparatus and system
US20160224358A1 (en) Method and system for performing on-demand data write through based on virtual machine types
CN111258932A (en) Method for accelerating UFS protocol processing and storage controller
CN109324877A (en) The method and server of data access
CN106168932B (en) Flash control method and device
CN116097682A (en) Method and device for responding to user access request and storage device
CN113407357A (en) Method and device for inter-process data movement

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CI02 Correction of invention patent application

Correction item: PCT international application to national stage day

Correct: 2023.02.03

False: 2023.02.01

Number: 19-01

Page: The title page

Volume: 39

Correction item: PCT international application to national stage day

Correct: 2023.02.03

False: 2023.02.01

Number: 19-01

Volume: 39

CI02 Correction of invention patent application