A method, apparatus, and medium for memory access management in data processing.
By generating access flow window parameters and real-time address segment statistics, the problems of unstable congestion control and difficult hot spot conflict control in memory access management are solved. Stable management of access request queues and effective redirection of hot spot address segments are achieved, thereby improving the throughput stability and reliability of the data processing system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN COMOS INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-05-26
AI Technical Summary
Existing memory access management methods rely on a single metric for congestion control, leading to lagging or excessive tightening of rate limiting, accumulation of incomplete requests, and unstable latency and throughput. Conflict mitigation lacks structured characterization, hotspot address ranges are difficult to locate, and redirection effects are unstable.
By receiving and breaking down access requests, generating access flow window parameters, collecting congestion characterization data around the request queue, and performing rate limiting control; real-time address segment statistics and competition relationship modeling, constructing a channel bank conflict diagram, locating hot address segments, creating a mapping management table, and executing access redirection.
It achieves controllable access rhythm for concurrent read and write operations, reduces the backlog of unfinished requests and queuing latency fluctuations, improves throughput stability and operational reliability, reduces long-term accumulation of hotspot conflicts, and enhances the traceability and consistency of redirection behavior.
Smart Images

Figure CN121833568B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus and medium for memory access management in data processing. Background Technology
[0002] With the increasing parallelism of multi-core processors and the widespread adoption of data-intensive services, memory access in data processing scenarios has gradually evolved from single sequential access to concurrent access involving multiple processes, threads, and queues. Access patterns exhibit characteristics such as burstiness, mixed read / write operations, local hotspots, and uneven distribution across channels. To support high throughput and low latency, memory access management has gradually evolved from simple request queuing and fixed arbitration to scheduling and mapping management methods that combine access characteristics, queue status, and hardware topology constraints. More refined access isolation, congestion awareness, and conflict mitigation strategies at the processor-memory level have been introduced to improve access stability and resource utilization efficiency under concurrent conditions.
[0003] Existing methods have some shortcomings. Congestion control relies heavily on single metrics such as queue depth, lacking window constraints and access threshold linkage that match the process-level access flow. This can easily lead to lagging or over-tightening of rate limiting, resulting in the accumulation of incomplete requests, latency fluctuations, and unstable throughput. In addition, conflict mitigation often uses static distributed or fixed mapping, lacking a structured characterization of the statistical results of access address segments and the competition relationship between channels / banks. It is difficult to locate hot address segments in a timely manner and form traceable access redirection rules, resulting in long-term hot spot aggregation, unstable redirection effects, and insufficient integration with data migration consistency management. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for memory access management in data processing to solve the problems of unstable congestion control and difficulty in controlling hotspot conflicts.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for memory access management for data processing, comprising: receiving read / write access requests issued by a processor and writing them into an access request queue; performing message decomposition and field parsing on the read / write access requests to obtain request feature fields; generating access flow window parameters based on the process identifier in the request feature fields; collecting congestion characterization data around the access request queue and performing congestion determination to obtain a rate limiting control signal; updating the access flow window parameters based on the rate limiting control signal and setting an incomplete request admission threshold, so that the access request queue forms a controlled request queue constrained by the incomplete request admission threshold;
[0008] Real-time address segment statistics and competition relationship modeling are performed around the access addresses in the controlled request queue to obtain conflict characterization data. Based on the conflict characterization data, a channel bank conflict diagram is constructed and hotspot address segments are located. A mapping management table is created and access redirection rules and hotspot markers are written. Read and write commands are issued according to the controlled request queue and mapping management table, and read and write switching is constrained. The target access location is selected according to the access redirection rules, and data transfer and consistency switching are performed according to the hotspot markers. The mapping management table is updated and access receipts and access logs are sent back.
[0009] In a preferred embodiment of the memory access management method for data processing described in this invention, the steps for obtaining the request feature field are as follows:
[0010] Receive read and write access requests from the processor, create an access request queue, and write the read and write access requests to the access request queue.
[0011] Separate the header and payload content of the read / write access request, perform field parsing operations on the header and payload content to form request feature fields and write them into the access request queue;
[0012] The request feature field includes a process identifier.
[0013] In a preferred embodiment of the memory access management method for data processing described in this invention, the specific steps for generating access stream window parameters are as follows:
[0014] The process identifier is standardized and encoded to obtain the mapping index;
[0015] Based on the mapping index, select the corresponding window parameter item from the preset window parameter set, and generate the access flow window parameters by combining them according to a fixed field structure.
[0016] In a preferred embodiment of the memory access management method for data processing described in this invention, the steps of collecting congestion characterization data around the access request queue and performing congestion determination to obtain a rate limiting control signal are as follows:
[0017] Congestion characterization data is collected around the access request queue and merged according to the process identifier field of the access flow window parameter to form access flow congestion characterization data.
[0018] Perform congestion determination on the access flow congestion characterization data to generate flow limiting control signals.
[0019] In a preferred embodiment of the memory access management method for data processing described in this invention, the steps for forming a controlled request queue constrained by incomplete request admission thresholds are as follows:
[0020] Write the rate limiting control signal into the corresponding access flow window parameters according to the process identifier field;
[0021] Update the access flow window parameters based on the rate limiting control signal, and generate the admission threshold for incomplete requests;
[0022] Admission control is applied to the access request queue based on the admission threshold for incomplete requests, forming a controlled request queue.
[0023] As a preferred embodiment of the memory access management method for data processing described in this invention, the step of performing real-time address segment statistics and contention relationship modeling around the access addresses in the controlled request queue to obtain conflict characterization data includes the following specific steps.
[0024] The system performs address segmentation and address segment statistics based on the access addresses of the request feature fields in the controlled request queue, forming address segment identifiers and obtaining address segment statistics results.
[0025] Based on the address segment identifier, channel index parsing and memory bank index parsing are performed on the access address. Combined with the address segment statistics, competition relationship modeling is performed to form conflict characterization data.
[0026] In a preferred embodiment of the memory access management method for data processing described in this invention, the steps of constructing a channel bank conflict graph based on conflict characterization data and locating hotspot address segments, creating a mapping management table and writing access redirection rules and hotspot markers are as follows:
[0027] Based on the conflict characterization data, a channel bank conflict map is constructed, and hotspot location is performed on the channel bank conflict map to determine hotspot address segments and generate hotspot markers;
[0028] Create a mapping management table, determine the target channel index and target memory bank index based on hotspot address ranges and hotspot markers, generate access redirection rules and write them into the mapping management table.
[0029] In a preferred embodiment of the memory access management method for data processing described in this invention, the steps of updating the mapping management table and sending back access receipts and access logs are as follows:
[0030] Generate the target access location by matching the access address with access redirection rules;
[0031] Based on the target access location, a read / write command is generated, and after executing read / write switching constraints on the read / write command, it is issued, thus forming a read / write command issuance status;
[0032] Perform data transfer around hot address ranges, and during the data transfer process, write commands whose access addresses fall into the hot address ranges are written to the access location corresponding to the access address and the target access location, respectively.
[0033] After the data transfer is completed, the access redirection rules are modified to point to the target access location, and the mapping management table is updated. Access receipts and access logs are generated based on the status of read and write command issuance.
[0034] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the memory access management method for data processing as described in the first aspect of the present invention.
[0035] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein, when the computer program is executed by a processor, it implements any step of the memory access management method for data processing as described in the first aspect of the present invention.
[0036] The beneficial effects of this invention are as follows: by controlling the size of the access request queue through congestion determination and the incomplete request admission threshold linkage, the access rhythm of concurrent read and write operations can be controlled, the accumulation of incomplete requests and queuing latency fluctuations can be reduced, and the overall throughput stability and operational reliability can be improved; by locating hotspot address ranges and managing access redirection rules, the load on the channel and memory bank can be more balanced, the long-term accumulation of hotspot conflicts and read / write jitter can be reduced, and the traceability and consistency guarantee capability of redirection behavior can be improved. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 A flowchart of a method for memory access management used for data processing.
[0039] Figure 2 A flowchart for generating access flow window parameters.
[0040] Figure 3 A flowchart for implementing access control.
[0041] Figure 4 A flowchart for generating access receipts and access logs.
[0042] Figure 5 A chart comparing the count of incomplete requests with the threshold for incomplete requests.
[0043] Figure 6 This is a heatmap comparing congestion determination values. Detailed Implementation
[0044] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0045] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0046] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0047] Reference Figures 1-6 As one embodiment of the present invention, this embodiment provides a method for memory access management for data processing, comprising the following steps:
[0048] S1. Receive read / write access requests from the processor and write them to the access request queue. Perform message decomposition and field parsing on the read / write access requests to obtain the request feature field. Generate access flow window parameters based on the process identifier in the request feature field.
[0049] S1.1 Receive read / write access requests from the processor, create an access request queue, write the read / write access requests into the access request queue, and separate the header content and payload content of the read / write access requests.
[0050] It should be noted that after receiving a read / write access request from the receiving processor, an access request queue is created and a queue record is generated for the read / write access requests. The read / write access requests are written into the queue record in the order of receipt to form message data to be disassembled. The message data to be disassembled is disassembled and the message header length field value and the message total length field value are parsed. The starting byte position of the message data to be disassembled is used as the offset starting point. The offset starting point is summed with the message header length field value to obtain the message header end offset. The offset starting point is summed with the message total length field value to obtain the message end offset. If the message total length field value is less than the message header length field value, the read / write access request is marked as a message length error and disassembly is stopped. If the message total length field value is not less than the message header length field value, the message header content is obtained from the offset starting point to the message header end offset and written into the queue record header area. The message payload content is obtained from the message header end offset to the message end offset and written into the queue record payload area.
[0051] S1.2 Perform field parsing operations on the message header content and message payload content to form a request feature field and write it into the access request queue. The request feature field contains the process identifier.
[0052] It should be noted that field parsing operations are performed on the message header content and message payload content. The field parsing operation extracts the process identifier field byte sequence and the read / write type field byte sequence from the message header content and the access address field byte sequence and the access size field byte sequence from the message payload content according to the field offset and field length specified in the read / write access request message format.
[0053] Perform byte order conversion operations on the process identifier field byte sequence, read / write type field byte sequence, access address field byte sequence, and access size field byte sequence respectively. The byte order conversion operation rearranges the field byte sequences in order from the most significant byte to the least significant byte according to the byte order specified in the read / write access request message format, and uses shift operations combined with bitwise OR operations to synthesize the field byte sequences into field values. The process identifier field value, access address field value, read / write type field value, and access size field value are encapsulated together to form a request feature field, and the request feature field is written into the corresponding queue record in the access request queue.
[0054] S1.3. Perform standardized encoding on the process identifier to obtain the mapping index, select the corresponding window parameter item from the preset window parameter set according to the mapping index, and generate the access flow window parameters by combining them according to a fixed field structure.
[0055] It should be noted that a standardized encoding operation is performed on the process identifier field byte sequence. Specifically, the process identifier field byte sequence is converted into the unified byte order specified in the read / write access request message format, and the process identifier field byte sequence after unified byte order is used as a fixed-length encoded string. The fixed length is the field length specified in the process identifier field in the read / write access request message format.
[0056] A mapping index generation operation is performed on the fixed-length encoded string. Specifically, a deterministic hash mapping is used to convert the fixed-length encoded string into a mapping index. Based on the mapping index, the corresponding window parameter item is selected from the preset window parameter set, and the window parameter item is encapsulated according to a fixed field structure to generate access flow window parameters. The preset window parameter set is pre-configured with multiple window parameter items when the access request queue is created, and they are collected and stored to form the preset window parameter set. The fixed field structure is the parameter entry format of the access flow window parameters, including a process identifier field, a window upper limit field, and a window current count field. The process identifier field is written with the process identifier field value, the window upper limit field is written with the window parameter item, and the window current count field is written with the initial count value. The fixed field structure is defined when the access request queue is created.
[0057] S2. Collect congestion characterization data around the access request queue, perform congestion determination to obtain the rate limiting control signal, update the access flow window parameters according to the rate limiting control signal, and set the admission threshold for incomplete requests, so that the access request queue forms a controlled request queue constrained by the admission threshold for incomplete requests.
[0058] S2.1 Collect congestion characterization data around the access request queue, and merge the congestion characterization data according to the process identifier field of the access flow window parameter to form access flow congestion characterization data.
[0059] It should be noted that a congestion collection period is established with the access request queue as the collection object. The congestion collection period is defined as the traversal interval from the start number to the end number of the queue record in the access request queue at the same collection time. The end number of the queue record is determined by the number of queue records in the access request queue at the collection time.
[0060] During the congestion collection period, the queue records of the access request queue are traversed one by one, and congestion characterization data is collected during the traversal. The congestion characterization data includes queue depth count, queue count, read-write switch count, and incomplete request count. The queue depth count is obtained from the number of queue records in the traversal interval. The queue count is obtained from the number of queue records in the pending state in the traversal interval. The read-write switch count is obtained from the number of times the value of the read-write type field in the request characteristic field of adjacent queue records in the traversal interval changes. The incomplete request count is obtained by summing the values of the window current count field of the access flow window parameters in the traversal interval.
[0061] After collecting congestion characterization data, the congestion characterization data is merged according to the process identifier field of the access flow window parameters. The queue depth count, queue count, read-write switch count and uncompleted request count corresponding to the same process identifier field are aggregated to form access flow congestion characterization data, and the access flow congestion characterization data is associated and written into the access flow window parameters.
[0062] S2.2 Perform congestion determination on the access flow congestion characterization data to generate a rate limiting control signal, and write the rate limiting control signal into the corresponding access flow window parameter according to the process identifier field of the access flow window parameter.
[0063] It should be noted that, based on the access flow congestion characterization data, congestion determination is performed to generate rate limiting control signals. The congestion determination normalizes the queue depth count, queue count, read / write switch count, and incomplete request count in the access flow congestion characterization data, along with the window upper limit field of the access flow window parameters, to form the queue occupancy ratio, read / write switch occupancy ratio, and incomplete request occupancy ratio. The normalization expression is as follows:
[0064] , , ;
[0065] in, Indicates the queuing occupancy rate; Indicates queue counting; Indicates the queue depth count; Indicates the read / write switching usage ratio; Indicates the read / write switch count; Indicates the percentage of occupancy not yet completed; This indicates the number of incomplete requests; This field represents the upper limit of the window.
[0066] Congestion determination is based on the maximum value among the queuing occupancy ratio, read / write switching occupancy ratio, and incomplete occupancy ratio. The expression is as follows:
[0067] ;
[0068] in, This indicates the congestion determination value.
[0069] The low congestion interval is defined as zero to the first threshold, the medium congestion interval is defined as the first threshold to the second threshold, and the high congestion interval is defined as the second threshold to one. The first threshold is taken at one-third of the zero-to-one interval (e.g., 0.33), and the second threshold is taken at two-thirds of the zero-to-one interval (e.g., 0.66). The first and second thresholds are used to form equal-width gradations on the normalized scale and reduce the gradation bias caused by threshold parameter tuning, so that the current limiting control signal maintains a balance between gradation sensitivity and gradation stability when switching between the low, medium, and high congestion intervals.
[0070] When the first threshold is greater than one-third, the expansion of the low-congestion interval increases the probability that the congestion judgment value falls into the low-congestion interval, and delays the triggering of the rate limiting control signal tightening state. The access request queue is more likely to accumulate queue counts and incomplete request counts during the congestion growth phase. When the first threshold is less than one-third, the shrinking of the low-congestion interval causes the congestion judgment value to enter the medium-congestion interval earlier, and triggers the rate limiting control signal tightening state earlier. The access flow window parameters tighten earlier and may reduce the throughput release speed of the access request queue. When the second threshold is greater than two-thirds, the shrinking of the high-congestion interval delays the triggering of the strong tightening state and increases the dwell time in the medium-congestion interval. During the hot spot conflict phase, the rate limiting control signal may last for a longer period of time with a weaker signal. When the second threshold is less than two-thirds, the expansion of the high-congestion interval causes the triggering of the strong tightening state to occur earlier and shortens the dwell time in the medium-congestion interval. The access flow window parameters are more likely to enter the strong tightening state and may cause excessive rate limiting.
[0071] The congestion level is determined by comparing the congestion assessment value with low-congestion, medium-congestion, and high-congestion intervals. This congestion level is then mapped to generate a flow-limiting control signal. Specifically, a correspondence between congestion levels and flow-limiting control signals is pre-established. The flow-limiting control signal is encapsulated using a fixed-field structure, which includes at least a control state field and a window adjustment mode field. The control state field represents three control states: maintain, tighten, and strongly tighten. The window adjustment mode field represents three adjustment modes: the window upper limit field remains unchanged, the window upper limit field is tightened, and the window upper limit field is strongly tightened. After obtaining the congestion level, the control state field and window adjustment mode field are filled in according to the correspondence between the congestion level and the flow-limiting control signal to complete the generation of the flow-limiting control signal. The flow window parameters are matched according to the process identifier field of the access flow congestion characterization data, and the flow-limiting control signal is written into the access flow window parameters.
[0072] Figure 6 The distribution differences of congestion judgment values of the control group (overall) and different access flows (access flows 0-3) of the present invention over the complete data collection time sequence were compared using heatmaps. Higher values indicate higher congestion levels, and lower values indicate lower congestion levels. It can be seen that the control group as a whole exhibited a sustained high congestion state over a longer period, while the present invention showed a more obvious dispersion and alternation of congestion judgment values among different access flows during the same load evolution process. This indicates that the present invention can diffuse pressure from a single queue / channel to multiple access flows and dynamically converge, avoiding sustained high congestion caused by long-term accumulation of hotspot conflicts. Therefore... Figure 6 The time dimension intuitively reflects that the present invention, through congestion determination and window linkage, as well as subsequent access flow management and scheduling, makes the degree of congestion more adjustable and controllable, and helps to reduce read and write jitter and improve the long-term operational stability of the system.
[0073] S2.3 Update the access flow window parameters based on the rate limiting control signal and generate the admission threshold for incomplete requests. Perform admission control on the access request queue based on the admission threshold for incomplete requests to form a controlled request queue.
[0074] It should be noted that when performing update rule matching on the rate limiting control signal in the access flow window parameters, if the control status field is "maintain" and the window adjustment mode field indicates that the window upper limit field remains unchanged, the current value of the window upper limit field of the access flow window parameters remains unchanged; if the control status field is "tighten" and the window adjustment mode field indicates that the window upper limit field is tightened, the current value of the window upper limit field of the access flow window parameters is used to match the window parameter item in the preset window parameter set, and the window parameter item whose window upper limit field value is adjacent to the smaller level is selected, and the window upper limit field value of the selected window parameter item is replaced by the window upper limit field value written to the access flow window parameters; if the control status field is "strong tightening" and the window adjustment mode field indicates that the window upper limit field is strongly tightened, the current value of the window upper limit field of the access flow window parameters is used to match the window parameter item in the preset window parameter set, and the window upper limit field value of the selected window parameter item is selected to cross the smaller level of the window parameter item, and the window upper limit field value of the selected window parameter item is replaced by the window upper limit field value written to the access flow window parameters; the lower limit value of the window upper limit field is defined as the minimum value of the window upper limit field value of all window parameter items in the preset window parameter set.
[0075] After the upper limit field of the window is replaced and written, the lower limit constraint processing is performed. When the upper limit field of the window is less than the lower limit value of the upper limit field of the window, the upper limit field of the window is set to the lower limit value of the upper limit field of the window. The admission threshold for incomplete requests is defined as the current value of the upper limit field of the access flow window parameter. Admission control is performed on the access request queue. The admission control matches the process identifier field in the request feature field with the access flow window parameter, and uses the current count field value of the access flow window parameter as the count of incomplete requests. The count of incomplete requests is compared with the admission threshold for incomplete requests. Queue records with incomplete request counts less than the admission threshold for incomplete requests are added to the controlled request queue, and queue records with incomplete request counts not less than the admission threshold for incomplete requests are retained in the access request queue. The admission control is completed to form the controlled request queue.
[0076] It should be noted that existing technologies often use a method of overall congestion assessment and unified rate limiting for the access request queue. This makes it difficult to distinguish different access flows based on the process identifier field, which can easily lead to non-congested access flows being rate-limited as well, and congested access flows being constrained in a timely manner with coarse-grained admission control. This solution generates a rate limiting control signal by merging congestion characterization data according to the process identifier field, and updates the access flow window parameters accordingly to generate admission thresholds for incomplete requests. This allows for admission control of the access request queue, forming a controlled request queue. This achieves stable rate limiting and fine-grained admission at the access flow granularity, resulting in faster congestion convergence, more controllable queue accumulation, and smaller fluctuations during read / write switching. It also reduces the restriction of irrelevant access flows and improves overall access efficiency and service fairness.
[0077] Figure 5The changes in the number of incomplete requests as of the collection time were compared between the control group and the present invention under different process identifier fields (process identifier field = 0 / 1), and the corresponding incomplete request threshold curve of the present invention was also given. As can be seen from the overview, the incomplete request count of the present invention can still form a controlled fluctuation around the threshold under the access load fluctuation and hot spot phases, avoiding long-term accumulation and rise. The interval marked by the red dashed box is magnified locally below. In the local figure, from left to right, peak 1 - the point of maximum local difference - peak 2 are marked. It can be seen intuitively that at the point of maximum difference, the incomplete request count of the present invention deviates less and falls back faster than that of the control group. This shows that by linking congestion judgment with the incomplete request threshold control, the access rhythm can be more controllable, the accumulation of incomplete requests and queuing delay fluctuations can be reduced, thereby improving the overall throughput stability and operational reliability.
[0078] S3. Perform real-time address segment statistics and competition relationship modeling around the access addresses in the controlled request queue to obtain conflict characterization data. Based on the conflict characterization data, construct a channel bank conflict map and locate hotspot address segments. Create a mapping management table and write access redirection rules and hotspot markers.
[0079] S3.1 Perform address segmentation and address segment statistics based on the access address of the request feature field in the controlled request queue, form address segment identifiers and obtain address segment statistics results.
[0080] It should be noted that address segmentation is performed around the access address field value of the request feature field. The value of the fixed address segment span is determined based on the address bit segment used for channel index parsing and memory bank index parsing. The fixed address segment span is the minimum byte span that keeps the channel index and memory bank index corresponding to the access address field value within the same address segment unchanged and is stored in a fixed manner.
[0081] The access address field value is used to perform address segment alignment to generate the address segment start address. Specifically, the ratio of the access address field value to the fixed address segment span is calculated, rounded, and then multiplied by the fixed address segment span to obtain the address segment start address. An address segment identifier is then generated using this address. The expression is as follows:
[0082] ;
[0083] ;
[0084] in, Indicates the starting address of the address segment; This indicates the value of the access address field; Indicates the span of a fixed address range; Indicates the address range identifier.
[0085] After the address segment identifier is formed, the controlled request queue is merged according to the address segment identifier and the address segment statistics are performed. The number of read accesses and the number of write accesses are accumulated according to the value of the read and write type field in the request characteristic field, and the number of read accesses and the number of write accesses are added together to obtain the number of accesses. The results of address segment statistics are collected and the address segment identifier is retained.
[0086] S3.2. Based on the address segment identifier, perform channel index parsing and memory bank index parsing on the access address, and combine the address segment statistical results to perform competition relationship modeling to form conflict characterization data.
[0087] It should be noted that channel index parsing and memory bank index parsing are performed on the access address field value of the request feature field. Channel index parsing performs bit segment truncation on the access address field value according to the preset channel bit segment to obtain the channel index value. Memory bank index parsing performs bit segment truncation on the access address field value according to the preset bank bit segment to obtain the memory bank index value. The channel index value and the memory bank index value are then associated with the address segment identifier to form an address segment index pair.
[0088] The preset channel field and the preset bank field are defined as two non-overlapping consecutive bit fields in the access address field value. The preset channel field is located above the low bits covered by the fixed address field span alignment and is used to represent the channel index value. The preset bank field and the preset channel field do not overlap and are used to represent the memory bank index value.
[0089] Competition relationship modeling is performed based on address segment statistics. Equality comparison is performed on address segment index pairs with different address segment identifiers. Address segment identifiers with the same channel index value and the same memory bank index value are identified as channel bank competition relationships. Address segment identifiers with the same channel index value and different memory bank index values are identified as channel competition relationships. Address segment identifiers with different channel index values and the same memory bank index value are identified as memory bank competition relationships. Conflict characterization data is generated based on the number of accesses, read accesses, and write accesses in the address segment statistics.
[0090] S3.3 Construct a channel bank conflict map based on conflict representation data, and perform hotspot location on the channel bank conflict map to determine hotspot address segments and generate hotspot markers.
[0091] It should be noted that a channel bank conflict graph is constructed based on conflict characterization data and address segment statistics. Specifically, the channel bank conflict graph uses address segment identifiers as graph vertices, and associates each graph vertex with a channel index value and a memory bank index value. The address segment identifiers of channel bank competition relationships, channel competition relationships, and memory bank competition relationships are established as connection relationships between vertices to form graph edges, and the sum of the access counts corresponding to the address segment identifiers at both ends of the connection relationship in the address segment statistics results is used as the graph edge weight.
[0092] Hotspot localization is performed on the channel bank conflict graph. Hotspot localization summarizes the edge weights of the associated graph for each address segment identifier to obtain the cumulative conflict intensity, and sorts the cumulative conflict intensity. Within each connected subgraph, the address segment identifier with the highest cumulative conflict intensity is selected to determine the hotspot address segment, and a hotspot marker is generated for the hotspot address segment. The hotspot marker is associated with the address segment identifier of the hotspot address segment. The connected subgraph is obtained by traversing the connectivity of the channel bank conflict graph.
[0093] S3.4. Create a mapping management table, determine the target channel index and target memory bank index based on the hotspot address range and hotspot marker, generate access redirection rules and write them into the mapping management table.
[0094] It should be noted that a mapping management table is created, and the table entry field structure is defined for the mapping management table. The table entry field structure includes an address segment identifier field, a channel index value field, a memory bank index value field, a target channel index field, a target memory bank index field, a hotspot marker field, and an access redirection rule field. For the address segment identifier of the hotspot address segment, the channel index value and memory bank index value are determined based on the channel index value and memory bank index value associated with the address segment identifier in the channel bank conflict diagram. A candidate index pair set is generated based on the address segment index pairs, and the candidate index pair set is obtained by deduplicating and aggregating the address segment index pairs. The candidate load value is calculated for the candidate channel index value and candidate memory bank index value in the candidate index pair set, with the expression being,
[0095] ;
[0096] in, Indicates candidate index pairs Corresponding candidate load values; Indicates the candidate channel index value; Indicates the candidate memory bank index value; Address range identifier The corresponding number of visits; Indicates the address range identifier index; This indicates an indicator function; the value is 1 if the condition within the parentheses is true, and 0 if the condition is false. Address range identifier The corresponding channel index value; Indicates address range identifier The corresponding memory bank index value; Address range identifier Simultaneously falling on the candidate channel index value and candidate memory bank index value On the combination of .
[0097] The expression for calculating the candidate load value means traversing all address segment identifiers. Only set the channel index value to equal And the memory bank index value is equal to The number of accesses identified by the address range Accumulate to obtain candidate load values .
[0098] From the candidate index pair set, select the candidate index pair with the smallest candidate load value that is not exactly the same as the channel index value and the memory bank index value, and determine it as the target channel index and the target memory bank index. Based on the address segment identifier, the target channel index, the target memory bank index, and the hot spot marker, generate access redirection rules. The access redirection rules are defined as follows: for access addresses that match the address segment identifier, execute the rule of replacing the channel index value and the memory bank index value with the target channel index and the target memory bank index. Then, associate the address segment identifier, the channel index value, the memory bank index value, the target channel index, the target memory bank index, the hot spot marker, and the access redirection rules in the mapping management table.
[0099] It should also be noted that existing technologies often use segmentation based on access addresses and select channel index values and memory bank index values according to fixed mappings. This makes it difficult to accurately identify the contention positions of hot address segments, which can easily lead to long-term concentration of hotspots, unstable conflict mitigation, and a lack of basis for redirection. This solution, by forming hot address segments and access redirection rules and registering them in the mapping management table, enables hotspots to be distributed to low-conflict positions more quickly, reducing queuing and jitter caused by channel and bank competition, improving the balance of conflict distribution and concurrency stability, reducing invalid redirection and enhancing the traceability of redirection behavior, and improving overall access efficiency.
[0100] S4. Issue read / write commands and constrain read / write switching based on the controlled request queue and mapping management table. Select the target access location according to the access redirection rules, perform data transfer and consistency switching according to hotspot marking, update the mapping management table, and send back access receipts and access logs.
[0101] S4.1. Based on the access address, match the access redirection rules to generate the target access location, generate read and write commands based on the target access location, and issue the read and write commands after executing read and write switching constraints, thus forming a read and write command issuance status.
[0102] It should be noted that, for the request characteristic fields carried by the queue records in the controlled request queue, access redirection rule matching is performed in the mapping management table using the address segment identifier associated with the queue record. The matching uses an equal value comparison of the address segment identifier field to determine candidate entries. If there is only one candidate entry and the target channel index field and the target memory bank index field of the candidate entry have valid values, the match is considered successful. The target channel index field and the target memory bank index field are taken, and the difference between the access address field value and the starting address of the address segment corresponding to the address segment identifier is calculated to obtain the offset within the address segment. The target channel index field, the target memory bank index field, and the offset within the address segment are combined to determine the target access location. If there is more than one candidate entry or the target channel index field and the target memory bank index field of the candidate entry do not have valid values, the match is considered unsuccessful. The channel index parsing and memory bank index parsing are performed on the access address field value to obtain the channel index value and the memory bank index value. The channel index value, the memory bank index value, and the offset within the address segment are combined to determine the target access location.
[0103] The values of the read / write type field, the access size field, and the target access location are encapsulated to generate read / write commands. After the read / write commands are generated, read / write switching constraints are executed. If the value of the read / write type field is inconsistent with the value of the read / write type field corresponding to the most recently issued read / write command, the issuance of the read / write command is temporarily suspended, and read / write commands with the same value of the read / write type field are issued first, until there are no read / write commands with the same value of the read / write type field to be issued. Then, the suspended read / write command is issued. After the read / write command is issued, the issuance success flag or issuance failure flag is associated with the queue record to form the read / write command issuance status.
[0104] S4.2 Perform data transfer around the hot address range, and during the data transfer, write commands that access addresses fall into the hot address range are written to the access location corresponding to the access address and the target access location respectively.
[0105] It should be noted that data transfer is performed around the hotspot address range associated with the hotspot marker in the mapping management table. The coverage of the hotspot address range is determined based on the address range identifier of the hotspot address range. The starting boundary of the coverage of the hotspot address range is taken as the starting address of the address range, and the ending boundary of the coverage of the hotspot address range is taken as the ending address of the address range obtained by summing the starting address of the address range and the span of the fixed address range.
[0106] The coverage area of the hotspot address segment is divided into a continuous sequence of transported access addresses based on the step length determined by the access size field value. Transport operations are performed on each transported access address sequence. Channel index parsing and memory bank index parsing are performed on the transported access addresses to obtain the channel index value and memory bank index value. Combined with the offset within the address segment of the transported access address, the access position corresponding to the access address is formed. The target channel index field and target memory bank index field of the hotspot address segment table entry are taken, and combined with the offset within the same address segment, the transported target access position is formed. A read operation is performed on the access position corresponding to the access address to obtain the transported data, and a write operation is performed on the transported target access position to complete the data transport.
[0107] During data transfer, an equality comparison is performed between the address segment identifier associated with the queue record of the write command in the controlled request queue and the address segment identifier of the hot address segment. If the equality comparison is successful, a double write operation is performed using the target access location carried by the write command and the access location corresponding to the access address. The double write operation writes the write command to the access location corresponding to the access address and the target access location carried by the write command, respectively. When both write operations form a successful delivery marker, the write command is marked as double write complete. After the entire access address sequence has been transferred, the data transfer is complete.
[0108] S4.3 After completing the data transfer, modify the access redirection rule to point to the target access location, update the mapping management table, and generate access receipts and access logs based on the read and write command issuance status.
[0109] It should be noted that, for the address segment identifiers associated with the hotspot markers in the mapping management table, the access redirection rules in the corresponding entries are modified to point to the target access location. Specifically, the channel index value field and the memory bank index value field in the corresponding entries are replaced with the target channel index field and the target memory bank index field, respectively. The access redirection rule fields are then modified to directly use the channel index value field and the memory bank index field, combined with the offset within the address segment, to determine the target access location for the access address matching the address segment identifier. After the access redirection rules are modified, double-write operations on hotspot address segments are stopped.
[0110] Based on the read / write command issuance status associated with the queue records, access receipts and access logs are generated. The access receipts are generated according to the issuance success flag or issuance failure flag, corresponding to the success receipt code or failure receipt code, and are associated with the process identifier field, access address field, read / write type field, access size field, and target access location. The process identifier field, address segment identifier, target access location, issuance success flag, issuance failure flag, and data transfer completion status are collected in the order of the queue records to form the access log output.
[0111] This embodiment also provides a computer device suitable for a method of memory access management for data processing, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the memory access management method for data processing as proposed in the above embodiment.
[0112] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0113] This embodiment also provides a storage medium storing a computer program thereon. When executed by a processor, the program implements the memory access management method for data processing as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0114] In summary, this invention achieves controllable access rhythm for concurrent read and write operations by linking congestion determination with incomplete request admission thresholds to control the size of the access request queue, reducing the accumulation of incomplete requests and queuing latency fluctuations, and improving overall throughput stability and operational reliability. Furthermore, by locating hotspot address ranges and managing access redirection rules, it achieves a more balanced load on the channel and memory banks, reducing long-term hotspot conflicts and read / write jitter, and improving the traceability and consistency of redirection behavior.
[0115] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for memory access management in data processing, characterized in that: include, Receive read and write access requests from the processor and write them to the access request queue. Perform message decomposition and field parsing on the read and write access requests to obtain the request feature field. Generate access flow window parameters based on the process identifier in the request feature field. Congestion characterization data is collected around the access request queue, and congestion determination is performed to obtain the rate limiting control signal. The access flow window parameters are updated according to the rate limiting control signal, and the admission threshold for incomplete requests is set, so that the access request queue becomes a controlled request queue constrained by the admission threshold for incomplete requests. Real-time address segment statistics and competition relationship modeling are performed around the access addresses in the controlled request queue to obtain conflict characterization data. Based on the conflict characterization data, a channel bank conflict map is constructed and hotspot address segments are located. A mapping management table is created and access redirection rules and hotspot markers are written. Based on the controlled request queue and mapping management table, issue read and write commands and constrain read and write switching, select the target access location according to the access redirection rules, perform data migration and consistency switching according to hot spot marking, update the mapping management table and send back access receipts and access logs; The specific steps for generating the access flow window parameters are as follows: The process identifier is standardized and encoded to obtain the mapping index; Based on the mapping index, select the corresponding window parameter item from the preset window parameter set, and generate the access flow window parameters by combining them according to a fixed field structure; The process involves real-time address segment statistics and contention relationship modeling around the access addresses in the controlled request queue to obtain conflict characterization data. The specific steps are as follows: The system performs address segmentation and address segment statistics based on the access addresses of the request feature fields in the controlled request queue, forming address segment identifiers and obtaining address segment statistics results. Based on the address segment identifier, channel index parsing and memory bank index parsing are performed on the access address. Combined with the address segment statistical results, competition relationship modeling is performed to form conflict characterization data. The specific steps for constructing a channel bank conflict map based on conflict characterization data, locating hotspot address segments, creating a mapping management table, and writing access redirection rules and hotspot markers are as follows. Based on the conflict characterization data, a channel bank conflict map is constructed, and hotspot location is performed on the channel bank conflict map to determine hotspot address segments and generate hotspot markers; Create a mapping management table, determine the target channel index and target memory bank index based on hotspot address ranges and hotspot markers, generate access redirection rules and write them into the mapping management table.
2. The method for memory access management for data processing as described in claim 1, characterized in that: The specific steps for obtaining the requested feature fields are as follows: Receive read and write access requests from the processor, create an access request queue, and write the read and write access requests to the access request queue. Separate the header and payload content of the read / write access request, perform field parsing operations on the header and payload content to form request feature fields and write them into the access request queue; The request feature field includes a process identifier.
3. The method for memory access management for data processing as described in claim 1, characterized in that: The specific steps for collecting congestion characterization data around the access request queue and performing congestion determination to obtain the rate limiting control signal are as follows: Congestion characterization data is collected around the access request queue and merged according to the process identifier field of the access flow window parameter to form access flow congestion characterization data. Perform congestion determination on the access flow congestion characterization data to generate flow limiting control signals.
4. The memory access management method for data processing as described in claim 3, characterized in that: The specific steps for forming a controlled request queue constrained by the incomplete request admission threshold are as follows. Write the rate limiting control signal into the corresponding access flow window parameters according to the process identifier field; Update the access flow window parameters based on the rate limiting control signal, and generate the admission threshold for incomplete requests; Admission control is applied to the access request queue based on the admission threshold for incomplete requests, forming a controlled request queue.
5. The method for memory access management for data processing as described in claim 1, characterized in that: The specific steps for updating the mapping management table and sending back access receipts and access logs are as follows. Generate the target access location by matching the access address with access redirection rules; Based on the target access location, a read / write command is generated, and after executing read / write switching constraints on the read / write command, it is issued, thus forming a read / write command issuance status; Perform data transfer around hot address ranges, and during the data transfer process, write commands whose access addresses fall into the hot address ranges are written to the access location corresponding to the access address and the target access location, respectively. After the data transfer is completed, the access redirection rules are modified to point to the target access location, and the mapping management table is updated. Access receipts and access logs are generated based on the status of read and write command issuance.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the memory access management method for data processing as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the memory access management method for data processing as described in any one of claims 1 to 5.