CN118170517A - Scheduling method and device - Google Patents

Scheduling method and device Download PDF

Info

Publication number
CN118170517A
CN118170517A CN202410306317.1A CN202410306317A CN118170517A CN 118170517 A CN118170517 A CN 118170517A CN 202410306317 A CN202410306317 A CN 202410306317A CN 118170517 A CN118170517 A CN 118170517A
Authority
CN
China
Prior art keywords
scheduling
priority
group
access request
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410306317.1A
Other languages
Chinese (zh)
Inventor
王燚
王伟
范希花
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dingdao Zhixin Shanghai Semiconductor Co ltd
Original Assignee
Dingdao Zhixin Shanghai Semiconductor Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dingdao Zhixin Shanghai Semiconductor Co ltd filed Critical Dingdao Zhixin Shanghai Semiconductor Co ltd
Priority to CN202410306317.1A priority Critical patent/CN118170517A/en
Publication of CN118170517A publication Critical patent/CN118170517A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a scheduling method and a scheduling device, wherein the method comprises the following steps: determining the priority of each current access request, wherein each access request is divided into different categories based on the difference of the priority, and at least one group of access requests exist under each category, and each access request is a request for accessing a memory; and scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.

Description

Scheduling method and device
Technical Field
The present application relates to storage technologies, and in particular, to a scheduling method and apparatus.
Background
As the scale and integration of SOC (system-on-chip) in electronic devices continue to increase, access to memory systems by multi-channel, multi-mode business scenarios is increasingly complex. In the face of a large number of requests from different processing modules, how to reasonably schedule such requests to meet business needs is a major issue to be considered by those skilled in the art.
Disclosure of Invention
In view of this, the present application provides the following technical solutions:
A scheduling method, comprising:
determining the priority of each current access request, wherein each access request is divided into different categories based on the difference of the priority, and at least one group of access requests exist under each category, and each access request is a request for accessing a memory;
And scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
Optionally, the determining the priority of each current access request includes:
determining a first priority of the access request based on the source of the access request, the access requests of the same group having the same first priority;
determining a second priority of the access request based on the type of the storage area accessed by the access request;
A composite priority of the access requests is determined based on the first priority and the second priority.
Optionally, the method further comprises:
If the time for waiting for scheduling the access request with the first priority higher than the first threshold reaches a second threshold, setting the priority of the access request as the highest priority, wherein the access request with the highest priority has priority scheduling authority.
Optionally, the scheduling processing of each group of access requests according to the proportion by combining the request data volume of the group to which the access request belongs based on the priority of the access request includes:
determining request data amounts of access requests of different groups under the same priority class;
And scheduling the access requests of each group in the same priority according to the proportion of the corresponding request data amount based on the priority of the access requests.
Optionally, the scheduling processing of each group of access requests in the same priority class according to the proportion of the corresponding request data amount based on the priority of the access requests includes:
Determining the current access request to be scheduled based on the priority of each access request;
and scheduling the access request according to a polling scheduling amount corresponding to the group to which the access request belongs, wherein the polling scheduling amount is the data amount processed by each scheduling.
Optionally, the scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs includes:
And respectively counting the scheduling amounts of all groups under the same priority class, and stopping scheduling the groups in the polling scheduling process of the current round after reaching the corresponding counting targets of all groups, wherein the proportion among the counting targets of all groups corresponds to the proportion of the request data amount.
Optionally, the scheduling amounts of each group under the same priority are respectively counted, and when the corresponding counting target of each group is reached, the scheduling of the group in the polling scheduling process of the current round is stopped, including:
Configuring a data quantity counter;
Scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the data amount counter to carry out accumulated count on the scheduling amount;
And stopping the request scheduling of the group if the count value of the data quantity counter reaches a first count target.
Optionally, the scheduling amounts of each group under the same priority are respectively counted, and when the corresponding counting target of each group is reached, the scheduling of the group in the polling scheduling process of the current round is stopped, including:
Configuring a scheduling times counter;
scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the scheduling number counter to carry out accumulated count on the scheduling number;
And stopping scheduling the requests of the group if the count value of the scheduling times counter reaches a second count target.
Optionally, the method further comprises:
And after the scheduling amount of each group of access requests of the same priority class reaches the corresponding counting target of each group, starting the scheduling amount counting of the polling scheduling of a new round of access requests of each group under the priority class.
The application also discloses a scheduling device, which comprises:
the priority determining module is used for determining the priority of each current access request, the access requests are divided into different categories based on the difference of the priority, at least one group of access requests exist in each category, and the access requests are requests for accessing the memory;
and the scheduling processing module is used for scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
Further, the application also discloses an electronic device, which comprises:
A processor;
A memory for storing executable program instructions of the processor;
Wherein the executable program instructions comprise: determining the priority of each current access request, wherein each access request is divided into different categories based on the difference of the priority, and at least one group of access requests exist under each category, and each access request is a request for accessing a memory; and scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a scheduling method disclosed in an embodiment of the present application;
FIG. 2 is a flow chart of determining access request priority according to an embodiment of the present application;
FIG. 3 is a flow chart of scheduling an access request according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an implementation principle of a data volume counter scheme disclosed in an embodiment of the present application;
FIG. 5 is a schematic diagram of a scheduling sequence of multiple groups of access requests according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a scheduling apparatus according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device 70 according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application can be applied to electronic equipment, the application does not limit the product form of the electronic equipment, and the product form can comprise but is not limited to smart phones, tablet computers, wearable equipment, personal computers (personal computer, PC), netbooks and the like, and can be selected according to application requirements.
Fig. 1 is a flowchart of a scheduling method according to an embodiment of the present application. Referring to fig. 1, the scheduling method may include:
Step 101: the priority of each current access request is determined, the access requests are divided into different categories based on the difference of the priority, at least one group of access requests exist under each category, and the access requests are requests for accessing the memory.
The scheduling method of the embodiment of the application can be applied to a storage system, can receive the access requests sent by each processor of the equipment, and performs scheduling processing on the access requests according to a set mode, so that each service operation on the processor can be performed timely and smoothly. In one example, the implementation subject of the scheduling method of the present application may be a DDR (Double Data Rate) controller.
Due to the improvement of the scale and integration of the current SOC (System on Chip), multiple processors in the device may send multiple access requests to the storage System in a short time, and these access requests may also have different priorities based on the source, real-time requirements, and the like. In the scheme of the application, the priority of each access request is determined first. One or more groups of access requests can be arranged under each category priority, and the grouping basis of the access requests of different groups under the same category priority can be, but is not limited to, request sources, and the access request amounts of different groups can be the same or different.
Step 102: and scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
In the scheme of the application, the scheduling processing of the access request of the storage system is based on two aspects, namely the priority of the access request and the request data volume of the group to which the access request belongs. The amount of requested data, i.e. the total amount of data requested by all access requests of the corresponding group, is here stated. Under the premise of the two aspects, when the access requests are scheduled, the scheme of the application can schedule the access requests based on the proportion of the request data volume of the group to which each access request belongs.
For example, for two groups of access requests with the same priority, the request data volume of the access request of one group is 100Bytes, and the request data volume of the access request of the other group is 50Bytes, when two groups of access requests with the same priority are scheduled, the scheduling is performed according to the ratio of 2:1, so that the access requests of all groups can be scheduled in time, and the situation that the access requests with large bandwidth requirements cannot be satisfied when the access request queue lengths (request data volumes) of all groups are unequal or the difference is large is avoided.
Therefore, the scheme of the application schedules each group of access requests under the same priority according to the proportion of the request data amount on the basis of considering the priority, can realize the differentiated bandwidth transmission effect, namely, allocates the scheduling bandwidth resource according to the actual requirement of each group of access requests, ensures that each group of access requests can be processed in time, and meets the actual service scene requirement.
In the conventional scheme, if the access requests are scheduled only based on the priority, that is, the access requests are scheduled in the order from high priority to low priority, if the access requests with high priority are continuously sent, the situation that the access requests with low priority cannot be served for a long time may occur. If the access requests are scheduled only by the polling scheduling method, although access requests with different priorities can be served, there may be a case where access requests with high priorities (low latency requirements) cannot be satisfied in time.
Based on the above, in the scheme of the application, in order to ensure that the access requests with high priority can be responded in time, the access requests with each priority can be scheduled in a weighted difference polling mode. In implementation, different weights can be configured for access requests with different priorities, and the higher the priority is, the higher the corresponding weight is, the greater the possibility that the corresponding access request is scheduled, or the faster the scheduling speed is. Therefore, a weighted differential polling scheduling mode is adopted, so that the high-priority request is ensured to be responded in time, and the problem that the low-priority request is possibly out of service for a long time is avoided. In addition, a weight setting mode is adopted, so that priorities of different services are reflected, and the actual service scene requirements are met more.
In the foregoing embodiment, the flow chart for determining the priority may be referred to fig. 2. Fig. 2 is a flow chart of determining access request priority according to an embodiment of the present application. As shown in connection with fig. 2, the determining the priority of each current access request may include:
step 201: the first priority of the access request is determined based on the source of the access request, the same group of access requests having the same first priority.
The source of the access request refers to the processor that issues the access request, such as CPU, GPU, DPU, VIDEO (video processor), AUDIO (AUDIO processor), etc., which may issue the access request to access the storage system. In the embodiment of the application, the priority of the access request can be comprehensively determined from different aspects, and first, the first priority of the access request can be determined based on the source of the access request. In the present application, the first priority may be expressed in terms of QoS (Quality ofService, quality of service parameter).
In application, a plurality of different processors in the SOC need to access the memory, such as a CPU needs to obtain the fastest response, but the data request is not large; VIDEO and AUDIO have high real-time requirements, but have some tolerance for delay. In the scheme of the application, different priorities are given to access requests with different sources, such as requests of a CPU (Central processing Unit) are assigned to the highest priority, and priority processing is performed during scheduling; for requests of the same priority, the scheduling can be performed according to the bandwidth requirement, i.e. the amount of requested data.
Step 202: a second priority of the access request is determined based on a type of storage area accessed by the access request.
In the application, the second priority of the access request can be determined based on the type of the storage area accessed by the access request, and according to the characteristic of the memory DDR, the time requirement for the access of Open ROW is smaller than the time requirement for the access of Close ROW and Cross ROW; therefore, in order to guarantee access efficiency of DDR, open ROW request with low QoS may have priority over Cross ROW request with high QoS. The second priority is determined based on the type of ROW to which the access request corresponds.
Step 203: a composite priority of the access requests is determined based on the first priority and the second priority.
In the embodiment of the present application, the integrated priority includes the first priority and the second priority, where the first priority and the second priority may exist independently, and in the process of scheduling an access request, the scheduling order of the access request is determined based on the first priority and the second priority.
The priority determination scheme in this embodiment comprehensively considers the priority of the access request from different aspects, so that when the access request is scheduled, condition constraints, requirements and the like in various aspects can be fully considered, thereby ensuring that each access request can be scheduled reasonably and timely.
Based on the foregoing, if the time for waiting for scheduling of the access request with the first priority higher than the first threshold reaches the second threshold, the priority of the access request is set to be the highest priority, and the access request with the highest priority has priority scheduling authority.
For example, a request for high QoS may cause excessive delay due to excessive access by OpenROW for low QoS. When a request for high QoS (e.g., qos=14) is not responded to within a certain time, its priority is raised to the highest priority Urgent. Urgent are higher priority than Open ROW to guarantee the latency requirements of high QoS. In implementations, a limit may be placed on the QoS requested by priority up to Urgent, i.e., the mechanism described above is only valid for access requests with a first priority above a first threshold. For example, only requests with an original QoS greater than a certain value may be prioritized to Urgent to avoid the situation where Open ROW requests are interrupted too much.
Fig. 3 is a flowchart of a scheduling process for an access request according to an embodiment of the present application. Referring to fig. 3, the scheduling processing of each group of access requests according to the priority of the access request and the request data volume of the group to which the access request belongs according to the proportion may include:
step 301: the request data amount of access requests of different groups under the same priority class is determined.
The scheme of the embodiment introduces a scheduling processing process for different groups of access requests under the same priority, and firstly, the request data volume of each group of access requests under the same priority needs to be determined. The number of access requests contained in different groups may be different, as may the total amount of data requested by all access requests in each group, i.e. the total amount of data requested by all access requests contained in the corresponding group.
Step 302: and scheduling the access requests of each group in the same priority according to the proportion of the corresponding request data amount based on the priority of the access requests.
For example, in two groups having QoS of 7 as well, when the request data amount of all access requests in the group a is 1200Bytes and the request data amount of all access requests in the group b is 400Bytes, when the two groups having QoS of 7 as priority are subjected to request scheduling, the two groups may be subjected to scheduling processing of access requests at a ratio of 1200:400=3:1. In theory, although the request data amounts of the access requests in the two groups are different, the time when the access requests in the two groups are scheduled is the same or not much different.
The above description of one implementation of the scheduling process performed by different groups in proportion under the same priority class is helpful for those skilled in the art to better understand and implement the scheme of the present application.
In the foregoing, the scheduling processing of each group of access requests in the same priority class according to the ratio of the corresponding request data amounts based on the priority of the access requests may include: determining the current access request to be scheduled based on the priority of each access request; and scheduling the access request according to a polling scheduling amount corresponding to the group to which the access request belongs, wherein the polling scheduling amount is the data amount processed by each scheduling.
After determining the access request to be scheduled, the corresponding polling scheduling amount can be determined according to the proportion between the group to which the access request belongs and the request data amount of other groups under the same priority class, and the access request is scheduled according to the determined polling scheduling amount. For example, if it is determined that the polling schedule amount of the group corresponding to the access request that needs to be scheduled currently is 100Bytes, in the current polling round, the data scheduling of 100Bytes under the group needs to be completed, that is, the data of 100Bytes is fetched from the DDR to respond to the access request in the group.
Wherein, scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs may include: and respectively counting the scheduling amounts of all groups under the same priority class, and stopping scheduling the groups in the polling scheduling process of the current round after reaching the corresponding counting targets of all groups, wherein the proportion among the counting targets of all groups corresponds to the proportion of the request data amount.
Counting the scheduling amount and setting a counting target, namely setting different target values for scheduling channels of a group, or can be called as an initial value; after the target value is reached from the scheduling, the scheduling work of the corresponding group in the round polling scheduling is terminated.
In one implementation, a data volume counter may be configured first, then, the access request is scheduled according to a polling scheduling amount corresponding to a group to which the access request belongs, and the data volume counter is adopted to perform cumulative count on the scheduling data volume; and stopping the request scheduling of the group if the count value of the data quantity counter reaches a first count target.
The scheme of the data volume counter, namely, for different groups of access requests (different request data volumes of different groups), the different data volumes are sequentially and alternately scheduled according to the data request bandwidth each time. For example, there are two sets of requests at the same priority: request0 and Request1, different counters D [0] and D [1] are set for Request0 and Request1 requests, and initial values of the counters are configured according to respective Request data amount sizes. Each time a Request0 and a Request1 Request are polled, the set of requests outputs one Request, and the corresponding counter subtracts the requested data size. In this embodiment, the count target is equal to or less than 0, and when the counter is equal to or less than 0, the scheduling of the group is stopped. When the counters of Request0 and Request1 are both less than or equal to 0, the values of both sets of counters are added with their respective initial values, and a new round of scheduling is started.
Fig. 4 is a schematic diagram of an implementation principle of a data volume counter scheme disclosed in an embodiment of the present application. As shown in connection with fig. 4, it is assumed that the data amount per Request of the Request0 is 200Bytes and the data amount per Request of the Request1 is 100Bytes. We set the initial value for counter D [0] of Request0 to 300 and the initial value for counter D [1] of Request1 to 150 (the ratio of the corresponding Request data amounts to 2:1).
For the first time, 200Bytes are taken from Request0, and D [0] =100 after scheduling; 100Bytes were taken from Request1, post-schedule D [1] =50.
The second scheduling, 200Bytes are taken from the Request0, and D [0] = -100 is performed after scheduling; 100Bytes are taken from Request1, after scheduling d1= -50.
Before the third dispatch, D0 and D1 are negative numbers, so D0 resets to 200 and D1 resets to 100. 200Bytes from Request0, post-schedule d0=0; 100Bytes are taken from Request1, and D [1] =0 after scheduling.
So scheduled backward, the actual output bandwidth (Request data amount) ratio of Request0 and Request1 is 2: and 1, the weight ratio is consistent with that of the request, so that the purpose of realizing different bandwidths for different request scheduling is realized.
In other implementations, the initial value may also be set to a negative number, and the data amount counter may add the initial value to the scheduled data amount at each scheduling, and stop scheduling for the corresponding group when the counter's read value is greater than or equal to 0. In this implementation, the count target is 0 or more.
The initial value may also be 0, the data amount counter may count by increasing or decreasing the value, and after the read value of the data amount counter reaches the count target, the scheduling of the corresponding group is stopped. If the counting target is positive, the data quantity counter counts in a mode of increasing the number value; if the count target is negative, the data amount counter counts in a decreasing number.
It should be noted that, no matter whether the initial value of the counter is set to be positive, negative or 0, or the counting target is set to be positive, negative or 0, only the ratio between the counting targets of different groups or the initial values of different groups is guaranteed to be the same as the ratio of the request data amounts between the corresponding groups.
In the implementation of the scheme of the application, the access requests with high priority can be processed preferentially, and for at least two groups of access requests with the same priority, the scheduling can be performed according to the request data quantity or the proportion of the output bandwidth of each group.
In another implementation, the scheduling amount control among different groups can be realized by adopting a scheduling number counter mode. The implementation can firstly configure a scheduling times counter; then, scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the scheduling number counter to carry out accumulated count on the scheduling number; and stopping scheduling the requests of the group if the count value of the scheduling times counter reaches a second count target.
The scheduling times counter is used for counting the internal scheduling times of the DDR, and the scheduling quantity of each scheduling is the same. When the scheduling times of a certain group reach the counting target, the group stops scheduling. For example, the bandwidth requirement of two sets of access requests Request0 and Request1 in the same priority class is 1:2 corresponds to 50 requests 0 and 100 requests 1 (where 50 and 100 are different depending on the size of the time window, configurable) for DDR requests within the time window. Request0 and Request1 have respective schedule times counters that are incremented by 1 for each Request scheduled. After the counter of the Request0 reaches 50 (the second counting target corresponding to the Request 0), stopping scheduling the Request 0; after the counter of the Request1 reaches 100 (the second counting target corresponding to the Request 1), stopping scheduling the Request 1; when both counters reach the threshold, the counters of Request0 and Request1 are reset to 0.
Of course, in the implementation process, the initial value of the scheduling number counter may also be directly set as the second counting target, and if the group corresponds to each scheduling sequence of the data, the scheduling number counter is decremented by 1 until it is decremented to 0. In the implementation, for the access requests of a plurality of groups with the same priority, when the counter of one group is reduced to 0, the scheduling of the group is stopped, and the other scheduling times are scheduled to be reduced to 0; for example, each time request0 is decremented by 1, each time request1 is decremented by 1, when the scheduling number counter of request0 reaches 0, the remaining time of request1 is 50, and the remaining time is all the scheduling time of request1; it is also possible that request0 is decremented by 1 each time and request1 is decremented by 2 each time, so that the times at which the scheduling times counter of request0 and request1 is decremented to 0 will be similar.
Based on the two implementations, after the scheduling amount of each group of access requests in the same priority class reaches the corresponding counting target of each group, the scheduling amount counting of the new round of polling scheduling of each group of access requests in the priority class is started. The scheme adopts a polling mode based on the data length, allows different initial values to be set for each channel, and finally generates the effect of differentiated bandwidth transmission of different access request groups.
For a better understanding of the implementation of the disclosed technical solution, a specific example is now given.
Fig. 5 is a schematic diagram of a scheduling sequence of multiple groups of access requests according to an embodiment of the present application. As shown in connection with fig. 5, there are three sets of requests: request0, request1 and Request2, wherein QoS of Request0 and Request1 are simultaneously 3, and their scheduling allocates different thresholds according to bandwidth requirements, that is, the counting targets in the foregoing embodiment, for example, the threshold corresponding to Request0 is 50, and the threshold corresponding to Request1 is 100; the QoS of Request2 is 14 (highest priority and can rise to urgent), unaffected by the scheduling threshold (no corresponding counter).
At a certain time of scheduling, the scheduling times counters of Request0 and Request1 reach 49 and 97, respectively.
At this time, open and Close states according to DDR blocks (banks) and ROW: the ROW corresponding to the three requests 4,5 and 6 of Request0 is in the Open state and their priority is H (high). The ROW corresponding to the three requests 1,2 and 3 of Request1 is in the Close state and their priority is M (middle). The two requests 7 and 8 of Request2 correspond to different ROW of the same BANK as the ROW of Request1, i.e. Cross ROW, and therefore have a priority of L (low).
When scheduling, 4 is scheduled according to the priority, and at this time, the Request0 reaches the scheduling frequency threshold 50 and cannot be scheduled any more. Thus, requests 1,2,3 of Request1 are next continued to be scheduled according to priority. At this time, the scheduling counter of the Request0 and the Request1 is reset to 0, and the scheduling count is restarted when the Request1 also reaches the scheduling count threshold 100.
Thus, request 5 may be scheduled out. While Request 7 of Request2 becomes U (highest priority) after a long wait. At this point, request 7 is dispatched. Subsequently, if the priority of request 8 remains L (not updated to U), then request 8 is scheduled after request 6.
The above realizes a scheduling scheme based on weighted differential polling, while combining DDR characteristics.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders or concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
The method is described in detail in the embodiments disclosed in the present application, and the method can be implemented by using various types of devices, so that the present application also discloses a device, and specific embodiments are given below for details.
Fig. 6 is a schematic structural diagram of a scheduling apparatus according to an embodiment of the present application. Referring to fig. 6, the scheduling apparatus 60 may include:
The priority determining module 601 is configured to determine the priority of each current access request, where each access request is classified into different categories based on the difference of priorities, and at least one group of access requests exists in each category, and the access requests are requests for accessing the memory.
The scheduling processing module 602 is configured to perform scheduling processing on each group of access requests according to a proportion in combination with a request data amount of a group to which the access request belongs, based on a priority of the access request.
According to the scheme of the application, on the basis of considering the priority, all the groups of access requests under the same priority are scheduled according to the proportion of the request data quantity, so that a differentiated bandwidth transmission effect can be realized, namely, the scheduling bandwidth resources are allocated according to the actual requirements of all the groups of access requests, the groups of access requests can be timely processed, and the actual service scene requirements are met.
In one implementation, the priority determination module may be specifically configured to: determining a first priority of the access request based on the source of the access request, the access requests of the same group having the same first priority; determining a second priority of the access request based on the type of the storage area accessed by the access request; a composite priority of the access requests is determined based on the first priority and the second priority.
In one implementation, the scheduling apparatus further includes: and the priority adjustment module is used for setting the priority of the access request as the highest priority when the time for waiting for scheduling of the access request with the first priority higher than the first threshold reaches the second threshold, wherein the access request with the highest priority has priority scheduling authority.
In one implementation, the scheduling processing module includes: the request quantity determining module is used for determining request data quantity of access requests of different groups under the same priority class; and the proportional scheduling module is used for scheduling the access requests of each group in the same priority according to the proportion of the corresponding request data amount based on the priority of the access requests.
In one implementation, the proportional scheduling module includes: the scheduling determining module is used for determining the current access request to be scheduled based on the priority of each access request; and the proportional scheduling sub-module is used for scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, wherein the polling scheduling amount is the data amount processed by each scheduling.
In one implementation, the proportional scheduling submodule is specifically operable to: and respectively counting the scheduling amounts of all groups under the same priority class, and stopping scheduling the groups in the polling scheduling process of the current round after reaching the corresponding counting targets of all groups, wherein the proportion among the counting targets of all groups corresponds to the proportion of the request data amount.
In one implementation, the proportional scheduling submodule is specifically operable to: configuring a data quantity counter; scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the data amount counter to carry out accumulated count on the scheduling amount; and stopping the request scheduling of the group if the count value of the data quantity counter reaches a first count target.
In one implementation, the proportional scheduling submodule is specifically operable to: configuring a scheduling times counter; scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the scheduling number counter to carry out accumulated count on the scheduling number; and stopping scheduling the requests of the group if the count value of the scheduling times counter reaches a second count target.
In one implementation, the scheduling apparatus may further include: and the scheduling reset module is used for starting the scheduling amount counting of the polling scheduling of the new round of the access requests of each group under the priority class after the scheduling amount of the access requests of each group of the same priority class reaches the corresponding counting target of each group.
The specific implementation of the scheduling apparatus and each module included in the scheduling apparatus, and other possible implementations may refer to the content description of the corresponding parts in the method embodiment, and the detailed description is not repeated here.
Any one of the scheduling apparatuses in the above embodiments includes a processor and a memory, where the priority determining module, the scheduling processing module, the priority adjusting module, the request amount determining module, the proportional scheduling sub-module, and the like in the above embodiments are stored as program modules in the memory, and the processor executes the program modules stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel fetches the corresponding program module from the memory. The kernel can be provided with one or more kernels, and the processing of the return visit data is realized by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
In an exemplary embodiment, a computer readable storage medium is also provided, which can be directly loaded into an internal memory of a computer, and in which software code is contained, and the computer program can implement the steps shown in any embodiment of the scheduling method described above after being loaded and executed by the computer.
In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer, and which contains software code, and which, when loaded and executed by the computer, is capable of implementing the steps shown in any of the embodiments of the scheduling method described above.
Further, the embodiment of the application provides electronic equipment. Fig. 7 is a schematic structural diagram of an electronic device 70 according to an embodiment of the present application. Referring to fig. 7, the electronic device 70 includes at least one processor 701, at least one memory 702 connected to the processor, and a bus 703; the processor and the memory complete communication with each other through a bus; the processor is used for calling the program instructions in the memory to execute the scheduling method.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A scheduling method, comprising:
determining the priority of each current access request, wherein each access request is divided into different categories based on the difference of the priority, and at least one group of access requests exist under each category, and each access request is a request for accessing a memory;
And scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
2. The scheduling method of claim 1, wherein determining the priority of each current access request comprises:
determining a first priority of the access request based on the source of the access request, the access requests of the same group having the same first priority;
determining a second priority of the access request based on the type of the storage area accessed by the access request;
A composite priority of the access requests is determined based on the first priority and the second priority.
3. The scheduling method of claim 2, further comprising:
If the time for waiting for scheduling the access request with the first priority higher than the first threshold reaches a second threshold, setting the priority of the access request as the highest priority, wherein the access request with the highest priority has priority scheduling authority.
4. The scheduling method according to claim 1, wherein the scheduling processing of each group of access requests in combination with the request data amount of the group to which the access request belongs based on the priority of the access request includes:
determining request data amounts of access requests of different groups under the same priority class;
And scheduling the access requests of each group in the same priority according to the proportion of the corresponding request data amount based on the priority of the access requests.
5. The scheduling method according to claim 4, wherein the scheduling processing of each group of access requests in the same priority class according to the proportion of the corresponding request data amount based on the priority of the access requests includes:
Determining the current access request to be scheduled based on the priority of each access request;
and scheduling the access request according to a polling scheduling amount corresponding to the group to which the access request belongs, wherein the polling scheduling amount is the data amount processed by each scheduling.
6. The scheduling method according to claim 5, wherein scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs comprises:
And respectively counting the scheduling amounts of all groups under the same priority class, and stopping scheduling the groups in the polling scheduling process of the current round after reaching the corresponding counting targets of all groups, wherein the proportion among the counting targets of all groups corresponds to the proportion of the request data amount.
7. The scheduling method according to claim 6, wherein the scheduling method for counting the scheduling amounts of each group under the same priority, and stopping the scheduling of the group in the polling scheduling process of the current round after reaching the corresponding counting target of each group, comprises:
Configuring a data quantity counter;
Scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the data amount counter to carry out accumulated count on the scheduling amount;
And stopping the request scheduling of the group if the count value of the data quantity counter reaches a first count target.
8. The scheduling method according to claim 6, wherein the scheduling method for counting the scheduling amounts of each group under the same priority, and stopping the scheduling of the group in the polling scheduling process of the current round after reaching the corresponding counting target of each group, comprises:
Configuring a scheduling times counter;
scheduling the access request according to the polling scheduling amount corresponding to the group to which the access request belongs, and adopting the scheduling number counter to carry out accumulated count on the scheduling number;
And stopping scheduling the requests of the group if the count value of the scheduling times counter reaches a second count target.
9. The scheduling method of claim 6, further comprising:
And after the scheduling amount of each group of access requests of the same priority class reaches the corresponding counting target of each group, starting the scheduling amount counting of the polling scheduling of a new round of access requests of each group under the priority class.
10. A scheduling apparatus comprising:
the priority determining module is used for determining the priority of each current access request, the access requests are divided into different categories based on the difference of the priority, at least one group of access requests exist in each category, and the access requests are requests for accessing the memory;
and the scheduling processing module is used for scheduling each group of access requests according to the proportion by combining the request data quantity of the group to which the access request belongs based on the priority of the access request.
CN202410306317.1A 2024-03-18 2024-03-18 Scheduling method and device Pending CN118170517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410306317.1A CN118170517A (en) 2024-03-18 2024-03-18 Scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410306317.1A CN118170517A (en) 2024-03-18 2024-03-18 Scheduling method and device

