IO scheduling method and device, electronic equipment and storage medium

By dynamically selecting the IO scheduler, the problem that a fixed IO scheduling strategy cannot cover all application scenarios is solved, and the system can be operated stably, improve IO throughput and reduce delay time is achieved.

CN119938292APending Publication Date: 2025-05-06BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311467639.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, fixed IO scheduling strategies cannot cover all application scenarios, resulting in unreasonable IO scheduling order, affecting the smoothness of the application software, such as game stuttering.

Method used

By obtaining the target parameters of the application process, inputting the pre-trained neural network model, obtaining the process category, and dynamically selecting the corresponding scheduler for IO scheduling.

Benefits of technology

It avoids interactive stuttering caused by heavy I/O load during startup, ensures stable system operation, improves IO throughput and reduces latency, thereby maximizing system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938292A_ABST
    Figure CN119938292A_ABST
Patent Text Reader

Abstract

The invention relates to an IO scheduling method and device, electronic equipment and a storage medium. The method comprises the steps that target parameters of an application process are obtained; inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model; selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler; and the IO corresponding to the application process is scheduled through the target scheduler. According to the method, the scheduler can be dynamically switched to perform IO scheduling on the application process, so that interaction jamming caused by re-I / O load in the starting process of the application process can be avoided, stable operation of the system is ensured, IO throughput can be improved, delay time can be shortened, and the performance of the system can be played to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of embedded computer systems, and in particular to an IO scheduling method, device, electronic device and storage medium. Background Art

[0002] To ensure the stability of the mobile terminal system, the Linux kernel is used as the underlying code, and IO task operations are performed through a fixed IO scheduling strategy. However, the fixed IO scheduling strategy cannot cover all application scenarios, and there are cases where the IO scheduling order is unreasonable. For example, when a mobile terminal runs multiple applications at the same time, there will be an unreasonable IO scheduling order, resulting in an unsmooth operation of the application software, such as lag in games. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an IO scheduling method, device, electronic device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an IO scheduling method, including:

[0005] Get the target parameters of the application process;

[0006] Inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model;

[0007] Selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler;

[0008] The target scheduler is used to schedule the IO corresponding to the application process.

[0009] Optionally, inputting the target parameter into a pre-trained neural network model to obtain the process category output by the neural network model includes:

[0010] Inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model;

[0011] The step of selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler includes:

[0012] A scheduler corresponding to the process category weight is selected from a plurality of pre-configured schedulers as a target scheduler, wherein each pre-configured scheduler is preset with a corresponding weight.

[0013] Optionally, inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model includes:

[0014] According to the target parameter, setting a budget variable corresponding to the application process;

[0015] Determine the number of accesses to the disk by the application process according to the budget variable and a preset tag value of the disk;

[0016] The process category weight output by the neural network model is obtained according to the budget variable and the tag value corresponding to the currently accessed disk.

[0017] Optionally, the method further comprises:

[0018] Determining, according to the process category weight, a growth rate of the budget variable when the application process accesses the disk, wherein the growth rate is negatively correlated with the process category weight;

[0019] When the application process newly accesses the disk, the budget variable of the application process is controlled to grow according to the growth rate.

[0020] Optionally, obtaining target parameters of the application process includes:

[0021] Obtaining metadata of the application process;

[0022] Key value extraction is performed on the metadata to obtain target parameters of the application process.

[0023] Optionally, the target parameter includes at least one of the following:

[0024] IO status, where the IO status is used to indicate whether the application process is in a read / write state and / or the corresponding ratio of read to write;

[0025] The priority of the application process;

[0026] Priority of read and write requests;

[0027] The shared bandwidth of application processes in the storage system;

[0028] Request an immediate response;

[0029] Memory access frequency.

[0030] Optionally, the preconfigured scheduler includes more than one of the following:

[0031] Kyber scheduler, none scheduler, BFQ scheduler, MQ-Deadline scheduler, Deadline scheduler.

