WO2022067564A1 - 一种响应用户访问请求的方法、装置和存储设备 - Google Patents

一种响应用户访问请求的方法、装置和存储设备 Download PDF

Info

Publication number
WO2022067564A1
WO2022067564A1 PCT/CN2020/119023 CN2020119023W WO2022067564A1 WO 2022067564 A1 WO2022067564 A1 WO 2022067564A1 CN 2020119023 W CN2020119023 W CN 2020119023W WO 2022067564 A1 WO2022067564 A1 WO 2022067564A1
Authority
WO
WIPO (PCT)
Prior art keywords
access request
identifier
storage device
access requests
key
Prior art date
Application number
PCT/CN2020/119023
Other languages
English (en)
French (fr)
Inventor
裘来彬
刘光辉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080104380.7A priority Critical patent/CN116097682A/zh
Priority to PCT/CN2020/119023 priority patent/WO2022067564A1/zh
Publication of WO2022067564A1 publication Critical patent/WO2022067564A1/zh

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

Definitions

  • the embodiments of the present application 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.
  • the storage device in the terminal device is a single-threaded system with a queue, and can obtain and process access requests from the queue according to the order in which the access requests are issued.
  • the number of access requests in the queue is too large, even if important access requests have been queued, they will not be processed until the previous requests are processed due to queue blocking. If an important request is blocked and the response delay is too large, it will cause synchronous waiting of key processes, thus affecting the user experience.
  • the prior art proposes a method for responding to user requests.
  • the method carries a command priority (CP) identifier in the access request issued by the foreground application, so that the identification of the command priority (CP) is carried in the access request issued by the foreground application.
  • CP command priority
  • the access request identified by the CP can be preferentially processed on the storage device side.
  • this scheme divides the access requests into those with the CP ID and those without the CP ID.
  • the two-level priority cannot be connected to the scheduling under the complex multitasking framework, which may cause key processes to be blocked, resulting in poor user experience.
  • the embodiments of the present application provide a method, an apparatus, and a storage device for responding to a user access request, which can improve the problem of slowness caused by the blocking of key access requests and improve user experience.
  • a first aspect of the embodiments of the present application provides a method for responding to a user access request, the method includes: a storage device receives multiple access requests from a foreground application; the multiple access requests include key access requests, and the key access requests are: The access request that causes the user interface UI thread to wait synchronously, the key access request includes a first identifier, the access requests other than the key access request in the above-mentioned multiple access requests include a second identifier, and the priority of the first identifier is high based on the priority of the second identifier; the storage device preferentially responds to the above-mentioned key access request based on the first identifier.
  • multiple access requests received by the storage device from foreground applications have different priorities, and the priority of key access requests is higher than that of other access requests.
  • the storage device can prioritize foreground applications.
  • the critical access request sent.
  • access requests other than critical access requests may be referred to as non-critical access requests, and the non-critical access requests may be access requests that do not cause UI threads to wait synchronously.
  • the key access request can be a request issued by the UI thread or a request issued by a non-UI thread, but it will cause the UI thread to wait synchronously.
  • the multiple access requests from the foreground application received by the storage device have different priorities, and the priority of key access requests is higher, so that the storage device can prioritize key access requests, which improves the sending of foreground applications.
  • the critical access request is blocked by the non-critical access request sent by the foreground application, which improves the user experience.
  • the multiple access requests from the foreground application received by the storage device may be access requests processed by the processor. For example, by identifying the key access request among the multiple access requests sent by the foreground application, the processor adds the first identifier to the critical access request and adds the second identifier to the non-critical access request, and the processor sends the stored device to the storage device. The critical access request to which the first identifier has been added and the non-critical access request to which the second identifier has been added.
  • the above-mentioned storage device preferentially responds to the above-mentioned key access request based on the above-mentioned first identifier, including: the above-mentioned storage device, based on the first identifier, determines that the access request being processed by the storage device is If the priority is lower than the priority of the key access request, the storage device determines not to process other operations in the access request being processed except the operations for ensuring the normal operation of the storage device, and responds to the key access request.
  • the storage device when the priority of the access request being processed by the storage device is lower than the priority of the critical access request, the storage device only processes the operations that ensure the normal operation of the storage device among the access requests being processed. Other operations other than the normal operation of the storage device are not processed, so the access requests currently being processed can be processed at the fastest speed, and the synchronization waiting time of key access requests can be reduced.
  • the operations other than the operations for ensuring the normal operation of the storage device include: data garbage collection GC, table entry GC , table entry management, physical block erase, exception handling, or one or more of large input and output IO write operations.
  • the storage device only processes operations that can ensure the normal operation of the storage system in the access requests being processed (for example, operations such as maintaining FTL entries) to ensure the completion of basic read and write operations.
  • operations such as maintaining FTL entries
  • the above-mentioned key access request is an access request corresponding to a page fault interrupt.
  • the first identifier in the access request corresponding to the pagefault is identified by the storage device, so that the storage device can preferentially process the access request corresponding to the pagefault, thus improving the problem of poor user experience caused by the blocking of the access request corresponding to the pagefault.
  • the above-mentioned key access request is a request issued by the above-mentioned UI thread. Based on this solution, by identifying the first identifier in the request sent by the UI thread, the storage device can respond preferentially to the request sent by the UI thread, improving the slowness caused by the blocking of the request sent by the UI thread, and improving the user experience.
  • the foregoing key access request further includes the foregoing second identifier.
  • the priority of the access request sent by the foreground application is higher than that of the access request sent by the background application, so that by identifying the second identifier, The access request sent by the foreground application can be preferentially processed, which improves the problem that the access request sent by the foreground application is blocked by the access request sent by the background application.
  • the priority of the key access request sent by the foreground application is higher than the priority of the non-critical access request sent by the foreground application.
  • An identifier enables the key access requests sent by the foreground application to be processed with priority, which improves the problem that the key access requests sent by the foreground application are blocked by the non-critical access requests sent by the foreground application, and improves the user experience.
  • the foregoing foreground applications are one or more. Based on this solution, there may be one or more foreground applications, and the above-mentioned multiple access requests may come from the same foreground application or from different foreground applications, which is not limited in this application.
  • a method for responding to a user access request includes: receiving multiple access requests from a foreground application; A first identifier is added to the request, and a second identifier is added to the access requests other than the key access request in the above-mentioned multiple access requests; the key access request is an access request that causes the UI thread of the user interface to wait synchronously; the first identifier is The priority is higher than the priority of the second identification; multiple access requests are sent to the storage device.
  • a first identifier with a higher priority is added to the key access request sent by the foreground application
  • a second identifier with a lower priority is added to the access request other than the key access request sent by the foreground application. Therefore, the foreground application
  • Multiple access requests sent have different priorities, and key access requests have a higher priority, which can improve the slowness caused by the blocking of key access requests and improve user experience.
  • the access requests other than the key access requests among the multiple access requests sent by the foregoing foreground applications may be referred to as non-critical access requests, and the non-critical access requests may be access requests that do not cause the UI thread to wait synchronously.
  • the key access request can be a request issued by the UI thread or a request issued by a non-UI thread, but it will cause the UI thread to wait synchronously.
  • the execution body of this solution may be a processor, or may be an operating system OS running on the processor.
  • the processor when the above-mentioned multiple access requests are sent to the storage device, the first identifier or the second identifier has been added to the sent multiple access requests. That is to say, after the processor adds the first identifier to the critical access request among the multiple access requests, and adds the second identifier to the non-critical access request, the processor sends the critical access request to which the first identifier has been added to the storage device, and Add a second identified non-critical access request.
  • the above-mentioned key access request is an access request corresponding to a page fault interrupt.
  • the multiple access requests sent by the foreground application have different priorities, and
  • the access request corresponding to the pagefault has absolute priority, which can improve the problem of poor user experience caused by the blocking of the access request corresponding to the pagefault.
  • the above-mentioned OS sending the above-mentioned multiple access requests to the above-mentioned storage device includes: the above-mentioned OS preferentially sends key access requests to the storage device based on the above-mentioned first identifier.
  • the priority of the critical access request is higher than the priority of the second identifier added to the non-critical access request, the priority of the critical access request is higher than the priority of the non-critical access request, Therefore, when an 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 as to improve the processing speed of the key access request.
  • the above-mentioned key access request is a request issued by the above-mentioned UI thread. Based on this solution, by adding a first identifier with a higher priority to the request sent by the UI thread, the request sent by the UI thread can be preferentially processed, which improves the problem that the request sent by the UI thread is blocked, and improves the user experience.
  • the foregoing method further includes: adding the foregoing second identifier to the foregoing key access request. Based on this solution, by adding a second identifier to the multiple access requests sent by the foreground application, the priority of the access request sent by the foreground application is higher than the priority of the access request sent by the background application, so that the access request sent by the foreground application is made It can be processed in priority, which improves the problem that the access request sent by the foreground application is blocked by the access request sent by the background application.
  • the priority of the key access request sent by the foreground application is higher than that of the non-critical access sent by the foreground application.
  • the priority of the request so that the key access request sent by the foreground application can be processed with priority, which improves the problem that the key access request sent by the foreground application is blocked by the non-critical access request sent by the foreground application, and improves the user experience.
  • the foregoing foreground applications are one or more. Based on this solution, there may be one or more foreground applications, and the above-mentioned multiple access requests may come from the same foreground application or from different foreground applications, which is not limited in this application.
  • a third aspect of the embodiments of the present application provides a storage device, the storage device includes: an interface circuit configured to receive multiple access requests from foreground applications; the multiple access requests include key access requests, and the key access requests are The access request that causes the user interface UI thread to wait synchronously, the key access request includes a first identifier, the access requests other than the key access request in the above-mentioned multiple access requests include a second identifier, and the priority of the first identifier is higher than The priority of the second identifier; the storage medium is used to respond to the key access request with priority based on the first identifier.
  • the above-mentioned storage medium is specifically configured to, based on the above-mentioned first identifier, if it is determined that the priority of the access request being processed by the above-mentioned storage medium is lower than the priority of the above-mentioned key access request, The storage medium determines not to process other operations other than the operations for ensuring the normal operation of the storage device in the access request being processed, and responds to the critical access request.
  • other operations other than operations to ensure the normal operation of the storage device include: data garbage collection GC, table entry GC , table entry management, physical block erase, exception handling, or one or more of large input and output IO write operations.
  • the above-mentioned key access request is an access request corresponding to a page fault interrupt.
  • the above-mentioned key access request is a request issued by the above-mentioned UI thread.
  • the foregoing key access request further includes the foregoing second identifier.
  • a fourth aspect of the embodiments of the present application provides an apparatus for responding to a user access request, the apparatus includes a processor and a first memory, the first memory is coupled to the processor; wherein, the processor is configured to receive data from a foreground Multiple access requests of the application; the processor is further configured to identify the key access request among the multiple access requests, and add a first identifier to the key access request, and remove the key access request from the multiple access requests A second identifier is added to other access requests; the key access request is an access request that causes the UI thread of the user interface to wait synchronously; the priority of the first identifier is higher than the priority of the second identifier; the processor is also used to send the The second memory sends the above-mentioned multiple access requests.
  • the first memory in this solution is different from the second memory
  • the first memory is an on-chip storage device
  • the first memory can be integrated with the processor in a system on chip (system on chip, SoC).
  • SoC system on chip
  • the second memory is an off-chip storage device, such as a universal storage device (Universal Flash Storage, UFS), a solid state disk (Solid State Disk, SSD), a flash memory (flash memory), a hard disk drive (hard fisk drive, HDD) and other storage devices equipment.
  • UFS Universal Flash Storage
  • SSD Solid State Disk
  • flash memory flash memory
  • HDD hard disk drive
  • the multiple access requests sent by the processor to the second memory are access requests to which the first identifier or the second identifier has been added.
  • the above-mentioned key access request is an access request corresponding to a page fault interrupt.
  • the above-mentioned processor is specifically configured to send the above-mentioned key access request to the above-mentioned storage device preferentially based on the above-mentioned first identifier.
  • the above-mentioned key access request is a request issued by the above-mentioned UI thread.
  • the above-mentioned processor is further configured to add the above-mentioned second identifier to the above-mentioned key access request.
  • the embodiments of the present application provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer can execute the above-mentioned first aspect The method for responding to a user access request according to any one of the second aspects.
  • the embodiments of the present application provide a computer program product including instructions, which, when run on a computer, enables the computer to execute any one of the above-mentioned first to second aspects.
  • a terminal in a seventh aspect of the embodiments of the present application, includes a processor and a storage device, the processor is configured to implement the method for responding to a user access request according to any one of the second aspects above, and the storage device A method for implementing the method for responding to a user access request described in any one of the above-mentioned first aspects.
  • FIG. 1 is a schematic structural diagram of a multi-user parallel access scenario provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a single-user access scenario provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for responding to a user access request provided by an embodiment of the present application
  • FIG. 4 is an application schematic diagram of a method for responding to a user access request provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of the composition of a device for responding to a user access request provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of the composition of a storage device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the composition of a terminal according to an embodiment of the present application.
  • At least one (a) 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, where a, b and c can be single or multiple.
  • words such as “first” and “second” are used to distinguish the same or similar items that have basically the same function and effect, Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and execution order.
  • the "first” in the first identification and the "second” in the second identification in the embodiment of the present application are only used to distinguish different identifications.
  • the descriptions of the first, second, etc. appearing in the embodiments of the present application are only used for illustration and distinguishing the description objects, and have no order. any limitations of the examples.
  • the storage device in the terminal device can obtain and process the access requests from the queue according to the order in which the access requests are issued.
  • the number of access requests in the queue is too large, even if important access requests have been queued, they will not be processed until the previous requests are processed due to queue blocking. If an important request is blocked and the response delay is too large, it will cause synchronous waiting of key processes, thus affecting the user experience.
  • the command priority CP identifier can be carried in the access request issued by the foreground application, so that the access request carrying the CP identifier can be preferentially processed on the storage device side.
  • all requests issued by the foreground application carry the CP identifier, that is, all requests issued by the foreground application have the same priority, so the important requests in the requests issued by the foreground application may be included in the requests issued by the foreground application. Unimportant requests are blocked, which will cause the response delay of important requests to be too large, cause synchronous waiting of key processes, and affect the subjective experience of users, resulting in poor user experience.
  • this solution will only process the access request carrying the CP identifier in advance. If the processing delay of the access request issued before the access request carrying the CP identifier is too long, the access request carrying the CP identifier still needs to be queued. Synchronous wait.
  • the embodiment of the present application provides a method for responding to a user access request, which improves the slow freezing problem caused by the blocking of access requests in the prior art , which improves the user experience.
  • the method for responding to a user access request provided by the embodiment of the present application may be applied to a scenario of concurrent access by multiple users or a scenario of access by a single user, which is not limited in the embodiment of the present application.
  • an access request that can be sent by multiple users can be sent to a solid state disk (Solid State Disk, SSD) through an operating system (Operating System, OS) or a virtual machine, and the OS or Virtual machines run on processors.
  • the solid state drive receives access requests sent by multiple users and responds to the access requests sent by the multiple users.
  • the access request sent by the user can be a read request or a write request.
  • the OS may be an operating system such as a Windows operating system, a Linux operating system, etc., which is not limited in this application.
  • user A sends a write request (W in Figure 1) to the server, the write request is sent to the SSD storage array through the OS or virtual machine running on the processor in the server, and the SSD storage array responds to the write request.
  • User B and User C can send a read request to the server (R in Figure 1), the read request is sent to the storage array by the OS or virtual machine running on the processor to the SSD, and the SSD storage array responds to the read request.
  • the access request is an access request sent by a certain user among the multiple users, that is, in the following embodiments of the present application.
  • the access requests involved are all from the same user.
  • a user may send an access request to a universal storage device (Universal Flash Storage, UFS) through an OS running on the processor.
  • the OS may be an ios operating system, an Android (Android) operating system, or the like.
  • user A can send a write request (W in FIG. 2) or a read request (R in FIG. 2) to the terminal, and the write request or read request is executed by the terminal running on the processor.
  • the Android system sends it to UFS, and UFS responds to the write request or read request.
  • the embodiments of the present application do not limit the specific scenarios in which the method for responding to user access requests is applied, and the following embodiments only take the scenario in which the method for responding to user access requests is applied to single-user access as an example for description.
  • FIG. 3 provides a method for responding to a user access request provided by an embodiment of the present application, and the method may include the following steps:
  • the OS receives multiple access requests from the foreground application.
  • the OS in the above step S301 runs on the processor, that is, multiple access requests from foreground applications can be received through the OS running on the processor.
  • a foreground application refers to an application running in the foreground of a terminal device. For example, when a user sends a message using the WeChat application, the WeChat application is the foreground application.
  • the above-mentioned multiple access requests may come from the same foreground application, or may come from different foreground applications. That is, the OS can receive multiple access requests sent from different foreground applications, and can also receive multiple access requests sent from the same foreground application, which is not limited in this embodiment of the present application.
  • the foreground application includes both the WeChat application and the browser application.
  • the multiple 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 foregoing multiple access requests may include read requests, may also include write requests, and may include both read requests and write requests, which are not limited in this embodiment of the present application.
  • the access request may also be referred to as an Input/Output (IO) request.
  • the above-mentioned multiple access requests include a key access request
  • the key access request is an access request that causes a user interface (User Interface, UI) thread to wait synchronously.
  • UI User Interface
  • a critical access request can be a request issued by the UI thread.
  • a critical access request can also be issued by a non-UI thread, but it will cause a request that the UI thread waits synchronously. Understandably, since the key access request is an access request that causes the UI thread to wait synchronously, when the key access request is blocked, it will cause the system to freeze and affect the user experience.
  • the above-mentioned access request that causes the UI thread to wait synchronously may be an access request corresponding to a page fault (pagefault). That is to say, the access request corresponding to the pagefault can be a critical access request.
  • pagefault page fault
  • requests other than the critical access requests among the above-mentioned multiple access requests may be referred to as non-critical access requests, and the non-critical access requests are access requests that do not cause the UI thread to wait synchronously. That is, the plurality of access requests received by the above OS may include critical access requests and non-critical access requests.
  • the OS in the above step S301 is a computer program that manages and controls computer hardware and software resources, and is the most basic system software directly running on the "bare metal", used to support other software, such as various application programs. run.
  • the OS in this embodiment of the present application may be various operating systems, for example, a Windows operating system, a Linux operating system, an iOS operating system, an Android open source operating system, and other operating systems.
  • the embodiments of the present application do not limit the specific type of the OS, which is only an exemplary description here.
  • the OS identifies the key access request among the multiple access requests, adds the first identifier to the key access request, and adds the second identifier to the access requests other than the key access request among the multiple access requests.
  • the OS in the above step S302 can be run on the processor, and the processor can identify the key access request among the multiple access requests, and add the first identifier to the key access request, and remove the key access request from the multiple access requests. A second identifier is added to the access request other than the access request.
  • identifying the critical access request by the OS may include: the OS identifying an access request corresponding to a page fault (pagefault), where the access request is a critical access request.
  • pagefault page fault
  • the file system (FS) layer may specifically identify the key access request from the multiple access requests sent by the foreground application, and add the first identifier to the key access request.
  • the OS runs on the processor, and the FS layer in the OS can identify the critical access request, and add the first identifier to the critical access request and the second identifier to the non-critical access request.
  • the priority of the first identifier is higher than the priority of the second identifier.
  • the first identifier is CP+
  • the second identifier is CP
  • the priority of CP+ is higher than that of CP.
  • the embodiments of the present application do not limit the specific forms of the first identifier and the second identifier.
  • only the first identifier is CP+ and the second identifier is CP for exemplary description.
  • the OS adds the first identifier to the critical access request and adds the second identifier to the non-critical access request, so that the priority of the critical access request is higher than the priority of the non-critical access request.
  • the first access request is a critical access request
  • the second access request is a non-critical access request
  • the CP+ identifier is added to the first access request
  • the CP identifier is added to the second access request, because the priority of the CP+ is higher than that of the CP. priority, so the priority of the first access request is higher than the priority of the second access request.
  • a first identifier is added to a critical access request and a second identifier is added 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. That is, the method of the embodiment of the present application divides multiple access requests sent by the foreground application into different priorities, so that the key access requests among the multiple access requests sent by the foreground application can be preferentially processed, and the blocking of the key access requests is alleviated. Causes the problem of slow freeze and improves the user experience.
  • the access request can be divided into three priorities, including the access request adding the first identifier, the access request adding the second identifier, and the access request not adding the identifier,
  • the priority of the access request adding the first identifier is higher than the priority of the access request adding the second identifier
  • the priority of the access request adding the second identifier is higher than the priority of the access request adding no identifier. It is understandable that the priority scheduling under complex multitasking can be connected through the three-level priority.
  • the access request for adding the first identifier and the access request for adding the second identifier are access requests sent by the foreground application, and the access request without adding the identifier may be the access request sent by the background application.
  • a background application refers to an application running in the background of a terminal device, that is, a background application is an application that the user cannot see but is running. For example, when a user uses the WeChat application in the foreground, the Tencent Video application downloads videos in the background, the Tencent Video application is the background application, and the WeChat application is the foreground application.
  • the access requests sent by the user can be divided into three priorities, namely, critical access requests sent by foreground applications, non-critical access requests sent by foreground applications, and access requests sent by background applications.
  • the first identifier is added to the key access request sent by the foreground application
  • the second identifier is added to the non-critical access request sent by the foreground application
  • the access request sent by the background application is not added. Therefore, the priority of the key access request sent by the foreground application is It is higher than the non-critical access request sent by the foreground application, and the priority of the non-critical access request sent by the foreground application is higher than the access request sent by the background application.
  • the OS in the above step S303 may run on the processor, and the second identifier is added to the key access request through the processor.
  • step S302 is to add the second identifier to the access requests other than the key access request among the multiple access requests sent by the foreground application
  • step S303 is to add the second identifier to the key access request sent by the foreground application. It can be known from S302 and S303 that the OS can add the second identifier to all access requests sent by the foreground application.
  • the OS may add the second identifier to all access requests sent by the foreground application, and add the first identifier to key access requests.
  • the OS adds the CP identifier to all access requests sent by the foreground application, and after the OS recognizes the key access request, adds the CP+ identifier to the key access request. That is, the key access request may include both the CP identifier and the CP+ identifier.
  • the priority of the key access request corresponds to the priority of the identifier with higher priority, that is, the priority of the key access request is the same as the first identifier. corresponding to the priority.
  • the critical access request includes both the CP identifier and the CP+ identifier
  • the non-critical access request only includes the CP identifier
  • the priority of the critical access request is higher than that of the non-critical access request. The priority of the request.
  • the OS may add the second identifier to the multiple access requests sent by the foreground application before identifying the key access request, and add the first identifier to the key access request after the OS recognizes the key access request.
  • the OS may add the first identifier and the second identifier to the critical access request, and add the second identifier to the non-critical access request.
  • the OS sends multiple access requests to the storage device.
  • the OS in the foregoing step S304 may run on the processor, and send multiple access requests to the storage device through the processor.
  • the storage device is an off-chip storage device.
  • the multiple access requests sent by the OS to the storage device include the first identifier and/or the second identifier.
  • the critical access request includes the first identifier
  • the non-critical access request includes the second identifier.
  • the critical access request among the multiple access requests sent by the OS to the storage device includes the first identifier and the second identifier
  • the non-critical access request includes the second identifier.
  • the OS sending multiple access requests to the storage device may include: based on the first identifier, the OS preferentially sends key access requests to the storage device.
  • the OS preferentially sends key access requests to the storage device.
  • the IO scheduling layer in the OS can open a "green channel" for the key access requests including the first identifier sent by the FS file system, and send key access requests in priority to ensure that they can operate at the fastest speed to the storage device.
  • the above-mentioned storage device may be a volatile memory (volatile memory), such as random-access memory (random-access memory, RAM), or a non-volatile memory (non-volatile memory), flash memory. (flash memory), hard drive (hard fisk drive, HDD), solid state drive SSD, general storage device UFS or other storage devices.
  • volatile memory such as random-access memory (random-access memory, RAM), or a non-volatile memory (non-volatile memory), flash memory. (flash memory), hard drive (hard fisk drive, HDD), solid state drive SSD, general storage device UFS or other storage devices.
  • flash memory volatile memory
  • HDD hard drive
  • SSD solid state drive SSD
  • general storage device UFS general storage device UFS or other storage devices.
  • the foregoing storage device may also be a combination of the foregoing multiple memories.
  • the first identifier is added to the key access request
  • the second identifier is added to the non-critical access request, so that the priority of the critical access request is higher than that of the non-critical access request.
  • the priority of key access requests so that when multiple access requests are sent to the storage device, key access requests can be sent first, so as to improve the processing speed of key access requests, and improve the slowness caused by the blocking of key access requests. user experience.
  • the storage device receives multiple access requests.
  • step S305 the storage device may receive multiple access requests from the processor.
  • the multiple access requests are access requests sent by the foreground application.
  • step S305 may be performed by an interface circuit in the storage device, that is, the interface circuit in the storage device receives multiple access requests from the processor.
  • the multiple access requests received by the storage device in the above step S305 are access requests sent by the foreground application, and the access requests have been identified by the processor, and the first identifier is added to the key access request, and the non-critical access request is added. Add a second logo to . That is, the multiple 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.
  • the critical access request received by the storage device includes the first identifier
  • the non-critical access request includes the second identifier
  • the critical access request received by the storage device includes the first identifier and the second identifier
  • the non-critical access request includes the second identifier
  • the storage device responds to the key access request preferentially based on the first identifier.
  • step S306 may be performed by a storage medium in the storage device, that is, the storage medium responds to the key access request preferentially based on the first identifier.
  • the storage device may determine that the access request is a key access request based on the first identifier included in the access request, and respond to the key access request with priority.
  • the preferential response of the storage device to the key access request may include: based on the first identifier, the storage device adjusts the access requests in the to-be-processed queue in the order of priority.
  • the requests in the pending queue of the storage device include request 1, request 2, and request 3.
  • Request 1, request 2, and request 3 all include only the CP identifier.
  • the storage device adjusts the pending queue to request 4, request 1, request 2, and request 3 according to the CP+ identifier.
  • the storage device responds preferentially to the key access request based on the first identifier, including: based on the first identifier, 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 Do not process other operations other than operations that ensure the normal operation of the storage device in the access request being processed, and respond to critical access requests.
  • other operations include: data garbage collection (GC), table item GC, table item management, physical block erasure, exception handling, or large IO write one or more of the operations. It is understandable that on the storage device side, the critical access request has the highest priority.
  • the storage device When the access request being processed by the storage device is a non-critical access request, the storage device only performs operations that ensure the normal operation of the storage device among the access requests being processed. Processing, no processing is performed for additional operations (other than operations that ensure the normal operation of the storage device), so that the processing access requests can be processed as quickly as possible, and the critical access requests can be responded to, so the critical access requests can be reduced. synchronization wait time.
  • the above-mentioned access request with a priority lower than the key access request may be an access request that includes only the second identifier, or an access request that does not include the first identifier and the second identifier.
  • the storage device For example, taking the access request being processed by the storage device as the third access request, and the third access request only includes the CP identifier as an example, after the storage device receives the key access request including the CP+ identifier, the storage device only processes the third access request based on the CP+ identifier.
  • Operations that can ensure the normal operation of the storage system in the access request for example, operations such as maintaining flash translation layer (FTL) entries) to ensure that basic read and write operations are completed.
  • FTL flash translation layer
  • the first identifier is added to the key access request sent by the foreground application
  • the second identifier is added to the non-critical access request sent by the foreground application.
  • the priority is higher than the priority of the second identifier, so that the priority of the critical access request sent by the foreground application is higher than the priority of the non-critical access request, so that the storage device can respond to the priority of the access request sent by the user.
  • the higher the critical access request the problem that the critical access request sent by the foreground application is blocked by the non-critical access request sent by the foreground application is improved, and the user experience is improved.
  • the solution can respond to key access requests at the fastest speed, reducing the synchronization waiting time of key access requests.
  • the computer includes corresponding hardware structures and/or software modules for executing each function.
  • the present application can be implemented in the form of a combination of hardware and computer software. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
  • the computer can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiment of the present invention is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 5 shows a schematic structural diagram of an apparatus 500 for responding to a user access request.
  • the apparatus for responding to a user access request may include a processor 501 and a memory 502 , and the memory 502 is coupled to the processor 501 .
  • the processor 501 is configured to control and manage the actions of the apparatus 500 responding to the user access request, for example, the processor 501 is configured to support the apparatus 500 responding to the user access request to execute S301-S304 in FIG. 3 , and/or Additional procedures for the techniques described herein.
  • the memory 502 is used for storing program codes and data corresponding to the apparatus 500 responding to a user access request executing any of the above-mentioned methods for responding to a user access request.
  • the memory 502 may be a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM), and the like. Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here.
  • the memory 502 in FIG. 5 is different from the storage device in FIG. 3 , the memory 502 in FIG. 5 is an on-chip storage device, and the memory 502 is coupled to the processor 501 and can be integrated with the processor 501 on an SoC. While the storage device in FIG. 3 is an off-chip storage device, for example, it may be an off-chip memory such as UFS, SSD, and the like.
  • FIG. 6 shows a schematic structural diagram of a storage device 600 .
  • the storage device 600 includes an interface circuit 601 and a storage medium 602 .
  • the interface circuit 601 may be used to support the storage 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.
  • FIG. 7 is a terminal provided by an embodiment of the present application.
  • the terminal may include a processor and a storage device.
  • the processor is used for executing S301-S304 in FIG. 3
  • the storage device is used for executing S305 in FIG. 3 .
  • the storage device is an off-chip storage device.
  • the terminal may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant ( terminal devices such as personal digital assistant (PDA), augmented reality (AR) ⁇ virtual reality (virtual reality, VR) devices, and the specific form of the terminal is not particularly limited in this embodiment of the present application.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • Embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer can execute the method for responding to a user access request shown in FIG. 3 .
  • Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the method for responding to a user access request shown in FIG. 3 .
  • the steps of the methods or algorithms described in conjunction with the disclosure of the present application may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
  • the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, Erasable Programmable Read-Only Memory (Erasable Programmable ROM, EPROM), electrically erasable programmable Programmable read-only memory (Electrically EPROM, EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM), or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage medium may reside in an ASIC.
  • the ASIC may be located in the core network interface device.
  • the processor and the storage medium may also exist in the core network interface device as discrete components.
  • the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof.
  • the 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 medium can be any available medium that can be accessed by a general purpose or special purpose computer.

Landscapes

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

Abstract

本申请实施例公开了一种响应用户访问请求的方法、装置和存储设备,涉及计算机技术领域,改善了现有技术中因关键访问请求被阻塞造成慢卡顿的问题,提升了用户体验。具体方案为:存储设备接收来自处理器的多个访问请求;多个访问请求包括关键访问请求,关键访问请求为导致用户界面UI线程同步等待的访问请求,关键访问请求中包括第一标识,多个访问请求中除关键访问请求以外的访问请求中包括第二标识,第一标识的优先级高于第二标识的优先级;存储设备基于第一标识,优先响应关键访问请求。

Description

一种响应用户访问请求的方法、装置和存储设备 技术领域
本申请实施例涉及计算机技术领域,尤其涉及一种响应用户访问请求的方法、装置和存储设备。
背景技术
终端设备中的存储器件为带队列的单线程系统,可以按照访问请求的下发顺序,从队列中获取访问请求并进行处理。当队列中的访问请求的数量过多时,重要的访问请求即使已经排入到队列中,也会因为队列阻塞需要等排在前面的请求处理完成后才会被处理。若重要的请求因为被阻塞导致响应时延过大,则会引起关键进程的同步等待,从而影响用户体验。
为了解决关键进程同步等待影响用户体验的问题,现有技术提出一种响应用户请求的方法,该方法通过在前台应用下发的访问请求中携带命令优先(command priority,CP)标识,使得携带该CP标识的访问请求在存储器件侧可以被优先处理。但是该方案将访问请求划分为携带CP标识与不携带CP标识的访问请求,该两级优先级无法对接复杂多任务框架下的调度,可能造成关键进程被阻塞,导致用户体验较差。
发明内容
本申请实施例提供一种响应用户访问请求的方法、装置和存储设备,能够改善因关键访问请求被阻塞造成慢卡顿的问题,提升用户体验。
为达到上述目的,本申请实施例采用如下技术方案:
本申请实施例的第一方面,提供一种响应用户访问请求的方法,该方法包括:存储设备接收来自前台应用的多个访问请求;该多个访问请求包括关键访问请求,该关键访问请求为导致用户界面UI线程同步等待的访问请求,该关键访问请求中包括第一标识,上述多个访问请求中除该关键访问请求以外的访问请求中包括第二标识,该第一标识的优先级高于该第二标识的优先级;存储设备基于该第一标识,优先响应上述关键访问请求。基于本方案,存储设备接收的来自前台应用的多个访问请求的优先级不同,其中关键访问请求的优先级高于其他访问请求的优先级,存储设备通过识别第一标识,可以优先处理前台应用发送的关键访问请求。可选的,上述前台应用发送的多个访问请求中除关键访问请求以外的访问请求可以称为非关键访问请求,该非关键访问请求可以为不会导致UI线程同步等待的访问请求。可选的,关键访问请求可以为UI线程下发的请求,也可以为非UI线程下发,但会引起UI线程同步等待的请求。可以理解的,本方案中存储设备接收的来自前台应用的多个访问请求具有不同的优先级,而且关键访问请求的优先级较高,从而存储设备能够优先处理关键访问请求,改善了前台应用发送的关键访问请求被前台应用发送的非关键访问请求阻塞的问题,提升了用户体验。
可选的,上述存储设备接收的来自前台应用的多个访问请求可以是经过处理器处理后的访问请求。例如,处理器通过识别前台应用发送的多个访问请求中的关键访问请求,并在该关键访问请求中添加第一标识,在非关键访问请求中添加第二标识,处 理器向存储设备发送已添加第一标识的关键访问请求和已添加第二标识的非关键访问请求。
结合第一方面,在一种可能的实现方式中,上述存储设备基于上述第一标识,优先响应上述关键访问请求,包括:上述存储设备基于第一标识,若确定存储设备正在处理的访问请求的优先级低于关键访问请求的优先级,存储设备确定不对正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作进行处理,并响应该关键访问请求。基于本方案,在存储设备正在处理的访问请求的优先级低于关键访问请求的优先级的情况下,存储设备仅对正在处理的访问请求中保证存储设备正常运转的操作进行处理,对于除保证存储设备正常运转以外的其他操作不进行处理,因此能够以最快速度处理完当前正在处理的访问请求,减小关键访问请求的同步等待时间。
结合第一方面和上述可能的实现方式,在另一种可能的实现方式中,上述正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作包括:数据垃圾回收GC、表项GC、表项管理、物理块擦除、异常处理或大输入输出IO写操作中的一种或多种。基于本方案,存储设备仅处理正在处理的访问请求中能够保证存储系统正常运转的操作(例如,维护FTL表项等操作),以确保读写基本操作完成,对于正在处理的访问请求中如GC、表项管理、异常处理等额外长耗时操作暂时不做处理,从而能够减小关键访问请求的同步等待时间,改善因关键访问请求被阻塞造成的慢卡顿问题,提升用户体验。
结合第一方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为缺页中断对应的访问请求。基于本方案,通过存储设备识别pagefault对应的访问请求中的第一标识,使得存储设备可以优先处理pagefault对应的访问请求,因此改善了pagefault对应的访问请求被阻塞造成用户体验较差的问题。
结合第一方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为上述UI线程下发的请求。基于本方案,通过识别UI线程下发的请求中的第一标识,存储设备可以优先响应UI线程下发的请求,改善UI线程下发的请求被阻塞造成的慢卡顿问题,提升用户体验。
结合第一方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求中还包括上述第二标识。基于本方案,由于前台应用发送的多个访问请求中均包括第二标识,使得前台应用发送的访问请求的优先级高于后台应用发送的访问请求的优先级,从而通过识别该第二标识,使得前台应用发送的访问请求可以被优先处理,改善了前台应用发送的访问请求被后台应用发送的访问请求阻塞的问题。进一步的,由于前台应用发送的关键访问请求中包括优先级较高的第一标识,使得前台应用发送的关键访问请求的优先级高于前台应用发送的非关键访问请求的优先级,通过识别第一标识,使得前台应用发送的关键访问请求可以被优先级处理,改善了前台应用发送的关键访问请求被前台应用发送的非关键访问请求阻塞的问题,提升了用户体验。
结合第一方面和上述可能的实现方式,在另一种可能的实现方式中,上述前台应用为一个或多个。基于本方案,前台应用可以为一个或多个,上述多个访问请求可以来自同一个前台应用,也可以来自不同的前台应用,本申请对此并不限定。
本申请实施例的第二方面,提供一种响应用户访问请求的方法,该方法包括:接 收来自前台应用的多个访问请求;在该多个访问请求中识别关键访问请求,并在该关键访问请求中添加第一标识,在上述多个访问请求中除该关键访问请求以外的访问请求中添加第二标识;该关键访问请求为导致用户界面UI线程同步等待的访问请求;该第一标识的优先级高于第二标识的优先级;向存储设备发送多个访问请求。基于本方案,通过在前台应用发送的关键访问请求中添加优先级较高的第一标识,在前台应用发送的关键访问请求以外的访问请求中添加优先级较低的第二标识,因此前台应用发送的多个访问请求具有不同的优先级,而且关键访问请求的优先级较高,从而能够改善因关键访问请求被阻塞造成的慢卡顿问题,提升了用户体验。可以理解的,上述前台应用发送的多个访问请求中除关键访问请求以外的访问请求可以称为非关键访问请求,该非关键访问请求可以为不会导致UI线程同步等待的访问请求。可选的,关键访问请求可以为UI线程下发的请求,也可以为非UI线程下发,但会引起UI线程同步等待的请求。可选的,本方案的执行主体可以是处理器,也可以是运行在处理器上的操作系统OS。
可选的,上述向存储设备发送上述多个访问请求时,发送的多个访问请求中已添加第一标识或第二标识。也就是说,处理器对多个访问请求中的关键访问请求添加第一标识,对非关键访问请求添加第二标识后,处理器向存储设备发送已添加第一标识的关键访问请求,和已添加第二标识的非关键访问请求。
结合第二方面,在一种可能的实现方式中,上述关键访问请求为缺页中断对应的访问请求。基于本方案,通过识别多个访问请求中pagefault对应的访问请求,并在该访问请求中添加具有绝对优先级的第一标识,从而使得前台应用发送的多个访问请求具有不同的优先级,而且pagefault对应的访问请求具有绝对优先级,从而能够改善因pagefault对应的访问请求被阻塞造成用户体验较差的问题。
结合第二方面,在一种可能的实现方式中,上述OS向上述存储设备发送上述多个访问请求,包括:上述OS基于上述第一标识,优先向存储设备发送关键访问请求。基于本方案,由于关键访问请求中添加的第一标识的优先级高于非关键访问请求中添加的第二标识的优先级,因此关键访问请求的优先级高于非关键访问请求的优先级,从而在向存储设备发送访问请求时,可以通过识别第一标识,优先向存储设备发送优先级较高的关键访问请求,以提高关键访问请求的处理速度。
结合第二方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为上述UI线程下发的请求。基于本方案,通过在UI线程下发的请求中添加优先级较高的第一标识,从而使得UI线程下发的请求能够被优先处理,改善了UI线程下发的请求被阻塞的问题,提升了用户体验。
结合第二方面和上述可能的实现方式,在另一种可能的实现方式中,上述方法还包括:在上述关键访问请求中添加上述第二标识。基于本方案,通过在前台应用发送的多个访问请求中添加第二标识,使得前台应用发送的访问请求的优先级高于后台应用发送的访问请求的优先级,从而使得前台应用发送的访问请求可以被优先处理,改善了前台应用发送的访问请求被后台应用发送的访问请求阻塞的问题。进一步的,可以通过识别前台应用发送的关键访问请求,并在关键访问请求中添加优先级较高的第一标识,使得前台应用发送的关键访问请求的优先级高于前台应用发送的非关键访问 请求的优先级,从而使得前台应用发送的关键访问请求可以被优先级处理,改善了前台应用发送的关键访问请求被前台应用发送的非关键访问请求阻塞的问题,提升了用户体验。
结合第二方面和上述可能的实现方式,在另一种可能的实现方式中,上述前台应用为一个或多个。基于本方案,前台应用可以为一个或多个,上述多个访问请求可以来自同一个前台应用,也可以来自不同的前台应用,本申请对此并不限定。
本申请实施例的第三方面,提供一种存储设备,该存储设备包括:接口电路,用于接收来自前台应用的多个访问请求;该多个访问请求包括关键访问请求,该关键访问请求为导致用户界面UI线程同步等待的访问请求,该关键访问请求中包括第一标识,上述多个访问请求中除该关键访问请求以外的访问请求中包括第二标识,第一标识的优先级高于第二标识的优先级;存储介质,用于基于第一标识,优先响应该关键访问请求。
结合第三方面,在一种可能的实现方式中,上述存储介质,具体用于基于上述第一标识,若确定上述存储介质正在处理的访问请求的优先级低于上述关键访问请求的优先级,存储介质确定不对正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作进行处理,并响应该关键访问请求。
结合第三方面和上述可能的实现方式,在另一种可能的实现方式中,上述正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作包括:数据垃圾回收GC、表项GC、表项管理、物理块擦除、异常处理或大输入输出IO写操作中的一种或多种。
结合第三方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为缺页中断对应的访问请求。
结合第三方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为上述UI线程下发的请求。
结合第三方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求中还包括上述第二标识。
本申请实施例的第四方面,提供一种响应用户访问请求的装置,该装置包括处理器和第一存储器,该第一存储器与该处理器耦合;其中,该处理器,用于接收来自前台应用的多个访问请求;该处理器,还用于在多个访问请求中识别该关键访问请求,并在该关键访问请求中添加第一标识,在上述多个访问请求中除上述关键访问请求以外的访问请求中添加第二标识;该关键访问请求为导致用户界面UI线程同步等待的访问请求;第一标识的优先级高于第二标识的优先级;该处理器,还用于向第二存储器发送上述多个访问请求。可选的,本方案中的第一存储器和第二存储器不同,第一存储器为片内存储设备,该第一存储器可以和处理器集成在系统级芯片(system on chip,SoC)中。第二存储器为片外存储设备,例如,通用存储设备(Universal Flash Storage,UFS)、固态硬盘(Solid State Disk,SSD)、快闪存储器(flash memory),硬盘(hard fisk drive,HDD)等存储设备。可以理解的,处理器向第二存储器发送的多个访问请求为已添加第一标识或第二标识的访问请求。
结合第四方面,在一种可能的实现方式中,上述关键访问请求为缺页中断对应的 访问请求。
结合第四方面,在一种可能的实现方式中,上述处理器,具体用于基于上述第一标识,优先向上述存储设备发送上述关键访问请求。
结合第四方面和上述可能的实现方式,在另一种可能的实现方式中,上述关键访问请求为上述UI线程下发的请求。
结合第四方面和上述可能的实现方式,在另一种可能的实现方式中,上述处理器,还用于在上述关键访问请求中添加上述第二标识。
上述第三方面以及第三方面的各种实现方式的效果描述可以参考第一方面相应效果的描述,上述第四方面以及第四方面的各种实现方式的效果描述可以参考第二方面相应效果的描述,在此不再赘述。
本申请实施例的第五方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面至第二方面中任一所述的响应用户访问请求的方法。
本申请实施例的第六方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面至第二方面中任一所述的响应用户访问请求的方法。
本申请实施例的第七方面,提供一种终端,该终端包括处理器和存储设备,所述处理器用于实现上述第二方面中任一所述的响应用户访问请求的方法,所述存储设备用于实现上述第一方面中任一所述的响应用户访问请求的方法。
附图说明
图1为本申请实施例提供的一种多用户并行访问场景的结构示意图;
图2为本申请实施例提供的一种单用户访问场景的结构示意图;
图3为本申请实施例提供的一种响应用户访问请求的方法的流程示意图;
图4为本申请实施例提供的一种响应用户访问请求的方法的应用示意图;
图5为本申请实施例提供的一种响应用户访问请求的装置的组成示意图;
图6为本申请实施例提供的一种存储设备的组成示意图;
图7为本申请实施例提供的一种终端的组成示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。在本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或,a和b和c,其中a、b和c可以是单个,也可以是多个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分,本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定。比如,本申请实施例中的第一标识中的“第一”和 第二标识中的“第二”仅用于区分不同的标识。本申请实施例中出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
终端设备中的存储器件可以按照访问请求的下发顺序,从队列中获取访问请求并进行处理。当队列中的访问请求的数量过多时,重要的访问请求即使已经排入到队列中,也会因为队列阻塞需要等排在前面的请求处理完成后才会被处理。若重要的请求因为被阻塞导致响应时延过大,则会引起关键进程的同步等待,从而影响用户体验。
为了解决关键进程同步等待影响用户体验的问题,可以通过在前台应用下发的访问请求中携带命令优先CP标识,使得携带该CP标识的访问请求在存储器件侧可以被优先处理。但是该方案对前台应用下发的所有请求均携带CP标识,即前台应用下发的所有请求的优先级相同,那么前台应用下发的请求中重要的请求有可能被前台应用下发的请求中不重要的请求阻塞,这将导致重要的请求响应时延过大,引起关键进程的同步等待,对用户的主观体验产生影响,导致用户体验较差。而且该方案仅会提前处理携带CP标识的访问请求,若在该携带CP标识的访问请求之前下发的访问请求处理的时延过长,那么该携带CP标识的访问请求仍需要排在队列中同步等待。
为了解决现有技术中因关键进程阻塞造成用户体验较差的问题,本申请实施例提供一种响应用户访问请求的方法,该方法改善了现有技术中因访问请求阻塞造成的慢卡顿问题,提升了用户体验。
示例性的,本申请实施例提供的响应用户访问请求的方法可以应用于多用户并行访问的场景,也可以应用于单用户访问的场景,本申请实施例对此并不限定。
示例性的,在多用户并行访问的场景中,多个用户可以发送的访问请求,可以通过操作系统(Operating System,OS)或虚拟机发送至固态硬盘(Solid State Disk,SSD),该OS或虚拟机运行在处理器上。固态硬盘接收多个用户发送的访问请求并响应该多个用户发送的访问请求。用户发送的访问请求可以为读请求或写请求。该OS可以为Windows操作系统、Linux操作系统等操作系统,本申请对此并不限定。例如,如图1所示,用户A向服务器发送写请求(图1中的W),该写请求通过服务器中运行在处理器上的OS或虚拟机发送至SSD存储阵列,SSD存储阵列响应该写请求。用户B和用户C可以向服务器发送读请求(图1中的R),该读请求通过运行在处理器上的OS或虚拟机向SSD发送至存储阵列,SSD存储阵列响应该读请求。
需要说明的是,本申请实施例提供的响应用户访问请求的方法应用于多用户并行访问的场景时,访问请求为多用户中的某一个用户发送的访问请求,即本申请下述实施例中涉及的访问请求均来自同一个用户。
示例性的,在单用户访问的场景下,用户可以通过运行在处理器上的OS向通用存储设备(Universal Flash Storage,UFS)发送访问请求。该OS可以为ios操作系统,安卓(Android)操作系统等。例如,如图2所示,用户A可以向终端发送可以写请求 (图2中的W)或读请求(图2中的R),该写请求或读请求通过终端中运行在处理器上的安卓系统发送至UFS,UFS响应该写请求或读请求。
示例性的,本申请实施例对于响应用户访问请求的方法应用的具体场景并不限定,下述实施例仅以该响应用户访问请求的方法应用于单用户访问的场景为例进行说明。
图3为本申请实施例提供的一种响应用户访问请求的方法,该方法可以包括以下步骤:
S301、OS接收来自前台应用的多个访问请求。
可以理解的,上述步骤S301中的OS运行在处理器上,即可以通过运行在处理器上的OS接收来自前台应用的多个访问请求。
前台应用是指在终端设备的前台运行的应用。例如,用户在使用微信应用发送消息时,微信应用为前台应用。
前台应用可以为一个,也可以为多个。当前台应用为多个时,上述多个访问请求可以来自同一个前台应用,也可以来自不同的前台应用。即OS可以接收来自不同前台应用发送的多个访问请求,也可以接收来自同一个前台应用发送的多个访问请求,本申请实施例对此并不限定。例如,用户在微信应用中打开网页时,前台应用既包括微信应用,也包括浏览器应用。在该场景下接收的多个访问请求,可以既包括微信应用发送的访问请求,也包括浏览器应用发送的访问请求。
上述多个访问请求可以包括读请求,也可以包括写请求,还可以既包括读请求也包括写请求,本申请实施例对此并不限定。该访问请求也可以称为输入输出(Input/Output,IO)请求。
示例性的,上述多个访问请求包括关键访问请求,关键访问请求为导致用户界面(User Interface,UI)线程同步等待的访问请求。例如,关键访问请求可以为UI线程(UI thread)下发的请求。再例如,关键访问请求也可以为非UI线程下发,但会引起UI线程同步等待的请求。可以理解的,由于关键访问请求为导致UI线程同步等待的访问请求,因此关键访问请求被阻塞时,会引起系统慢卡顿,影响用户体验。
可选的,上述导致UI线程同步等待的访问请求可以为缺页中断(pagefault)对应的访问请求。也就是说,pagefault对应的访问请求可以为关键访问请求。
可选的,上述多个访问请求中除关键访问请求以外的请求可以称为非关键访问请求,该非关键访问请求为不会导致UI线程同步等待的访问请求。也就是说,上述OS接收的多个访问请求可以包括关键访问请求和非关键访问请求。
示例性的,上述步骤S301中的OS是管理和控制计算机硬件与软件资源的计算机程序,是直接运行在“裸机”上的最基本的系统软件,用于支持其他软件,例如各种应用程序的运行。本申请实施例中OS可以为各种操作系统,例如,Windows操作系统、Linux操作系统、iOS操作系统,Android开源操作系统等操作系统。本申请实施例对于OS的具体类型并不限定,在此仅是示例性说明。
S302、OS在多个访问请求中识别关键访问请求,并在关键访问请求中添加第一标识,在多个访问请求中除关键访问请求以外的访问请求中添加第二标识。
可以理解的,上述步骤S302中的OS可以运行在处理器上,通过处理器在多个访问请求中识别关键访问请求,并在关键访问请求中添加第一标识,在多个访问请求中 除关键访问请求以外的访问请求中添加第二标识。
示例性的,上述OS识别关键访问请求可以包括:OS识别缺页中断(pagefault)对应的访问请求,该访问请求为关键访问请求。
可选的,上述步骤S302中具体可以由文件系统(file system,FS)层从前台应用发送的多个访问请求中识别关键访问请求,并在关键访问请求中添加第一标识。例如,如图4所示,OS运行在处理器上,可以由OS中的FS层识别关键访问请求,并在关键访问请求中添加第一标识,在非关键访问请求中添加第二标识。
上述第一标识的优先级高于第二标识的优先级。例如,第一标识为CP+,第二标识为CP,CP+的优先级高于CP的优先级。本申请实施例对于第一标识和第二标识的具体形式并不限定,在此仅以第一标识为CP+,第二标识为CP进行示例性说明。
示例性的,OS在关键访问请求中添加第一标识,在非关键访问请求中添加第二标识,从而使得关键访问请求的优先级高于非关键访问请求的优先级。例如,第一访问请求为关键访问请求,第二访问请求为非关键访问请求,在第一访问请求中添加CP+标识,在第二访问请求中添加CP标识,由于CP+的优先级高于CP的优先级,因此第一访问请求的优先级高于第二访问请求的优先级。
可以理解的,本申请实施例通过在关键访问请求中添加第一标识,在非关键访问请求中添加第二标识,从而使得关键访问请求的优先级高于非关键访问请求的优先级。即本申请实施例的方法对于前台应用发送的多个访问请求划分了不同的优先级,从而使得前台应用发送的多个访问请求中的关键访问请求可以被优先处理,缓解了关键访问请求被阻塞造成慢卡顿的问题,提升了用户体验。
需要说明的是,采用本申请实施例的方案后,访问请求可以被划分为三个优先级,包括添加第一标识的访问请求、添加第二标识的访问请求,以及不添加标识的访问请求,其中,添加第一标识的访问请求的优先级高于添加第二标识的访问请求的优先级,添加第二标识的访问请求的优先级高于不添加标识的访问请求的优先级。可以理解的,通过三级优先级可以对接复杂多任务下的优先级调度。
可选的,上述添加第一标识的访问请求和添加第二标识的访问请求为前台应用发送的访问请求,不添加标识的访问请求可以为后台应用发送的访问请求。后台应用是指在终端设备的后台运行的应用,即后台应用是用户看不到,但却在运行的应用。例如,用户在前台使用微信应用时,腾讯视频应用在后台下载视频,腾讯视频应用为后台应用,微信应用为前台应用。
例如,如图4所示,用户发送的访问请求可以被划分为三个优先级,分别为前台应用发送的关键访问请求,前台应用发送的非关键访问请求,以及后台应用发送的访问请求。其中,前台应用发送的关键访问请求中添加第一标识,前台应用发送的非关键访问请求中添加第二标识,后台应用发送的访问请求不添加标识,故前台应用发送的关键访问请求的优先级高于前台应用发送的非关键访问请求,前台应用发送的非关键访问请求的优先级高于后台应用发送的访问请求。
(可选的)S303、OS在关键访问请求中添加第二标识。
上述步骤S303中的OS可以运行在处理器上,通过处理器在关键访问请求中添加第二标识。
可以理解的,步骤S302是在前台应用发送的多个访问请求中除关键访问请求以外的访问请求中添加第二标识,步骤S303是在前台应用发送的关键访问请求中添加第二标识,结合步骤S302和S303可知,OS可以在前台应用发送的所有访问请求中均添加第二标识。
可选的,OS可以在前台应用发送的所有访问请求中添加第二标识,并在关键访问请求中添加第一标识。例如,OS在前台应用发送的所有访问请求中添加CP标识,OS识别关键访问请求后,在关键访问请求中再添加CP+标识。即关键访问请求中可以既包括CP标识,又包括CP+标识。
可以理解的,当关键访问请求中既包括第一标识又包括第二标识时,关键访问请求的优先级与优先级较高的标识的优先级对应,即关键访问请求的优先级与第一标识的优先级对应。例如,关键访问请求中既包括CP标识,又包括CP+标识,非关键访问请求中仅包括CP标识时,由于CP+标识的优先级高于CP标识,故关键访问请求的优先级高于非关键访问请求的优先级。
本申请实施例对于步骤S302和S303的先后执行顺序并不限定。可选的,OS可以在识别关键访问请求之前,在前台应用发送的多个访问请求中添加第二标识,OS识别关键访问请求后,再在关键访问请求中添加第一标识。可选的,OS也可以在识别关键访问请求后,在关键访问请求中添加第一标识和第二标识,在非关键访问请求中添加第二标识。
S304、OS向存储设备发送多个访问请求。
可以理解的,上述步骤S304中的OS可以运行在处理器上,通过处理器向存储设备发送多个访问请求。可选的,该存储设备为片外存储设备。
示例性的,OS向存储设备发送的多个访问请求中包括第一标识和/或第二标识。例如,OS向存储设备发送的多个访问请求中的关键访问请求中包括第一标识,非关键访问请求中包括第二标识。再例如,OS向存储设备发送的多个访问请求中的关键访问请求中包括第一标识和第二标识,非关键访问请求中包括第二标识。
示例性的,OS向存储设备发送多个访问请求,可以包括:OS基于第一标识,优先向存储设备发送关键访问请求。例如,如图4所示,OS中的IO调度层可以针对FS文件系统下发的包括有第一标识的关键访问请求开放“绿色通道”,优先发送关键访问请求,确保其能够以最快速度到达存储设备。
示例性的,上述存储设备可以为易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM),也可以为非易失性存储器(non-volatile memory),快闪存储器(flash memory),硬盘(hard fisk drive,HDD)、固态硬盘SSD、通用存储设备UFS或其他存储设备。可选的,上述存储设备还可以为上述多种存储器的组合。
可以理解的,本申请实施例通过识别前台应用发送的多个访问请求,在关键访问请求中添加第一标识,在非关键访问请求中添加第二标识,使得关键访问请求的优先级高于非关键访问请求的优先级,从而在向存储设备发送多个访问请求时,可以优先发送关键访问请求,以提高关键访问请求的处理速度,改善因关键访问请求被阻塞造成慢卡顿的现象,提升了用户体验。
S305、存储设备接收多个访问请求。
可以理解的,步骤S305中存储设备可以接收来自处理器的多个访问请求。该多个访问请求为前台应用发送的访问请求。可选的,步骤S305可以由存储设备中的接口电路执行,即存储设备中的接口电路接收来自处理器的多个访问请求。
可选的,上述步骤S305中存储设备接收的多个访问请求为前台应用发送的访问请求,而且该访问请求已经经过处理器识别,并在关键访问请求中添加第一标识,在非关键访问请求中添加第二标识。也就是说,步骤S305中存储设备接收的多个访问请求为已经添加第一标识和/或第二标识的访问请求。
一种实现方式中,存储设备接收的关键访问请求中包括第一标识,非关键访问请求中包括第二标识。
另一种实现方式中,存储设备接收的关键访问请求中包括第一标识和第二标识,非关键访问请求中包括第二标识。
S306、存储设备基于第一标识,优先响应关键访问请求。
可选的,上述步骤S306可以由存储设备中的存储介质执行,即存储介质基于第一标识,优先响应关键访问请求。
示例性的,存储设备可以基于访问请求中包括的第一标识,确定该访问请求为关键访问请求,并优先响应该关键访问请求。
可选的,存储设备优先响应关键访问请求可以包括:存储设备基于第一标识,按照优先级顺序调整待处理队列中的访问请求。例如,存储设备待处理队列中的请求包括请求1、请求2和请求3,请求1、请求2和请求3中均仅包括CP标识,存储设备接收请求4后,由于请求4中包括CP+标识,存储设备根据CP+标识,将待处理队列调整为请求4、请求1、请求2和请求3。
示例性的,存储设备基于第一标识,优先响应关键访问请求,包括:存储设备基于第一标识,若确定存储设备正在处理的访问请求的优先级低于关键访问请求的优先级,存储设备确定不对正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作进行处理,并响应关键访问请求。该正在处理的访问请求中除保证存储设备正常运转的操作以外的其他操作包括:数据垃圾回收(Garbage Collection,GC)、表项GC、表项管理、物理块擦除、异常处理或大IO写操作中的一种或多种。可以理解的,在存储设备侧,关键访问请求具有最高优先级,在存储设备正在处理的访问请求为非关键访问请求时,存储设备仅对正在处理的访问请求中保证存储设备正常运转的操作进行处理,对于额外操作(除保证存储设备正常运转的操作以外的其他操作)不进行处理,从而能够以最快速度处理完正在处理的访问请求,并响应关键访问请求,因此能够减小关键访问请求的同步等待时间。
可选的,上述低于关键访问请求的优先级的访问请求可以为仅包括第二标识的访问请求,也可以为不包括第一标识和第二标识的访问请求。
例如,以存储设备正在处理的访问请求为第三访问请求,第三访问请求中仅包括CP标识为例,存储设备接收包括CP+标识的关键访问请求后,基于CP+标识,存储设备仅处理第三访问请求中能够保证存储系统正常运转的操作(例如,维护闪存转换层(flash translation layer,FTL)表项等操作),以确保读写基本操作完成,对于第三访 问请求中如GC、表项管理、异常处理等额外长耗时操作暂时不做处理,从而能够以最快速度响应关键访问请求,减小关键访问请求的同步等待时间。
可以理解的,本申请实施例提供的响应用户访问请求的方法,通过在前台应用发送的关键访问请求中添加第一标识,在前台应用发送的非关键访问请求中添加第二标识,第一标识的优先级高于第二标识的优先级,使得前台应用发送的关键访问请求的优先级高于非关键访问请求的优先级,从而存储设备在响应用户发送的访问请求时,可以优先响应优先级较高的关键访问请求,因此改善了前台应用发送的关键访问请求被前台应用发送的非关键访问请求阻塞的问题,提升了用户体验。而且本方案可以以最快速度响应关键访问请求,减小关键访问请求的同步等待时间。
上述主要从方法步骤的角度对本发明实施例提供的方案进行了介绍。可以理解的是,计算机为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件和计算机软件的结合形式来实现。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本申请实施例可以根据上述方法示例对计算机进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图5示出了一种响应用户访问请求的装置500的结构示意图,该响应用户访问请求的装置可以包括处理器501和存储器502,该存储器502与处理器501耦合。
示例性的,处理器501用于对响应用户访问请求的装置500的动作进行控制管理,例如,处理器501用于支持响应用户访问请求的装置500执行图3中的S301-S304,和/或用于本文所描述的技术的其它过程。该存储器502用于存储响应用户访问请求的装置500执行上文所提供的任一响应用户访问请求的方法所对应的程序代码和数据。该存储器502可以为只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
可以理解的,图5中的存储器502与图3中的存储设备不同,图5中的存储器502为片内存储设备,该存储器502与处理器501耦合,可以与处理器501集成在SoC上。而图3中的存储设备为片外存储设备,例如,可以为UFS、SSD等位于片外的存储器。
图6示出了一种存储设备600的结构示意图,该存储设备600包括:接口电路601和存储介质602。
示例性的,接口电路601可用于支持存储设备600执行例如图3中的步骤S305,和/或用于本文所描述的技术的其它过程。存储介质602用于执行例如图3中的步骤S306,和/或用于本文所描述的技术的其它过程。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
图7为本申请实施例提供的一种终端,如图7所示,该终端可以包括处理器和存储设备,该处理器用于执行图3中S301-S304,存储设备用于执行图3中S305-S306。该存储设备为片外存储设备。示例性的,该终端可以为手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等终端设备,本申请实施例对该终端的具体形态不作特殊限制。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行图3所示的响应用户访问请求的方法。
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行图3所示的响应用户访问请求的方法。
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于核心网接口设备中。当然,处理器和存储介质也可以作为分立组件存在于核心网接口设备中。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机可读存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (19)

  1. 一种响应用户访问请求的方法,其特征在于,所述方法包括:
    存储设备接收来自前台应用的多个访问请求;所述多个访问请求包括关键访问请求,所述关键访问请求为导致用户界面UI线程同步等待的访问请求,所述关键访问请求中包括第一标识,所述多个访问请求中除所述关键访问请求以外的访问请求中包括第二标识,所述第一标识的优先级高于所述第二标识的优先级;
    所述存储设备基于所述第一标识,优先响应所述关键访问请求。
  2. 根据权利要求1所述的方法,其特征在于,所述存储设备基于所述第一标识,优先响应所述关键访问请求,包括:
    所述存储设备基于所述第一标识,若确定所述存储设备正在处理的访问请求的优先级低于所述关键访问请求的优先级,所述存储设备确定不对所述正在处理的访问请求中除保证所述存储设备正常运转的操作以外的其他操作进行处理,并响应所述关键访问请求。
  3. 根据权利要求2所述的方法,其特征在于,所述正在处理的访问请求中除保证所述存储设备正常运转的操作以外的其他操作包括:数据垃圾回收GC、表项GC、表项管理、物理块擦除、异常处理或大输入输出IO写操作中的一种或多种。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述关键访问请求为缺页中断对应的访问请求。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述关键访问请求中还包括所述第二标识。
  6. 一种响应用户访问请求的方法,其特征在于,所述方法包括:
    接收来自前台应用的多个访问请求;
    在所述多个访问请求中识别关键访问请求,并在所述关键访问请求中添加第一标识,在所述多个访问请求中除所述关键访问请求以外的访问请求中添加第二标识;所述关键访问请求为导致用户界面UI线程同步等待的访问请求;所述第一标识的优先级高于所述第二标识的优先级;
    向存储设备发送所述多个访问请求。
  7. 根据权利要求6所述的方法,其特征在于,所述关键访问请求为缺页中断对应的访问请求。
  8. 根据权利要求6或7所述的方法,其特征在于,所述向存储设备发送所述多个访问请求,包括:
    基于所述第一标识,优先向所述存储设备发送所述关键访问请求。
  9. 根据权利要求6-8中任一项所述的方法,其特征在于,所述方法还包括:
    在所述关键访问请求中添加所述第二标识。
  10. 一种存储设备,其特征在于,所述存储设备包括:
    接口电路,用于接收来自前台应用的多个访问请求;所述多个访问请求包括关键访问请求,所述关键访问请求为导致用户界面UI线程同步等待的访问请求,所述关键访问请求中包括第一标识,所述多个访问请求中除所述关键访问请求以外的访问请求中包括第二标识,所述第一标识的优先级高于所述第二标识的优先级;
    存储介质,用于基于所述第一标识,优先响应所述关键访问请求。
  11. 根据权利要求10所述的存储设备,其特征在于,所述存储介质,具体用于基于所述第一标识,若确定所述存储介质正在处理的访问请求的优先级低于所述关键访问请求的优先级,所述存储介质确定不对所述正在处理的访问请求中除保证所述存储设备正常运转的操作以外的其他操作进行处理,并响应所述关键访问请求。
  12. 根据权利要求11所述的存储设备,其特征在于,所述正在处理的访问请求中除保证所述存储设备正常运转的操作以外的其他操作包括:数据垃圾回收GC、表项GC、表项管理、物理块擦除、异常处理或大输入输出IO写操作中的一种或多种。
  13. 根据权利要求10-12中任一项所述的存储设备,其特征在于,所述关键访问请求为缺页中断对应的访问请求。
  14. 根据权利要求10-13中任一项所述的存储设备,其特征在于,所述关键访问请求中还包括所述第二标识。
  15. 一种响应用户访问请求的装置,其特征在于,所述装置包括处理器和第一存储器,所述第一存储器与所述处理器耦合;其中,
    所述处理器,用于接收来自前台应用的多个访问请求;
    所述处理器,还用于在所述多个访问请求中识别关键访问请求,并在所述关键访问请求中添加第一标识,在所述多个访问请求中除所述关键访问请求以外的访问请求中添加第二标识;所述关键访问请求为导致用户界面UI线程同步等待的访问请求;所述第一标识的优先级高于所述第二标识的优先级;
    所述处理器,还用于向第二存储器发送所述多个访问请求。
  16. 根据权利要求15所述的装置,其特征在于,所述关键访问请求为缺页中断对应的访问请求。
  17. 根据权利要求15或16所述的装置,其特征在于,所述处理器,具体用于基于所述第一标识,优先向所述存储设备发送所述关键访问请求。
  18. 根据权利要求15-17中任一项所述的装置,其特征在于,所述处理器,还用于在所述关键访问请求中添加所述第二标识。
  19. 一种终端,其特征在于,所述终端包括处理器和存储设备,所述处理器用于执行如权利要求6-9中任一项所述的响应用户访问请求的方法,所述存储设备用于执行如权利要求1-5中任一项所述的响应用户访问请求的方法。