Publications (1)

Publication Number Publication Date
CN118170517A true CN118170517A (en) 2024-06-11

Family

ID=91355895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410306317.1A Pending CN118170517A (en) 2024-03-18 2024-03-18 Scheduling method and device

Country Status (1)

Country Link
CN (1) CN118170517A (en)

Similar Documents

Publication Publication Date Title
JP4723260B2 (en) Apparatus and method for scheduling a request to a source device
US7093256B2 (en) Method and apparatus for scheduling real-time and non-real-time access to a shared resource
CN107480078B (en) bus bandwidth allocation method, device and chip
CN111400022A (en) Resource scheduling method and device and electronic equipment
US8745335B2 (en) Memory arbiter with latency guarantees for multiple ports
WO2017206749A1 (en) Adaptive resource allocation method and apparatus
US11586392B2 (en) Multi-stream SSD QoS management
CN103201726B (en) Fine granularity arbitration system is provided
JP2013544001A (en) Arbitration of bus transactions on the communication bus and associated power management based on the health information of the bus device
KR20110080735A (en) Computing system and method
US6393505B1 (en) Methods and apparatus for data bus arbitration
EP1678620B1 (en) Scheduling memory access between a plurality of processors
CN112463044B (en) Method and system for ensuring tail reading delay of server side of distributed storage system
WO2023226948A1 (en) Traffic control method and apparatus, electronic device and readable storage medium
CN111221631A (en) Task scheduling method, device and storage medium
EP3440547B1 (en) Qos class based servicing of requests for a shared resource
CN112214299A (en) Multi-core processor and task scheduling method and device thereof
CN118170517A (en) Scheduling method and device
CN116820769A (en) Task allocation method, device and system
CN113515473A (en) QoS control method, bus system, computing device and storage medium
CN112130974B (en) Cloud computing resource configuration method and device, electronic equipment and storage medium
CN115202842A (en) Task scheduling method and device
WO2015067295A1 (en) Method and arrangement for controlling requests to a shared electronic resource
CN109062707B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN114489463A (en) Method and device for dynamically adjusting QOS (quality of service) of storage volume and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination