Bandwidth control method of memory, electronic equipment and storage medium
By monitoring and detecting the bandwidth usage of the memory bandwidth requesting node, and discarding messages exceeding the threshold in combination with preset conditions, the problem of low bandwidth regulation efficiency in the memory controller is solved, and the rational allocation and efficient utilization of resources are achieved to ensure the equipment Run smoothly.
Patent Information
- Application Number
- CN202411261864.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
When existing memory controllers compete for memory resources between multiple processes or request sources, the regulation efficiency is inefficient and unable to effectively manage bandwidth, resulting in excessive resource utilization of a single node and affecting the normal operation of other nodes.
By monitoring the bandwidth request packets of the bandwidth request node in the preset movement time window, the bandwidth occupancy is determined, and bandwidth request packets exceeding the threshold are detected and discarded based on the preset bandwidth control conditions, ensuring reasonable allocation of resources and efficient utilization.
It realizes automatic bandwidth regulation in the memory controller, prevents individual nodes from over-consuming resources, ensures the smooth operation and efficient operation of the overall equipment, and improves the rational allocation and utilization of bandwidth resources.
Smart Images

Figure CN119201450A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage control technology, and in particular to a memory bandwidth control method, electronic device and storage medium. Background Art
[0002] When there are multiple processes or multiple request sources (such as CPU and GPU) competing for memory resources, ARM proposed an architecture solution that implements resource allocation through hardware and software configuration - MPAM (Memory Partitioning and Monitoring). This architecture implements allocation in resources such as cache and memory bandwidth through MPAM ID (MPAM IDs of different processes or request sources are allocated by software). However, the MPAM currently implemented in the memory controller only has a monitoring function and can only detect the usage of memory bandwidth. After the information that the bandwidth exceeds the threshold is brought to the upstream control component through a response message, the upstream control component relies on itself to adjust the bandwidth request of the corresponding MPAM ID, resulting in low control efficiency. Summary of the invention
[0003] The main purpose of the present application is to provide a memory bandwidth control method, an electronic device and a storage medium, aiming to solve the technical problem of low efficiency in regulating the memory bandwidth.
[0004] To achieve the above object, the present application proposes a memory bandwidth control method, the memory bandwidth control method comprising:
[0005] For any bandwidth requesting node that requests bandwidth from the memory, monitoring the bandwidth requesting message sent by the bandwidth requesting node within a preset moving time window, and determining the bandwidth occupancy based on the bandwidth requesting message;
[0006] Detecting the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth requesting node;
[0007] When the bandwidth occupancy meets the preset bandwidth control condition, the target bandwidth request message monitored in the target subwindow in the preset moving time window is discarded, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0008] In one embodiment, the bandwidth control condition includes at least a bandwidth upper limit and a bandwidth lower limit, and the step of detecting the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth request node includes:
[0009] Comparing the bandwidth upper limit with the bandwidth usage;
[0010] When the bandwidth usage exceeds the bandwidth upper limit, obtaining the target bandwidth lower limit configured by other bandwidth request nodes that send other bandwidth request messages at the current monitoring time, and comparing the bandwidth lower limit with the target bandwidth lower limit;
[0011] In a case where the target bandwidth lower limit is not lower than the bandwidth lower limit, determining that the bandwidth occupancy does not meet the bandwidth control condition, and accepting the target bandwidth request message;
[0012] When the target bandwidth lower limit is lower than the bandwidth lower limit, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
[0013] In one embodiment, after the step of comparing the bandwidth upper limit and the bandwidth usage, the step further includes:
[0014] When the bandwidth usage does not exceed the bandwidth upper limit, comparing the bandwidth lower limit with the bandwidth usage;
[0015] When the bandwidth usage is lower than the bandwidth lower limit, or the bandwidth usage is not lower than the bandwidth lower limit and the current monitoring time is not in the bandwidth control period, it is determined that the bandwidth usage does not meet the bandwidth control condition, and the target bandwidth request message is accepted, wherein the bandwidth control period is the time period from when the bandwidth usage exceeds the bandwidth upper limit to when it is less than the bandwidth lower limit;
[0016] When the bandwidth occupancy is not less than the bandwidth lower limit and the current monitoring time is in the bandwidth control period, the steps of obtaining the target bandwidth lower limit configured by other bandwidth requesting nodes that send other bandwidth request messages at the current monitoring time and comparing the bandwidth lower limit with the target bandwidth lower limit are performed.
[0017] In one embodiment, before the step of determining whether the bandwidth occupancy meets the preset bandwidth control condition, the step further includes:
[0018] Detecting the occupancy level of the preset discarded message linked list, wherein after executing the step of discarding the target bandwidth request message monitored in the target subwindow in the preset moving time window, sending the preset discarded message to the bandwidth request node, and saving the preset discarded message to the preset discarded message linked list;
[0019] In the case where the preset message linked list is full, determining that the bandwidth occupancy does not meet the preset bandwidth control condition, and outputting a first software control request signal to request software intervention to control the bandwidth;
[0020] When the preset message linked list is not full, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
[0021] In one embodiment, before the step of detecting the occupancy level of the preset message linked list, the step further includes:
[0022] Performing type detection on the bandwidth request message;
[0023] In the case where it is detected that the bandwidth request message is a static message, it is determined that the bandwidth occupancy does not meet the preset bandwidth control condition, and a second software control request signal is output to request software intervention to control the bandwidth, wherein the static message is a message re-sent by the bandwidth request node after the target bandwidth request message is discarded;
[0024] When it is detected that the bandwidth request message is not a static message, the step of detecting the occupancy degree of the preset message linked list is performed.
[0025] In one embodiment, the bandwidth request node is configured with a queue application priority, and the step of discarding the target bandwidth request message monitored in the target sub-window of the preset moving time window further includes:
[0026] When the bandwidth occupancy is lower than the bandwidth lower limit in the preset bandwidth control condition, sending a preset queue application message to the request queue to apply for space for storing the target bandwidth request message according to the queue application priority;
[0027] In the case where the space is obtained through application, a preset retransmission request message is sent to the bandwidth requesting node to request the bandwidth requesting node to send out the target bandwidth request message in the form of a static message.
[0028] In one embodiment, before the step of sending the preset queue application message to the request queue, the step further includes:
[0029] The discarding time length during which the target bandwidth request message is discarded is recorded, and when the discarding time length exceeds a preset time length, the queue application priority is increased.
[0030] In one embodiment, the preset moving time window includes a plurality of sub-windows, and the step of monitoring the bandwidth request message sent by the bandwidth requesting node within the preset moving time window includes:
[0031] Discard the historical sub-window farthest from the current monitoring moment in the previous moving time window to obtain the remaining historical sub-windows;
[0032] The remaining historical sub-window and the target sub-window at the current monitoring time are combined into the preset moving time window;
[0033] The bandwidth request message sent in the remaining historical sub-window is combined with the bandwidth request message sent in the target sub-window to obtain the bandwidth request message sent by the bandwidth request node in the preset moving time window.
[0034] In addition, to achieve the above purpose, the present application also proposes a memory bandwidth control device, the memory bandwidth control device comprising:
[0035] A monitoring module, configured to monitor, for any bandwidth requesting node that requests bandwidth from the memory, a bandwidth requesting message sent by the bandwidth requesting node within a preset moving time window, and determine bandwidth occupancy based on the bandwidth requesting message;
[0036] A detection module, configured to detect the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth request node;
[0037] The discarding module is used to discard the target bandwidth request message monitored in the target subwindow of the preset moving time window when the bandwidth occupancy meets the preset bandwidth control condition, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0038] In addition, to achieve the above objectives, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the memory bandwidth control method as described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the memory bandwidth control method described above are implemented.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the memory bandwidth control method as described above are implemented.
[0041] One or more technical solutions proposed in this application have at least the following technical effects:
[0042] The present application first monitors the bandwidth request message sent by any bandwidth request node that requests bandwidth from the memory within a preset moving time window, and determines the bandwidth occupancy based on the bandwidth request message, so as to provide an effective data basis for ensuring the reasonable allocation and efficient utilization of bandwidth resources by monitoring the bandwidth requests of different bandwidth request nodes within the moving time window; detects the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth request node, so that the system can detect the situation that any node exceeds its allocated bandwidth resources; and sends a preset discard message to the bandwidth request node when the bandwidth occupancy meets the preset bandwidth control condition, so as to discard the target bandwidth request message in the preset moving time window, thereby avoiding a single node from excessively occupying bandwidth resources, thereby affecting the normal operation of other nodes, and ensuring the smooth operation and work efficiency of the overall device.
[0043] In summary, the present application monitors the bandwidth request message of the bandwidth request node within the preset mobile time window and determines the bandwidth occupancy, and performs detection in combination with the bandwidth control conditions of the node configuration. When the bandwidth occupancy exceeds the preset conditions, the bandwidth usage of the node is suppressed by discarding the message in the sub-window monitored at the current monitoring moment, thereby protecting the memory resources from being over-consumed by individual nodes, ensuring the smooth operation and work efficiency of the overall equipment, and realizing automatic bandwidth regulation in the memory controller by itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 A flowchart of a first embodiment of a method for controlling memory bandwidth according to the present invention;
[0047] Figure 2 A schematic diagram of a moving time window of a memory bandwidth control method provided in Embodiment 1 of the present application;
[0048] Figure 3 A flow chart of a second embodiment of the memory bandwidth control method of the present application;
[0049] Figure 4 A schematic diagram of a brief flow chart of a memory bandwidth control method provided in Embodiment 2 of the present application;
[0050] Figure 5 A schematic diagram of a scenario of a memory bandwidth control method provided in Embodiment 2 of the present application;
[0051] Figure 6 This is a schematic diagram of the module structure of the bandwidth control device of the memory of the embodiment of the present application;
[0052] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the memory bandwidth control method in the embodiment of the present application.
[0053] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0055] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0056] The main solution of the embodiment of the present application is: for any bandwidth requesting node that requests bandwidth from the memory, monitor the bandwidth request message sent by the bandwidth requesting node within a preset moving time window, and determine the bandwidth occupancy based on the bandwidth request message; detect the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth requesting node; if the bandwidth occupancy meets the preset bandwidth control condition, discard the target bandwidth request message monitored in the target subwindow of the preset moving time window, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0057] Since the MPAM implemented in the memory controller in the prior art only has a monitoring function, it can only detect the usage of the memory bandwidth. After the information that the bandwidth exceeds the threshold is brought to the upstream control component through a response message, the upstream control component relies on itself to adjust the bandwidth request of the corresponding MPAM ID, resulting in low control efficiency.
[0058] The present application provides a solution, which monitors the bandwidth request message of the bandwidth request node within a preset mobile time window and determines the bandwidth occupancy, and performs detection in combination with the bandwidth control conditions configured by the node. When the bandwidth occupancy exceeds the preset conditions, the bandwidth usage of the node is suppressed by discarding the message in the sub-window monitored at the current monitoring moment, thereby protecting the memory resources from being over-consumed by individual nodes, ensuring the smooth operation and work efficiency of the overall device, and realizing automatic bandwidth regulation in the memory controller by itself.
[0059] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device that can realize the above functions. The following takes an electronic device as an example to illustrate this embodiment and the following embodiments.
[0060] Based on this, the present application embodiment provides a memory bandwidth control method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the memory bandwidth control method of the present application.
[0061] In this embodiment, the memory bandwidth control method includes steps S10 to S30:
[0062] Step S10, for any bandwidth requesting node that requests bandwidth from the memory, monitoring the bandwidth requesting message sent by the bandwidth requesting node within a preset moving time window, and determining the bandwidth occupancy based on the bandwidth requesting message;
[0063] It should be noted that a bandwidth requesting node refers to a process or requesting source that requests memory (such as DDR) bandwidth resources, such as different processes in a CPU, or a CPU and a GPU; a preset moving time window refers to a set sliding time range, which is used to smoothly detect and count the bandwidth occupancy of a bandwidth requesting node within the time period, and the moving time window can be evenly divided into 4 sub-windows or 8 sub-windows. In this embodiment, the division of the moving time window is not specifically limited; a bandwidth requesting message refers to a message or data packet sent by a bandwidth requesting node to request memory resources; and bandwidth occupancy refers to the total amount of memory bandwidth actually requested by a bandwidth requesting node within the preset moving time window.
[0064] It is understandable that since controlling the bandwidth usage of the memory requires accurately understanding the bandwidth occupancy of each bandwidth requesting node, performing step S10 can avoid the opacity of the bandwidth occupied by different bandwidth requesting nodes, thereby making it difficult to accurately control the bandwidth allocation of the memory, and providing effective and reliable monitoring data to ensure the reasonable allocation of memory bandwidth resources.
[0065] Exemplarily, in MPAM monitoring, 128 identical MPAM ID bandwidth monitoring modules are used to monitor bandwidth occupancy of 128 different MPAM IDs, ie, bandwidth request nodes. Alternatively, only some MPAM ID bandwidth monitoring modules may be started to monitor some MPAM IDs.
[0066] In a feasible implementation manner, the preset moving time window includes a plurality of sub-windows, and the step of monitoring the bandwidth request message sent by the bandwidth requesting node within the preset moving time window in step S10 may include steps S11 to S13:
[0067] Step S11, discarding the historical sub-window farthest from the current monitoring moment in the previous moving time window to obtain the remaining historical sub-windows;
[0068] It should be noted that the current monitoring moment refers to the current moment when the system detects the bandwidth occupancy of the bandwidth requesting node; the previous monitoring moment refers to the previous detection time point in time sequence relative to the current monitoring moment, and the preset moving time window of this time point is a moving time window that is one subwindow forward in time sequence compared to the preset moving time window of the current monitoring moment; the remaining historical subwindows refer to the remaining subwindows of the moving time window of the previous monitoring moment excluding the earliest subwindow in time sequence.
[0069] It is understandable that, since the number of bandwidth request messages sent by the bandwidth request node often varies from peak to valley during the monitoring process, step S11 is performed to discard the monitoring content in the sub-window with the earliest timing by moving the time window, that is, the moving time window slides the time width of a sub-window each time monitoring is performed, thereby achieving a smooth monitored peak bandwidth.
[0070] Step S12, combining the remaining historical sub-window and the target sub-window at the current monitoring time to form the preset moving time window;
[0071] It should be noted that the target sub-window refers to the sub-window in the preset moving time window where the current monitoring time is located and which is the latest in terms of time sequence.
[0072] Step S13: combining the bandwidth request message sent in the remaining historical sub-window with the bandwidth request message sent in the target sub-window to obtain the bandwidth request message sent by the bandwidth request node in the preset moving time window.
[0073] For example, please refer to Figure 2In the figure, the upper moving time window cnt is the moving time window of the previous monitoring moment, and the lower moving time window cnt is the moving time window of the current monitoring moment, wherein cnt0, cnt1, cnt2, and cnt3 are four sub-windows in the moving time window respectively. At the current monitoring moment, the sub-window cnt0 with the earliest timing in the upper window is discarded, and the remaining sub-windows, i.e., cnt1, cnt2, and cnt3 in the upper window are obtained, and cnt1, cnt2, and cnt3 in the upper window are combined with the target sub-window at the current monitoring moment, i.e., cnt3 in the lower window, to obtain the moving time window at the current moment, i.e., cnt composed of the lower windows cnt0, cnt1, cnt2, and cnt3, and the bandwidth request messages in all sub-windows in the current cnt are obtained.
[0074] In this implementation, a more comprehensive and smoother bandwidth occupancy detection is achieved by moving the time window, thereby providing high-performance data for more effective bandwidth regulation.
[0075] Step S20, detecting the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth requesting node;
[0076] It should be noted that bandwidth control conditions refer to bandwidth usage rules set to maintain device performance, and may include parameter conditions such as bandwidth upper limit and bandwidth lower limit.
[0077] It is understandable that, since precise control of memory bandwidth allocation requires judgment on whether the current node bandwidth usage is reasonable, performing step S20 can avoid the situation where a single node over-occupies bandwidth resources and cannot be discovered in time, thus providing a reliable judgment basis for accurate regulation of bandwidth allocation.
[0078] In a feasible implementation manner, the bandwidth control condition includes at least a bandwidth upper limit and a bandwidth lower limit, and step S20 may include steps S21 to S24:
[0079] Step S21, comparing the bandwidth upper limit and the bandwidth usage;
[0080] It should be noted that the bandwidth upper limit refers to the maximum allowed bandwidth usage set in advance for the bandwidth requesting node.
[0081] It is understandable that, since it is necessary to ensure that the bandwidth usage of any node does not exceed its pre-permitted maximum occupancy value during the bandwidth control process, performing step S21 can prevent a single node from excessively occupying bandwidth resources, thereby maintaining the overall bandwidth allocation strategy of the network.
[0082] Step S22, when the bandwidth usage exceeds the bandwidth upper limit, obtaining the target bandwidth lower limit configured by other bandwidth request nodes that send other bandwidth request messages at the current monitoring time, and comparing the bandwidth lower limit with the target bandwidth lower limit;
[0083] It should be noted that other bandwidth request messages refer to bandwidth request messages sent by other bandwidth request nodes except the bandwidth request node being monitored at the current monitoring moment; other bandwidth request nodes refer to all nodes that send bandwidth request messages except the node being monitored at the current monitoring moment; the bandwidth lower limit refers to the minimum guaranteed bandwidth occupancy set in advance for the bandwidth request node; the target bandwidth lower limit refers to the bandwidth lower limit in the bandwidth control conditions configured for other bandwidth request nodes.
[0084] It is understandable that, since in the actual use of memory bandwidth, there are often multiple bandwidth requesting nodes requesting memory bandwidth at the same time, step S22 is performed to determine whether there is bandwidth competition among multiple nodes based on the comparison of bandwidth lower limits, thereby improving the rationality of bandwidth allocation among different nodes and ensuring the normal operation of the entire device.
[0085] Step S23, when the target bandwidth lower limit is not lower than the bandwidth lower limit, determining that the bandwidth occupancy does not meet the bandwidth control condition, and accepting the target bandwidth request message;
[0086] It should be noted that the target bandwidth request message refers to the bandwidth request message monitored in the latest sub-window in terms of timing after the moving time window moves.
[0087] It can be understood that, since when the target bandwidth lower limit is not lower than the bandwidth lower limit, that is, when there is no bandwidth competition for the bandwidth requesting node, there may be unnecessary bandwidth restrictions on the bandwidth requesting node, so step S23 is performed. By not performing bandwidth control on the bandwidth requesting node when there is no bandwidth competition for the bandwidth requesting node, the bandwidth resource demand of the node is met as much as possible, thereby improving the working efficiency of the equipment.
[0088] Step S24: when the target bandwidth lower limit is lower than the bandwidth lower limit, determining that the bandwidth occupancy meets the preset bandwidth control condition.
[0089] It can be understood that, since when the target bandwidth lower limit is lower than the bandwidth lower limit, that is, when there is bandwidth competition at the bandwidth requesting node, it is necessary to perform necessary bandwidth restrictions on the bandwidth requesting node, so step S24 is performed. By performing bandwidth control on the bandwidth requesting node when there is bandwidth competition at the bandwidth requesting node, the necessary bandwidth requirements of other nodes are guaranteed, and the operating stability of the overall device is guaranteed.
[0090] In this implementation, by setting bandwidth upper and lower limits and comparing the bandwidth requirements of different nodes, efficient and fair allocation of network bandwidth resources is ensured, preventing a single node from excessively occupying bandwidth, and at the same time ensuring that all nodes obtain the necessary bandwidth resources within a reasonable range, avoiding channel congestion and service interruptions, and improving the overall performance and reliability of the device.
[0091] In a feasible implementation manner, after step S21, steps S201 to S203 may also be included:
[0092] Step S201, when the bandwidth usage does not exceed the bandwidth upper limit, compare the bandwidth lower limit with the bandwidth usage;
[0093] It is understandable that since the node needs to obtain the minimum bandwidth resource required during bandwidth control, performing step S201 can prevent the node from obtaining a bandwidth lower than the basic bandwidth requirement of the node, thereby ensuring the node's minimum service level.
[0094] Step S202: when the bandwidth usage is lower than the bandwidth lower limit, or when the bandwidth usage is not lower than the bandwidth lower limit and the current monitoring time is not in the bandwidth control period, it is determined that the bandwidth usage does not meet the bandwidth control condition, and the target bandwidth request message is accepted, wherein the bandwidth control period is the time period from when the bandwidth usage exceeds the bandwidth upper limit to when it is lower than the bandwidth lower limit;
[0095] It should be noted that the bandwidth control period refers to the time period from when the bandwidth usage of a bandwidth requesting node exceeds the bandwidth upper limit to when the bandwidth usage drops below the bandwidth lower limit.
[0096] It is understandable that, since when the bandwidth resource occupancy of the bandwidth requesting node is low, it is not necessary to control the bandwidth resource requested by the node, so step S202 is performed to ensure the normal bandwidth request demand of the node by accepting the bandwidth request message.
[0097] Step S203, when the bandwidth occupancy is not less than the bandwidth lower limit and the current monitoring time is in the bandwidth control period, the step of obtaining the target bandwidth lower limit configured by other bandwidth requesting nodes that send other bandwidth request messages at the current monitoring time, and comparing the bandwidth lower limit with the target bandwidth lower limit is performed;
[0098] It is understandable that, since the bandwidth occupancy of the bandwidth requesting node just starts to decrease from above the bandwidth upper limit, it is possible to exceed the bandwidth upper limit again in a short time, so step S203 is performed, by maintaining the bandwidth control of the bandwidth requesting node from the beginning of bandwidth control of the bandwidth requesting node until the bandwidth resources of the node are controlled to be as low as the bandwidth lower limit, thereby avoiding frequent control of the node and improving the efficiency of node bandwidth control.
[0099] In this implementation, by setting the bandwidth control period, frequent bandwidth control of the bandwidth requesting node is avoided, while ensuring the minimum bandwidth requirement of the node.
[0100] In a feasible implementation manner, before the step of determining in step S24 that the bandwidth occupancy meets the preset bandwidth control condition, steps S241 to S243 may also be included:
[0101] Step S241, detecting the occupancy level of the preset discarded message linked list, wherein after executing the step of discarding the target bandwidth request message monitored in the target subwindow in the preset moving time window, sending the preset discarded message to the bandwidth request node, and saving the preset discarded message to the preset discarded message linked list;
[0102] It should be noted that the preset discard message refers to a specific message sent to control the use of memory bandwidth, which is used to instruct the requesting node to discard the target bandwidth request message; the preset discard message linked list refers to a data structure used to store and manage discard messages sent to the bandwidth requesting node during the bandwidth control process, and the discard message linked list is shared by different bandwidth requesting nodes and is linked in a dynamic list manner. Each bandwidth requesting node has a corresponding head pointer, and the depth of the linked list can be 1024, etc.
[0103] It can be understood that since there is a hardware control capability upper limit for the memory controller to control the bandwidth, that is, if the preset discarded message is fully stored in the preset discarded message linked list, the hardware control capability upper limit for the memory controller to control the bandwidth is reached, so step S241 is performed, and the occupancy level of the preset discarded message linked list, that is, whether the hardware control capability upper limit for the bandwidth control of the current device is reached, is detected, thereby providing a reliable decision basis for the subsequent use of an appropriate control method for the bandwidth.
[0104] Step S242, when the preset message linked list is full, determining that the bandwidth occupancy does not meet the preset bandwidth control condition, and outputting a first software control request signal to request software intervention to control the bandwidth;
[0105] It should be noted that the first software control request signal refers to a signal used to instruct the upper layer software to intervene in the bandwidth control process to handle the bandwidth occupancy exceeding the preset control condition.
[0106] It is understandable that when the preset message linked list is full, that is, the hardware control capability of the current device for controlling the bandwidth reaches the upper limit, the bandwidth resources can no longer be effectively regulated, so step S242 is performed. By requesting the software to intervene in the bandwidth control, it is possible to avoid the inability to effectively regulate the bandwidth resources based on the current hardware resources, thereby causing the nodes to occupy too much bandwidth resources, thereby affecting the normal operation of the device. It provides a more flexible and adaptive bandwidth management strategy for effectively regulating the bandwidth after exceeding the hardware control capability, ensures the normal operation of the bandwidth control, and further guarantees the smooth operation and work efficiency of the overall device.
[0107] Step S243: when the preset message linked list is not full, determining whether the bandwidth occupancy meets the preset bandwidth control condition.
[0108] In this implementation, by monitoring the occupancy level of the preset discarded message list, that is, the hardware control capability, it is ensured that when the hardware control capability reaches the upper limit, timely control intervention can be performed through software. On the basis of reducing unnecessary software intervention, the normal operation of bandwidth control is ensured, and the smooth operation and work efficiency of the overall equipment are further guaranteed.
[0109] In a feasible implementation manner, before step S241, steps S100 to S300 may also be included:
[0110] Step S100, performing type detection on the bandwidth request message;
[0111] Step S200, when it is detected that the bandwidth request message is a static message, it is determined that the bandwidth occupancy does not meet the preset bandwidth control condition, and a second software control request signal is output to request software intervention to control the bandwidth, wherein the static message is a message re-sent by the bandwidth request node after the target bandwidth request message is discarded;
[0112] It is understandable that since the message resent by the bandwidth requesting node cannot be processed by the existing hardware control capability, step S200 is performed to process the message resent by the node by introducing external software to ensure that the node's bandwidth resource request is processed normally, thereby ensuring the overall operating stability of the device.
[0113] Step S300: When it is detected that the bandwidth request message is not a static message, the step of detecting the occupancy level of the preset message linked list is performed.
[0114] In this implementation, by using notification software to process static messages resent by nodes, it is ensured that the bandwidth resource request of the node is processed normally, thereby ensuring the normal operation of bandwidth control.
[0115] Step S30, when the bandwidth occupancy meets the preset bandwidth control condition, discard the target bandwidth request message monitored in the target subwindow in the preset moving time window, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0116] It is understandable that when the bandwidth occupancy of a certain node is too large, it will cause the overall equipment to run unstably and performance degradation, so step S30 is performed to discard the bandwidth request message and adjust the bandwidth usage that exceeds the threshold in time, thereby ensuring the smooth operation and work efficiency of the overall equipment.
[0117] This embodiment provides a memory bandwidth control method, which monitors bandwidth request messages of bandwidth request nodes within a preset moving time window and determines bandwidth occupancy, and performs detection in combination with bandwidth control conditions configured on the node. When the bandwidth occupancy exceeds the preset condition, the bandwidth usage of the node is suppressed by discarding messages within the sub-window monitored at the current monitoring moment, thereby protecting memory resources from being over-consumed by individual nodes, ensuring the smooth operation and work efficiency of the overall device, and realizing automatic bandwidth regulation in the memory controller by itself.
[0118] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , the bandwidth request node is configured with a queue application priority. After step S30, the memory bandwidth control method further includes steps S40 to S50:
[0119] Step S40, when the bandwidth occupancy is lower than the bandwidth lower limit in the preset bandwidth control condition, sending a preset queue application message to the request queue to apply for space for storing the target bandwidth request message according to the queue application priority;
[0120] It should be noted that the preset queue application message refers to an instruction for sending an application to the request queue, requesting space for storing the target bandwidth request message; the queue application priority refers to the priority pre-configured for the bandwidth request node in the process of retransmitting the bandwidth request message. After the bandwidth request messages of multiple different bandwidth request nodes are discarded, the order of sending the preset queue application messages corresponding to different bandwidth request nodes is positively correlated with the priority, that is, the higher the priority, the earlier the preset queue application message is sent; space refers to a certain capacity reserved for storing the target bandwidth request message.
[0121] It can be understood that after bandwidth control is performed on the bandwidth request node, if the bandwidth occupancy of the node is lower than the bandwidth lower limit, it indicates that the bandwidth demand of the node may be met, so performing step S40 can avoid the bandwidth demand of the bandwidth control node not being met, ensure that the target bandwidth request message can be properly stored, and provide a reliable data basis for meeting the bandwidth demand of the bandwidth control node.
[0122] Step S50: When the space is obtained, a preset retransmission request message is sent to the bandwidth requesting node to request the bandwidth requesting node to send the target bandwidth request message in a static message form.
[0123] It should be noted that the preset retransmission request message refers to an instruction for requesting the bandwidth request node to retransmit the discarded bandwidth request message in the form of a static message.
[0124] It is understandable that, since the bandwidth demand of the bandwidth control node is often not met due to bandwidth control, step S50 is performed to meet the bandwidth demand of the bandwidth control node as much as possible by sending a retransmission request message to the bandwidth request node when the bandwidth occupancy of the current node is relatively small, thereby ensuring the efficient execution of the corresponding work task of the node.
[0125] In a feasible implementation manner, before step S40, step S400 may also be included:
[0126] Step S400: Record the discarding time duration of the target bandwidth request message, and when the discarding time duration exceeds a preset time duration, increase the queue application priority.
[0127] It is understandable that since request starvation often occurs during bandwidth adjustment, step S400 is performed to increase the priority of the request when the request is discarded for too long, thereby preventing the request from being unsatisfied for a long time and effectively ensuring that the node's bandwidth demand is normally met.
[0128] In this embodiment, by timely instructing the bandwidth requesting node to resend the bandwidth request message, the bandwidth demand of the bandwidth control node is met, and the running smoothness and working efficiency of the overall device are further guaranteed.
[0129] For example, to help understand the implementation process of the memory bandwidth control method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flowchart of a memory bandwidth control method is provided, specifically:
[0130] When a new request enters, i.e., a target bandwidth request message is detected in a target subwindow of a preset mobile time window, the bandwidth occupancy in the current mobile time window is obtained. When the bandwidth occupancy does not exceed the maximum bandwidth, i.e., the bandwidth upper limit, it is determined whether the bandwidth occupancy is lower than the minimum bandwidth, i.e., the bandwidth lower limit. When the bandwidth occupancy is lower than the minimum bandwidth, the request is processed, i.e., the bandwidth request message is accepted; when the bandwidth occupancy is not lower than the minimum bandwidth and the current moment is not in the bandwidth control period, the request is processed; when the bandwidth occupancy exceeds the maximum bandwidth, or the bandwidth occupancy is not lower than the minimum bandwidth and the current moment is in the bandwidth control period, it is determined whether there is bandwidth competition for the current bandwidth request node, i.e., whether the minimum bandwidth configured by other bandwidth request nodes that send other bandwidth request messages, i.e., the target bandwidth lower limit, is lower than the minimum bandwidth configured by the bandwidth request node. The request is processed when there is no bandwidth competition; when there is bandwidth competition, it is determined whether the target bandwidth request message is a static message. When it is a static message, the interrupt notification software is triggered, i.e., the first software control request signal is output; when it is not a static message, the occupancy degree of the retry list, i.e., the preset discarded message linked list, is determined. When the retry list is full, the interrupt notification software is triggered, that is, the second software control request signal is output; when the retry list is not full, a retry request is made, that is, the target bandwidth request message is discarded, and a preset discard message is sent to the bandwidth request node.
[0131] For further information, please refer to Figure 5 , Figure 5 A scenario diagram of a memory bandwidth control method is provided. Specifically:
[0132] After the async fifo (asynchronous first-in-first-out queue) is used in the DDR controller (memory controller), the MPAM module monitors the bandwidth request message sent by the bandwidth request node, and transmits the monitoring result to the retry management module to decide whether to discard the bandwidth request message. At the same time, the retry management module and the request queue module jointly determine whether to request the node to resend the request.
[0133] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the memory bandwidth control method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0134] This application also provides a memory bandwidth control device, please refer to Figure 6 , the memory bandwidth control device comprises:
[0135] The monitoring module 10 is used to monitor the bandwidth request message sent by any bandwidth request node that requests bandwidth from the memory within a preset moving time window, and determine the bandwidth occupancy based on the bandwidth request message;
[0136] A detection module 20, configured to detect the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth request node;
[0137] The discarding module 30 is used to discard the target bandwidth request message monitored in the target subwindow of the preset moving time window when the bandwidth occupancy meets the preset bandwidth control condition, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0138] Optionally, the bandwidth control condition includes at least a bandwidth upper limit and a bandwidth lower limit, and the detection module 20 is further used to:
[0139] Comparing the bandwidth upper limit with the bandwidth usage;
[0140] When the bandwidth usage exceeds the bandwidth upper limit, obtaining the target bandwidth lower limit configured by other bandwidth request nodes that send other bandwidth request messages at the current monitoring time, and comparing the bandwidth lower limit with the target bandwidth lower limit;
[0141] In a case where the target bandwidth lower limit is not lower than the bandwidth lower limit, determining that the bandwidth occupancy does not meet the bandwidth control condition, and accepting the target bandwidth request message;
[0142] When the target bandwidth lower limit is lower than the bandwidth lower limit, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
[0143] Optionally, the detection module 20 is further used for:
[0144] When the bandwidth usage does not exceed the bandwidth upper limit, comparing the bandwidth lower limit with the bandwidth usage;
[0145] When the bandwidth usage is lower than the bandwidth lower limit, or the bandwidth usage is not lower than the bandwidth lower limit and the current monitoring time is not in the bandwidth control period, it is determined that the bandwidth usage does not meet the bandwidth control condition, and the target bandwidth request message is accepted, wherein the bandwidth control period is the time period from when the bandwidth usage exceeds the bandwidth upper limit to when it is less than the bandwidth lower limit;
[0146] When the bandwidth occupancy is not less than the bandwidth lower limit and the current monitoring time is in the bandwidth control period, the steps of obtaining the target bandwidth lower limit configured by other bandwidth requesting nodes that send other bandwidth request messages at the current monitoring time and comparing the bandwidth lower limit with the target bandwidth lower limit are performed.
[0147] Optionally, the detection module 20 is further used for:
[0148] Detecting the occupancy level of the preset discarded message linked list, wherein after executing the step of discarding the target bandwidth request message monitored in the target subwindow in the preset moving time window, sending the preset discarded message to the bandwidth request node, and saving the preset discarded message to the preset discarded message linked list;
[0149] In the case where the preset message linked list is full, determining that the bandwidth occupancy does not meet the preset bandwidth control condition, and outputting a first software control request signal to request software intervention to control the bandwidth;
[0150] When the preset message linked list is not full, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
[0151] Optionally, the detection module 20 is further used for:
[0152] Performing type detection on the bandwidth request message;
[0153] In the case where it is detected that the bandwidth request message is a static message, it is determined that the bandwidth occupancy does not meet the preset bandwidth control condition, and a second software control request signal is output to request software intervention to control the bandwidth, wherein the static message is a message re-sent by the bandwidth request node after the target bandwidth request message is discarded;
[0154] When it is detected that the bandwidth request message is not a static message, the step of detecting the occupancy degree of the preset message linked list is performed.
[0155] Optionally, the bandwidth request node is configured with a queue application priority, and the retransmission module 40 in the bandwidth control device in the memory is used to:
[0156] When the bandwidth occupancy is lower than the bandwidth lower limit in the preset bandwidth control condition, sending a preset queue application message to the request queue to apply for space for storing the target bandwidth request message according to the queue application priority;
[0157] In the case where the space is obtained through application, a preset retransmission request message is sent to the bandwidth requesting node to request the bandwidth requesting node to send out the target bandwidth request message in the form of a static message.
[0158] Optionally, the retransmission module 40 is further configured to:
[0159] The discarding time length during which the target bandwidth request message is discarded is recorded, and when the discarding time length exceeds a preset time length, the queue application priority is increased.
[0160] Optionally, the preset moving time window includes a plurality of sub-windows, and the monitoring module 10 is further used for:
[0161] Discard the historical sub-window farthest from the current monitoring moment in the previous moving time window to obtain the remaining historical sub-windows;
[0162] The remaining historical sub-window and the target sub-window at the current monitoring time are combined into the preset moving time window;
[0163] The bandwidth request message sent in the remaining historical sub-window is combined with the bandwidth request message sent in the target sub-window to obtain the bandwidth request message sent by the bandwidth request node in the preset moving time window.
[0164] The memory bandwidth control device provided by the present application adopts the memory bandwidth control method in the above embodiment, which can solve the technical problem of low efficiency in regulating the memory bandwidth. Compared with the prior art, the beneficial effects of the memory bandwidth control device provided by the present application are the same as the beneficial effects of the memory bandwidth control method provided by the above embodiment, and other technical features in the memory bandwidth control device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0165] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the memory bandwidth control method in the above-mentioned embodiment 1.
[0166] Reference below Figure 7, which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0167] like Figure 7 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0168] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0169] The electronic device provided by the present application adopts the memory bandwidth control method in the above embodiment, which can solve the technical problem of low efficiency in regulating the memory bandwidth. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the memory bandwidth control method provided by the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0170] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0171] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0172] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the memory bandwidth control method in the above-mentioned embodiment.
[0173] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0174] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0175] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: for any bandwidth requesting node that requests bandwidth from the memory, monitors the bandwidth request message sent by the bandwidth requesting node within a preset moving time window, and determines the bandwidth occupancy based on the bandwidth request message; detects the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth requesting node; and discards the target bandwidth request message monitored in the target subwindow of the preset moving time window when the bandwidth occupancy meets the preset bandwidth control condition, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
[0176] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0177] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0178] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0179] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the bandwidth control method of the above-mentioned memory, and can solve the technical problem of inefficient regulation of the bandwidth of the memory. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the bandwidth control method of the memory provided by the above-mentioned embodiment, and will not be repeated here.
[0180] The present application also provides a computer program product, including a computer program, which implements the steps of the memory bandwidth control method as described above when the computer program is executed by a processor.
[0181] The computer program product provided by the present application can solve the technical problem of inefficiency in regulating the bandwidth of the memory. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the memory bandwidth control method provided by the above embodiment, which will not be repeated here.
[0182] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A memory bandwidth control method, characterized in that: The memory bandwidth control method includes: For any bandwidth requesting node that requests bandwidth from the memory, monitoring the bandwidth requesting message sent by the bandwidth requesting node within a preset moving time window, and determining the bandwidth occupancy based on the bandwidth requesting message; Detecting the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth requesting node; When the bandwidth occupancy meets the preset bandwidth control condition, the target bandwidth request message monitored in the target subwindow in the preset moving time window is discarded, wherein the target subwindow is the subwindow of the preset moving time window where the current monitoring time is located.
2. The memory bandwidth control method according to claim 1, characterized in that: The bandwidth control condition at least includes a bandwidth upper limit and a bandwidth lower limit, and the step of detecting the bandwidth occupancy based on the bandwidth control condition configured by the bandwidth request node includes: Comparing the bandwidth upper limit with the bandwidth usage; When the bandwidth usage exceeds the bandwidth upper limit, obtaining the target bandwidth lower limit configured by other bandwidth request nodes that send other bandwidth request messages at the current monitoring time, and comparing the bandwidth lower limit with the target bandwidth lower limit; In a case where the target bandwidth lower limit is not lower than the bandwidth lower limit, determining that the bandwidth occupancy does not meet the bandwidth control condition, and accepting the target bandwidth request message; When the target bandwidth lower limit is lower than the bandwidth lower limit, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
3. The memory bandwidth control method according to claim 2, characterized in that: After the step of comparing the bandwidth upper limit and the bandwidth usage, the following step is further included: When the bandwidth usage does not exceed the bandwidth upper limit, comparing the bandwidth lower limit with the bandwidth usage; When the bandwidth usage is lower than the bandwidth lower limit, or the bandwidth usage is not lower than the bandwidth lower limit and the current monitoring time is not in the bandwidth control period, it is determined that the bandwidth usage does not meet the bandwidth control condition, and the target bandwidth request message is accepted, wherein the bandwidth control period is the time period from when the bandwidth usage exceeds the bandwidth upper limit to when it is less than the bandwidth lower limit; When the bandwidth occupancy is not less than the bandwidth lower limit and the current monitoring time is in the bandwidth control period, the steps of obtaining the target bandwidth lower limit configured by other bandwidth requesting nodes that send other bandwidth request messages at the current monitoring time and comparing the bandwidth lower limit with the target bandwidth lower limit are performed.
4. The memory bandwidth control method according to claim 2, characterized in that: Before the step of determining whether the bandwidth occupancy meets the preset bandwidth control condition, the step further includes: Detecting the occupancy level of the preset discarded message linked list, wherein after executing the step of discarding the target bandwidth request message monitored in the target subwindow in the preset moving time window, sending the preset discarded message to the bandwidth request node, and saving the preset discarded message to the preset discarded message linked list; In the case where the preset message linked list is full, determining that the bandwidth occupancy does not meet the preset bandwidth control condition, and outputting a first software control request signal to request software intervention to control the bandwidth; When the preset message linked list is not full, it is determined that the bandwidth occupancy meets the preset bandwidth control condition.
5. The memory bandwidth control method according to claim 4, characterized in that: The step of detecting the occupancy degree of the preset message linked list also includes: Performing type detection on the bandwidth request message; In the case where it is detected that the bandwidth request message is a static message, it is determined that the bandwidth occupancy does not meet the preset bandwidth control condition, and a second software control request signal is output to request software intervention to control the bandwidth, wherein the static message is a message re-sent by the bandwidth request node after the target bandwidth request message is discarded; When it is detected that the bandwidth request message is not a static message, the step of detecting the occupancy degree of the preset message linked list is performed.
6. The memory bandwidth control method according to claim 1, characterized in that: After the step of discarding the target bandwidth request message monitored in the target sub-window of the preset moving time window, the following step further includes: When the bandwidth occupancy is lower than the bandwidth lower limit in the preset bandwidth control condition, sending a preset queue application message to the request queue to apply for space for storing the target bandwidth request message according to the queue application priority; In the case where the space is obtained through application, a preset retransmission request message is sent to the bandwidth requesting node to request the bandwidth requesting node to send out the target bandwidth request message in the form of a static message.
7. The memory bandwidth control method according to claim 6, characterized in that: Before the step of sending the preset queue application message to the request queue, the following steps are also included: The discarding time length during which the target bandwidth request message is discarded is recorded, and when the discarding time length exceeds a preset time length, the queue application priority is increased.
8. The memory bandwidth control method according to claim 1, characterized in that: The preset moving time window includes a plurality of sub-windows, and the step of monitoring the bandwidth request message sent by the bandwidth request node within the preset moving time window includes: Discard the historical sub-window farthest from the current monitoring moment in the previous moving time window to obtain the remaining historical sub-windows; The remaining historical sub-window and the target sub-window at the current monitoring time are combined into the preset moving time window; The bandwidth request message sent in the remaining historical sub-window is combined with the bandwidth request message sent in the target sub-window to obtain the bandwidth request message sent by the bandwidth request node in the preset moving time window.
9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the memory bandwidth control method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the memory bandwidth control method according to any one of claims 1 to 7 are implemented.