[0032] According to a second aspect of an embodiment of the present disclosure, an IO scheduling device is provided, including:

[0033] A parameter acquisition module is configured to acquire target parameters of the application process;

[0034] A parameter input module is configured to input the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model;

[0035] A selection module is configured to select a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler;

[0036] The scheduling module is configured to schedule the IO corresponding to the application process through the target scheduler.

[0037] Optionally, the parameter input module is configured as follows:

[0038] Inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model;

[0039] The selection module is configured to:

[0040] A scheduler corresponding to the process category weight is selected from a plurality of pre-configured schedulers as a target scheduler, wherein each pre-configured scheduler is preset with a corresponding weight.

[0041] Optionally, the parameter input module is configured as follows:

[0042] According to the target parameter, setting a budget variable corresponding to the application process;

[0043] Determine the number of accesses to the disk by the application process according to the budget variable and a preset tag value of the disk;

[0044] The process category weight output by the neural network model is obtained according to the budget variable and the tag value corresponding to the currently accessed disk.

[0045] Optionally, the device further comprises: a control module configured to:

[0046] Determining, according to the process category weight, a growth rate of the budget variable when the application process accesses the disk, wherein the growth rate is negatively correlated with the process category weight;

[0047] When the application process newly accesses the disk, the budget variable of the application process is controlled to grow according to the growth rate.

[0048] Optionally, the parameter acquisition module is configured to:

[0049] Obtaining metadata of the application process;

[0050] Key value extraction is performed on the metadata to obtain target parameters of the application process.

[0051] Optionally, the target parameter includes at least one of the following:

[0052] IO status, where the IO status is used to indicate whether the application process is in a read / write state and / or the corresponding ratio of read to write;

[0053] The priority of the application process;

[0054] Priority of read and write requests;

[0055] The shared bandwidth of application processes in the storage system;

[0056] Request an immediate response;

[0057] Memory access frequency.

[0058] Optionally, the preconfigured scheduler includes more than one of the following:

[0059] Kyber scheduler, none scheduler, BFQ scheduler, MQ-Deadline scheduler, Deadline scheduler.

[0060] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0061] processor;

[0062] a memory for storing processor-executable instructions;

[0063] Wherein, the processor is configured to:

[0064] Get the target parameters of the application process;

[0065] Inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model;

[0066] Selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler;

[0067] The target scheduler is used to schedule the IO corresponding to the application process.

[0068] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0069] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0070] By obtaining the target parameters of the application process; inputting the target parameters into the pre-trained neural network model to obtain the process category weight output by the neural network model; selecting the scheduler corresponding to the process category weight as the target scheduler from multiple pre-configured schedulers; and scheduling the IO corresponding to the application process through the target scheduler. The scheduler can be dynamically switched to perform IO scheduling for the application process, which can not only avoid the interaction jamming caused by heavy I / O load during the startup of the application process, thereby ensuring the stable operation of the system, but also improve the IO throughput and reduce the delay time, thereby maximizing the performance of the system.

[0071] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0073] Figure 1 The figure is a flowchart of an IO scheduling method according to an exemplary embodiment.

[0074] Figure 2 The diagram is a schematic diagram of an IO scheduling system structure according to an exemplary embodiment.

[0075] Figure 3 It is a schematic diagram of another IO scheduling system structure according to an exemplary embodiment.

[0076] Figure 4 The figure is a block diagram of an IO scheduling device according to an exemplary embodiment.

[0077] Figure 5 The invention is a block diagram of a device for IO scheduling according to an exemplary embodiment. DETAILED DESCRIPTION

[0078] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0079] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0080] Before introducing an IO scheduling method, device, electronic device and storage medium provided by the present application, the technical solutions and defects involved in the relevant scenarios are introduced. In the relevant scenarios, the IO (Input / Output interface) of the application process is scheduled through a preset scheduler. For example, when the application process sends an IO scheduling request, it is necessary to wait for the IO scheduling request to be completed before sending the next IO scheduling request. If the current application process expires during the waiting period, and then the IO scheduling request of other application processes is executed, this will affect the throughput of the current application process, there is a problem of unreasonable IO scheduling, and it is impossible to take into account both IO throughput and IO delay time at the same time.

[0081] In view of this, the present disclosure provides an IO scheduling method, which aims to avoid lag while improving IO throughput and reducing delay time, thereby ensuring stable system operation and maximizing the system performance of the mobile terminal.

[0082] Figure 1 is a flowchart of an IO scheduling method according to an exemplary embodiment. Figure 1 As shown, this method can be applied to any embedded system device, such as embedded computer system, smart home appliance, car system, etc. Figure 1 As shown, the method includes the following steps.

[0083] In step S11, the target parameters of the application process are obtained.

[0084] In the disclosed embodiment, the target parameters of the application process can be obtained from the application layer. The application layer includes the currently executing application and related metadata. The target parameters of the current application process can be obtained by extracting feature values.

[0085] In step S12, the target parameter is input into a pre-trained neural network model to obtain the process category output by the neural network model.

[0086] In the embodiment of the present disclosure, the neural network model may be a classification model having an input layer, a hidden layer, and an output layer, and then the application process may be classified according to the target parameter to obtain the process category of the application process.

[0087] Among them, the process categories can include access-intensive processes, batch processes, and interactive processes. Among them, interactive processes can be processes started by the shell, which can run in the foreground or in the background. During the execution of the interactive process, it is required to interact with the user. In simple terms, the user needs to give certain parameters or information before the process can continue to execute. For example, the user chooses to confirm or return and other interactive operations. Batch processes include multiple application process sequences. By selecting a suitable target scheduler, you can ensure that the interactive process responds quickly, and you can also ensure the high throughput of batch processes as much as possible.

[0088] In step S13, a scheduler corresponding to the process category is selected from a plurality of pre-configured schedulers as a target scheduler.

[0089] Among them, see Figure 2 As shown, the pre-configured scheduler can be an IO scheduler, which is located between the general block layer and the block device driver layer. The general block layer is connected to the mapping layer upward, and a disk (flash memory) file system can be configured in the mapping layer. The mapping layer is connected to the disk cache, and the disk cache is connected to the VFC virtual file system upward. The block device driver can be connected to the physical disk, and thus the scheduler plays an important role in connecting the upper-layer software and the underlying driver.

[0090] In the disclosed embodiment, the application process can retain the target scheduler used in the last IO scheduling, and then determine whether the target scheduler obtained in the last IO scheduling is the same as the target scheduler obtained this time, so as to determine whether it is necessary to switch the scheduler. For example, if the target scheduler obtained in the last IO scheduling is the same as the target scheduler obtained this time, there is no need to switch the scheduler, and the IO scheduling is directly performed through the original scheduler; if the target scheduler obtained in the last IO scheduling is different from the target scheduler obtained this time, it is necessary to switch the scheduler, and switch the original scheduler to the target scheduler obtained this time for IO scheduling.

[0091] In the disclosed embodiment, the application process performs IO scheduling by a scheduler by default, and then determines whether the default scheduler is the same as the target scheduler obtained this time, so as to determine whether the scheduler needs to be switched.

[0092] In step S14, the target scheduler is used to schedule the IO corresponding to the application process.

[0093] In one possible implementation, if the application process is abnormally interrupted during an IO call, the IO state is restored to ensure the stability of the system and avoid direct freezing.

[0094] In one possible implementation, the pre-configured schedulers may include multiple of the following: Kyber scheduler, none scheduler, BFQ scheduler, MQ-Deadline scheduler, and Deadline scheduler. By dynamically switching between multiple pre-configured schedulers, the overall interactive application of the embedded system can be quickly responded to. In addition, the flexibility of IO scheduling is greatly improved, which effectively reduces the waiting delay of the application process, reduces the sense of lag in the application, and improves the user experience.

[0095] For example, when the application process is an access-intensive process, the Deadline scheduler can be used as the target scheduler. When the application process is a daemon process and runs in the system sleep state, the none scheduler can be used as the target scheduler. By first determining the computation and data dependencies of the neural network, and establishing the relationship between the application thread and the memory management scheduling thread, the application process category is obtained, and then the application process category result is fed back to the underlying dynamic scheduling environment to trigger the dynamic scheduler switch.

[0096] For example, when the target scheduler is a BFQ scheduler, the BFQ scheduler can convert an I / O out-of-order I / O scheduling into an ordered I / O operation. For example, the BFQ scheduler can receive an IO scheduling request from an application process, and then obtain the characteristic value of the process corresponding to the IO scheduling request. According to whether the characteristic value meets the preset conditions, the IO scheduling request is placed in an interactive dispatch queue to wait for completion or in other queues. The IO scheduler in the BFQ scheduler is responsible for maintaining the order of the queue to more efficiently utilize the physical storage medium. Then, it is determined how many requests there are in the queue, and then the requests in the interactive dispatch queue are dispatched until the number of dispatched requests reaches a first value, the number of dispatched requests is cleared and the dispatched requests are waited for completion, and then the requests in other queues are dispatched until the number of dispatched requests reaches a second value, the number of dispatched requests is cleared and the dispatched requests are waited for completion, and the step of dispatching the requests in the interactive dispatch queue is returned.

[0097] It can be explained that selecting the BFQ scheduler as the target scheduler reduces the number of IO accesses and data throughput, and further saves the life of the flash memory and battery life. It is fair to each IO scheduling request, and the IO scheduling request of each application process can be responded to as soon as possible, so that it will not be shelved for a long time, and the IO scheduling request can be responded to as soon as possible. Therefore, when multiple application processes issue multiple IO scheduling requests at the same time, the IO scheduling requests of each application process can be responded to in a timely manner, which improves the response speed and reduces the random access delay.

[0098] Another example, when the target scheduler is the none scheduler, the none scheduler operates all IO scheduling requests in a first-come-first-served order. In some cases, adjacent IO scheduling requests can be simply merged into one IO scheduling request. However, if the read and write operations are frequent, the efficiency will be reduced. Therefore, whether to select the none scheduler as the target scheduler will be determined based on the memory access frequency of the application process. For the use of flash memory as the storage medium of embedded devices, based on the physical structure of the flash memory device, the none scheduler can be selected as the target scheduler, and then the data addressing can be read through some standardized commands, and the IO scheduling requests can be directly executed in sequence regardless of the addressing time, thereby shortening the access time, reducing the delay time, and significantly improving the performance.

[0099] Another example, when the target scheduler is the deadline scheduler, the deadline scheduler can use the expiration time to sort the IO scheduling order, ensuring that the first IO scheduling request has the shortest delay time, giving read operations a higher priority than write operations, ensuring that requests are serviced within a deadline. Usually the deadline is adjustable, and the default read deadline is shorter than the write deadline, which can prevent write operations from starving because they cannot be read. It can ensure that the first IO scheduling request has the shortest delay, and data reading has a higher priority than data writing, which can greatly improve jams. Using Linux swap partitions on flash memory can best utilize flash memory read and write performance.

[0100] The above technical solution obtains the target parameters of the application process; inputs the target parameters into a pre-trained neural network model to obtain the process category weight output by the neural network model; selects a scheduler corresponding to the process category weight as the target scheduler from multiple pre-configured schedulers; and schedules the IO corresponding to the application process through the target scheduler. The scheduler can be dynamically switched to perform IO scheduling for the application process, which can not only avoid the interaction jamming caused by heavy I / O load during the startup of the application process, thereby ensuring the stable operation of the system, but also improve the IO throughput and reduce the delay time, thereby maximizing the performance of the system.

[0101] Optionally, in step S12, inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model includes:

[0102] Inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model;

[0103] Among them, the process category weight can represent the probability that the application process is of any application process category. Since each application process is not a single type of application process, the neural network model can output the process category weight of the application process for each process category. The neural network model can also output the maximum process category weight of the application process.

[0104] It can be understood that the neural network model is a deep neural network, and the target parameters are used as learning samples of (input layer, hidden layer, output layer), and the probability of the application process being any application process category can be determined each time according to the target parameters.

[0105] In step S13, selecting a scheduler corresponding to the process category as a target scheduler from a plurality of pre-configured schedulers includes:

[0106] A scheduler corresponding to the process category weight is selected from a plurality of pre-configured schedulers as a target scheduler, wherein each pre-configured scheduler is preset with a corresponding weight.

[0107] In the disclosed embodiment, a weight range may be corresponding to different schedulers, and then when the process category weight falls within the weight range of the scheduler, the scheduler is selected as the target scheduler. The weight range may be set according to the throughput and access delay of different types of application processes.

[0108] Optionally, inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model includes:

[0109] According to the target parameter, a budget variable corresponding to the application process is set.

[0110] The budget variable is used to determine the amount of data required by an application process to complete a data request. Some application processes only require a small amount of budget variables to complete data requests, while some application processes require a large amount of budget to complete data requests. When each application process is scheduled for execution, the budget variable can control the maximum number of disk sectors that the application process can access.

[0111] The number of disk accesses by the application process is determined according to the budget variable and a preset tag value of the disk.

[0112] The tag value can be a pure number or a string, which is used to represent the budget variable required to access the disk.

[0113] The process category weight output by the neural network model is obtained according to the budget variable and the tag value corresponding to the currently accessed disk.

[0114] Whenever an application process accesses a disk sector, the budget variable can be subtracted from the tag value of the accessed disk, so as to determine how much budget variable the application process needs to access other disks.

[0115] Optionally, the method further comprises:

[0116] The growth rate of the budget variable when the application process accesses the disk is determined according to the process category weight, wherein the growth rate is negatively correlated with the process category weight.

[0117] In the disclosed embodiment, the greater the process category weight, the smaller the budget variable growth when the corresponding application process newly accesses the disk, and the smaller the process category weight, the greater the budget variable growth when the corresponding application process newly accesses the disk.

[0118] When the application process newly accesses the disk, the budget variable of the application process is controlled to grow according to the growth rate.

[0119] In this way, the category of the application process will not change quickly, and frequent switching of the scheduler for the same application process can be avoided. Frequent switching of the scheduler not only affects the execution of the application process but also reduces the stability of the system.

[0120] Optionally, obtaining target parameters of the application process includes:

[0121] Get metadata of the application process.

[0122] It is understandable that the metadata of an application process is data about other data in the application process, or structured data used to provide information about a certain resource. Metadata is data that describes objects such as information resources or data. Its purpose is to identify the resources of the application process, evaluate the resources of the application process, and track the changes of the resources of the application process during use. By obtaining metadata, a large amount of data in the application process can be managed simply and efficiently.

[0123] Key value extraction is performed on the metadata to obtain target parameters of the application process.

[0124] In the disclosed embodiment, key-value extraction can extract characteristic values ​​of the application process at various data levels, and the characteristic values ​​can represent the characteristics of the application process in various aspects. For example, the target parameter can represent the key value of the application process on the application process priority, and can also represent the key value of the application process on the priority of read and write requests.

[0125] The key value contains the actual configuration information and data used by the current application process during execution, and can store up to 64KB of data. The data type of the value can be a string, a binary value, or a DWORD (double-byte) value.

[0126] Optionally, the target parameter includes at least one of the following:

[0127] IO status, where the IO status is used to indicate whether the application process is in a read / write state and / or the corresponding ratio of read to write;

[0128] The priority of the application process;

[0129] Priority of read and write requests;

[0130] The shared bandwidth of application processes in the storage system;

[0131] Request an immediate response;

[0132] Memory access frequency.

[0133] Among them, it can be explained that the priority of the application process can be determined according to the type of the application process, and can also be determined according to whether the application process is newly created. For example, when the application process is a newly created process, because there are a large number of IO scheduling requests in a short period of time, such as loading lib libraries, reading and writing configuration files, etc., the weight can be temporarily increased through the priority, which helps the new process to have more time to access the storage device, thereby speeding up the process startup speed.

[0134] Among them, the priority of read and write requests is used to indicate whether read operations or write operations are prioritized in different application processes. Because the priority of read operations and write operations is different for different application processes, different schedulers can be selected to perform IO scheduling for read operation priority and write operation priority.

[0135] The shared bandwidth of the application process in the storage system can be the throughput in the storage device, the data volume per unit time of the read and write requests sent to the storage system through the disk subsystem of the operating system, or the data volume per unit time of the system read and write operations.

[0136] Among them, requesting immediate response can also be understood as the response time, that is, the time it takes for the disk or system to respond to the application process after the application process makes a read or write request to the system disk. The memory access frequency is used to indicate that the application process frequently accesses the disk or memory. For example, the none scheduler cannot take into account the complexity of IO, and too frequent read and write will reduce performance. Therefore, the none scheduler will not be selected as the target scheduler for application processes with high memory access frequency.

[0137] See also Figure 3 As shown, the embodiments of the present disclosure can be illustrated by the following embodiments: an application process is configured in the application layer, and feature value extraction, such as key value extraction, can be performed based on the metadata of the application process to obtain the target parameter; further, a task queue is configured in the system framework layer, and the task queue can include one or more application processes, and then the target parameter is trained and learned through a neural network model to obtain the process category weight of the process category to which each application process belongs, and then the kernel layer can select a scheduler corresponding to the process category weight from multiple pre-configured IO schedulers. Then the selected scheduler is used as the target scheduler to schedule the IO of the application process. In this way, the scheduler can be dynamically switched to perform IO scheduling on the application process, which can not only avoid the interactive jamming of the application process due to heavy I / O load during the startup process, thereby ensuring the stable operation of the system, but also improve the IO throughput and reduce the delay time, so as to maximize the performance of the system.

[0138] The present disclosure also provides an IO scheduling device, see Figure 4 As shown, the device comprises:

[0139] The parameter acquisition module 410 is configured to acquire target parameters of the application process;

[0140] A parameter input module 420 is configured to input the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model;

[0141] A selection module 430 is configured to select a scheduler corresponding to the process category as a target scheduler from a plurality of pre-configured schedulers;

[0142] The scheduling module 440 is configured to schedule the IO corresponding to the application process through the target scheduler.

[0143] The above device can dynamically switch the scheduler to perform IO scheduling for the application process, which can not only avoid the interaction jamming caused by heavy I / O load during the startup of the application process, thereby ensuring the stable operation of the system, but also improve the IO throughput and reduce the delay time, thereby maximizing the performance of the system.

[0144] Optionally, the parameter input module 420 is configured to:

[0145] Inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model;

[0146] The selection module 430 is configured to:

[0147] A scheduler corresponding to the process category weight is selected from a plurality of pre-configured schedulers as a target scheduler, wherein each pre-configured scheduler is preset with a corresponding weight.

[0148] Optionally, the parameter input module 420 is configured to:

[0149] According to the target parameter, setting a budget variable corresponding to the application process;

[0150] Determine the number of accesses to the disk by the application process according to the budget variable and a preset tag value of the disk;

[0151] The process category weight output by the neural network model is obtained according to the budget variable and the tag value corresponding to the currently accessed disk.

[0152] Optionally, the device further comprises: a control module configured to:

[0153] Determining, according to the process category weight, a growth rate of the budget variable when the application process accesses the disk, wherein the growth rate is negatively correlated with the process category weight;

[0154] When the application process newly accesses the disk, the budget variable of the application process is controlled to grow according to the growth rate.

[0155] Optionally, the parameter acquisition module 410 is configured to:

[0156] Obtaining metadata of the application process;

[0157] Key value extraction is performed on the metadata to obtain target parameters of the application process.

[0158] Optionally, the target parameter includes at least one of the following:

[0159] IO status, where the IO status is used to indicate whether the application process is in a read / write state and / or the corresponding ratio of read to write;

[0160] The priority of the application process;

[0161] Priority of read and write requests;

[0162] The shared bandwidth of application processes in the storage system;

[0163] Request an immediate response;

[0164] Memory access frequency.

[0165] Optionally, the preconfigured scheduler includes more than one of the following:

[0166] Kyber scheduler, none scheduler, BFQ scheduler, MQ-Deadline scheduler, Deadline scheduler.

[0167] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0168] The present disclosure also provides an electronic device, including:

[0169] processor;

[0170] a memory for storing processor-executable instructions;

[0171] Wherein, the processor is configured to:

[0172] Get the target parameters of the application process;

[0173] Inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model;

[0174] Selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler;

[0175] The target scheduler is used to schedule the IO corresponding to the application process.

[0176] It can be explained that the processor can be configured to execute the executable instructions stored in the memory to implement the IO scheduling method described in any one of the aforementioned embodiments.

[0177] The embodiment of the present disclosure further provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the IO scheduling method described in any one of the aforementioned embodiments are implemented.

[0178] Figure 58 is a block diagram of an apparatus 800 for IO scheduling according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a car system, a home appliance, etc.

[0179] Reference Figure 5 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0180] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned IO scheduling method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0181] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0182] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0183] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0184] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0185] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0186] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0187] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0188] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned IO scheduling method.

[0189] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of the device 800 to complete the above IO scheduling method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0190] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0191] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An IO scheduling method, characterized in that: include: Get the target parameters of the application process; Inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model; Selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler; The target scheduler is used to schedule the IO corresponding to the application process.

2. The method according to claim 1, characterized in that The step of inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model comprises: Inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model; The step of selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler includes: A scheduler corresponding to the process category weight is selected from a plurality of pre-configured schedulers as a target scheduler, wherein each pre-configured scheduler is preset with a corresponding weight.

3. The method according to claim 2, characterized in that The step of inputting the target parameter into a pre-trained neural network model to obtain a process category weight output by the neural network model includes: According to the target parameter, setting a budget variable corresponding to the application process; Determine the number of accesses to the disk by the application process according to the budget variable and a preset tag value of the disk; The process category weight output by the neural network model is obtained according to the budget variable and the tag value corresponding to the currently accessed disk.

4. The method according to claim 3, characterized in that The method further comprises: Determining, according to the process category weight, a growth rate of the budget variable when the application process accesses the disk, wherein the growth rate is negatively correlated with the process category weight; When the application process newly accesses the disk, the budget variable of the application process is controlled to grow according to the growth rate.

5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the target parameters of the application process includes: Obtaining metadata of the application process; Key value extraction is performed on the metadata to obtain target parameters of the application process.

6. The method according to claim 5, characterized in that The target parameters include at least one of the following: IO status, where the IO status is used to indicate whether the application process is in a read / write state and / or the corresponding ratio of read to write; The priority of the application process; Priority of read and write requests; The shared bandwidth of application processes in the storage system; Request an immediate response; Memory access frequency.

7. The method according to any one of claims 1 to 4, characterized in that The pre-configured scheduler includes more than one of the following: Kyber scheduler, none scheduler, BFQ scheduler, MQ-Deadline scheduler, Deadline scheduler.

8. An IO scheduling device, characterized in that: include: A parameter acquisition module is configured to acquire target parameters of the application process; A parameter input module is configured to input the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model; A selection module is configured to select a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler; The scheduling module is configured to schedule the IO corresponding to the application process through the target scheduler.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Get the target parameters of the application process; Inputting the target parameter into a pre-trained neural network model to obtain a process category output by the neural network model; Selecting a scheduler corresponding to the process category from a plurality of pre-configured schedulers as a target scheduler; The target scheduler is used to schedule the IO corresponding to the application process.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.