PCT/CN2020/119023 2020-09-29 2020-09-29 一种响应用户访问请求的方法、装置和存储设备 WO2022067564A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080104380.7A CN116097682A (zh) 2020-09-29 2020-09-29 一种响应用户访问请求的方法、装置和存储设备
PCT/CN2020/119023 WO2022067564A1 (zh) 2020-09-29 2020-09-29 一种响应用户访问请求的方法、装置和存储设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/119023 WO2022067564A1 (zh) 2020-09-29 2020-09-29 一种响应用户访问请求的方法、装置和存储设备

Publications (1)

Publication Number Publication Date
WO2022067564A1 true WO2022067564A1 (zh) 2022-04-07

Family

ID=80949387

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/119023 WO2022067564A1 (zh) 2020-09-29 2020-09-29 一种响应用户访问请求的方法、装置和存储设备

Country Status (2)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984655A (zh) * 2014-04-29 2014-08-13 三星半导体(中国)研究开发有限公司 数据访问的处理方法和装置
CN104636077A (zh) * 2013-11-15 2015-05-20 中国电信股份有限公司 用于虚拟机的网络块设备存储系统与方法
CN105550037A (zh) * 2015-12-11 2016-05-04 北京元心科技有限公司 多系统中分配音频资源的方法及装置
CN105744504A (zh) * 2016-03-31 2016-07-06 中国联合网络通信集团有限公司 终端与卡应用的通信方法和终端
US20180300245A1 (en) * 2017-04-17 2018-10-18 EMC IP Holding Company LLC Method, device and computer readable storage media for managing storage system
US20190005176A1 (en) * 2017-06-30 2019-01-03 Intel Corporation Systems and methods for accessing storage-as-memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636077A (zh) * 2013-11-15 2015-05-20 中国电信股份有限公司 用于虚拟机的网络块设备存储系统与方法
CN103984655A (zh) * 2014-04-29 2014-08-13 三星半导体(中国)研究开发有限公司 数据访问的处理方法和装置
CN105550037A (zh) * 2015-12-11 2016-05-04 北京元心科技有限公司 多系统中分配音频资源的方法及装置
CN105744504A (zh) * 2016-03-31 2016-07-06 中国联合网络通信集团有限公司 终端与卡应用的通信方法和终端
US20180300245A1 (en) * 2017-04-17 2018-10-18 EMC IP Holding Company LLC Method, device and computer readable storage media for managing storage system
US20190005176A1 (en) * 2017-06-30 2019-01-03 Intel Corporation Systems and methods for accessing storage-as-memory

Also Published As

Publication number Publication date
CN116097682A8 (zh) 2023-07-21
CN116097682A (zh) 2023-05-09

Similar Documents

Publication Publication Date Title
US11531625B2 (en) Memory management method and apparatus
US11411885B2 (en) Network-accessible data volume modification
WO2017054610A1 (zh) 计算机、服务质量控制方法及装置
US8495262B2 (en) Using a table to determine if user buffer is marked copy-on-write
CN102945215A (zh) 信息处理设备和方法
US20110202918A1 (en) Virtualization apparatus for providing a transactional input/output interface
US20140201306A1 (en) Remote direct memory access with reduced latency
CN114168271B (zh) 一种任务调度方法、电子设备及存储介质
WO2021238702A1 (zh) 一种任务的调度方法、计算设备及存储介质
US11010094B2 (en) Task management method and host for electronic storage device
US20220253252A1 (en) Data processing method and apparatus
US20190026142A1 (en) Information processing apparatus, control method and storage medium
CN110445580B (zh) 数据发送方法及装置、存储介质、电子装置
WO2022067564A1 (zh) 一种响应用户访问请求的方法、装置和存储设备
Kim et al. Fast i/o: Qos supports for urgent i/os in nvme ssds
CN106933646B (zh) 一种创建虚拟机的方法及装置
KR20180011255A (ko) 파일에 접근하기 위한 방법과 장치, 및 저장 시스템
US8984336B1 (en) Systems and methods for performing first failure data captures
US10284501B2 (en) Technologies for multi-core wireless network data transmission
US8850443B2 (en) Asynchronous input/output (I/O) using alternate stack switching in kernel space
US11606437B2 (en) System and method for boosting up performance of NVMe-TCP transport
US20190104017A1 (en) Accelerating machine learning and profiling over a network
CN111274176B (zh) 一种信息处理方法、电子设备、系统及存储介质
US9176910B2 (en) Sending a next request to a resource before a completion interrupt for a previous request
CN110764710A (zh) 低延迟高iops的数据访问方法与存储系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20955589

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202080104380.7

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20955589

Country of ref document: EP

Kind code of ref document: A1