A method and apparatus for processing Evict requests in CHI interconnect.
By setting up a POCQ bypass channel in HN-F to handle Evict requests, the problem of Evict requests occupying POCQ entries is solved, improving system memory access efficiency and interconnect processing efficiency.
Patent Information
- Application Number
- CN202611413268.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-17
AI Technical Summary
In on-chip interconnect systems based on the CHI protocol, eviction requests occupying POCQ entries can cause POCQ to become full, increasing the probability of retry and reducing system memory access efficiency.
Configure a POCQ bypass channel in HN-F to process Evict requests through a bypass queue, preventing them from occupying the POCQ main channel entry. This ensures that bypass processing is performed only when there are no address conflicts and the bypass queue is not full.
Reduce the occupancy of the POCQ main channel by Evict requests, lower the probability of POCQ saturation and retry, and improve system memory access read/write bandwidth and overall interconnect processing efficiency.
Smart Images

Figure CN123114768A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of chip interconnect and cache coherency processing technology, and more specifically, to a method and apparatus for processing Evict requests in a CHI interconnect. Background Technology
[0002] In on-chip interconnect systems based on the CHI (Coherent Hub Interface) protocol, the Fully Coherent Home Node (HN-F) typically acts as a cache consistency management node, maintaining cache consistency among requesting nodes within the system. Within the HN-F, the Point of Coherence Queue (POCQ) is typically used to track and order requests arriving at the PoC point, ensuring that dependencies between cache consistency requests are handled correctly. For access requests involving the same cache line address, the POCQ is responsible for request serialization, conflict detection, Snoop behavior management, and response collection, thereby guaranteeing system cache consistency.
[0003] In scenarios where the CPU is running operating systems, large AI models, or other heavy workloads, the CPU's private cache will frequently undergo cache line replacement. For a replaced cache line, the requesting node typically needs to send an Evict request to HN-F so that the consistency point can know that the cache line has been released and update the tag and status information of the corresponding cache line in the Snoop Filter directory accordingly.
[0004] In existing processing methods, eviction requests typically enter the POCQ like other consistency requests and occupy the POCQentry. For requests that require memory access, Snoop access, or waiting for the convergence of multiple responses, entering the POCQ ensures consistent processing and timing dependencies; however, eviction requests are dataless requests, and on the HN-F side, they typically only need to update the Snoop Filter catalog state and return a Comp response, without requiring data migration processing such as memory access or Snoop access.
[0005] However, in existing solutions, even though the EVIT request processing flow is relatively simple, it still allocates a POCQ entry. Since POCQ entries are high-cost and depth-limited queue resources, when cache replacement is frequent, a large number of short-lived, low-complexity EVIT requests will occupy POCQ entries, reducing the available POCQ resources for requests that truly require memory access or Snoop processing, thus making it easier for POCQs to become full. When a POCQ is full, HN-F may trigger a retry mechanism, requiring requesting nodes to resend requests, resulting in additional latency and interconnect bandwidth consumption, and reducing system memory access efficiency. Summary of the Invention
[0006] This disclosure provides at least one method and apparatus for processing eviction requests in a CHI interconnect. By setting up a POCQ bypass channel in the HN-F, and when an eviction request meets conditions such as no address conflict and the bypass queue not being full, the eviction request is moved out of the POCQ main channel for bypass processing, allowing it to complete tracing, Snoop Filter directory updates, and Comp response returns through the bypass queue. This reduces the occupancy of POCQ main channel entries by eviction requests, lowers the probability of POCQ fullness and retry occurrences, shortens the average request latency, and improves system memory access read / write bandwidth and overall interconnect processing efficiency.
[0007] This disclosure provides a method for processing Evict requests in a CHI interconnect, applied to a fully consistent master node. The fully consistent master node is configured with a POCQ main channel and a POCQ bypass channel for processing Evict requests. The method includes: Receive cache consistency requests from requesting nodes; Parse the cache consistency request to determine the request type. When the request type indicates that the cache consistency request is an Evict request, based on the request address of the Evict request, a unified address conflict detection is performed on the incomplete requests in the POCQ main channel and the POCQ bypass channel to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel. If there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, check whether the bypass queue in the POCQ bypass channel meets the receiving conditions. If the bypass queue meets the receiving conditions, the Evict request is allocated to the bypass queue of the POCQ bypass channel, and the Snoop Filter update request from the POCQ main channel and the POCQ bypass channel is arbitrated through the Snoop Filter access arbitrator. Based on the Snoop Filter update request selected by the arbitrator, the directory status of the corresponding cache line in the Snoop Filter directory is updated. After completing the directory status update, a Comp response corresponding to the Evict request is generated, and the queue item corresponding to the Evict request in the bypass queue is released after the Comp response is returned.
[0008] In one optional implementation, based on the request address of the Evict request, unified address conflict detection is performed on incomplete requests in the POCQ main channel and the POCQ bypass channel, including: Obtain the cache line address carried in the Evict request; Query the request addresses corresponding to the requests that are in an incomplete state in the POCQ main channel, and the request addresses corresponding to the Evict requests that are in an incomplete state in the bypass queue of the POCQ bypass channel. If the cache line address is the same as the request address corresponding to any incomplete request in the POCQ main channel or the bypass queue, an address conflict is determined to exist. If the cache line address is different from the request addresses corresponding to each incomplete request in the POCQ main channel and the bypass queue, it is determined that there is no address conflict.
[0009] In one optional implementation, detecting whether the bypass queue in the POCQ bypass channel meets the reception conditions includes: Obtain the current occupancy status of the bypass queue; If the current occupancy status indicates that the bypass queue is not full, it is determined that the bypass queue meets the receiving conditions; If the current occupancy status indicates that the bypass queue is full, it is determined that the bypass queue does not meet the receiving conditions.
[0010] In one optional implementation, the method further includes: If an incomplete request with the same address as the Evict request is detected in the POCQ main channel or the POCQ bypass channel, the Evict request will be assigned to the POCQ main channel. The processing of the Evict request is blocked until the incomplete request at the same address is completed; After the incomplete request at the same address is completed and the corresponding queue item is released, the processing flow of the Evict request in the POCQ main channel is initiated.
[0011] In one optional implementation, allocating the Evict request to the bypass queue of the POCQ bypass channel includes: Allocate a queue entry for the Evict request in the bypass queue; The queue entry records at least one of the following information: the request address, request identifier, and response status of the Evict request. The queue item is used to track the Evict request until the Comp response corresponding to the Evict request is returned.
[0012] In one optional implementation, updating the directory status of the corresponding cache line in the Snoop Filter directory based on the Evict request includes: The address of the cache line to be evicted is determined based on the Evict request; Locate the directory entry corresponding to the cache line address in the Snoop Filter directory; Clear the cache line tag information and status information recorded in the directory entry, or only update the status information to indicate that the requesting node has released the corresponding cache line.
[0013] In one optional implementation, after generating the Comp response corresponding to the Evict request, the method further includes: The Comp response generated by the POCQ bypass channel and the Comp response generated by the POCQ main channel are input into the response arbitrator; The response arbitrator arbitrates among multiple Comp responses in a round-robin manner. The arbitrated Comp response is returned to the corresponding request node via the response channel.
[0014] In one optional implementation, the response arbitrator uses a fixed polling method to arbitrate Comp responses from the POCQ bypass channel and the POCQ main channel, so that the Evict request response in the POCQ bypass channel and the request response in the POCQ main channel share the same response channel for return.
[0015] In one optional implementation, the Snoop Filter access arbitrator arbitrates Snoop Filter update requests from the POCQ main channel and the POCQ bypass channel, including: Receive a first Snoop Filter update request from the POCQ main channel and a second Snoop Filter update request from the POCQ bypass channel; The Snoop Filter access arbitrator arbitrates between the first Snoop Filter update request and the second Snoop Filter update request in a round-robin manner. The Snoop Filter update request selected by the arbitration is sent to the Snoop Filter directory to update the directory status of the corresponding cache line.
[0016] In an optional implementation, the unified address conflict detection further includes: In the event of receiving a non-Evict request, the system queries the bypass queue of the POCQ bypass channel to see if there is an incomplete Evict request with the same address. If there is an incomplete Evict request at the same address, the non-Evict request is allowed to enter the POCQ main channel and blocked until the incomplete Evict request at the same address is completed; If there are no incomplete Evict requests at the same address, then the non-Evict requests are processed according to the native processing flow of the POCQ main channel.
[0017] This disclosure also provides an apparatus for processing Evict requests in a CHI interconnect, applied to a fully consistent master node. The fully consistent master node is equipped with a POCQ master channel and a POCQ bypass channel for processing Evict requests. The apparatus includes: The request receiving module is used to receive cache consistency requests from requesting nodes; The request parsing module is used to parse the cache consistency request and determine the request type of the cache consistency request; The conflict detection module is used to perform unified address conflict detection on incomplete requests in the POCQ main channel and the POCQ bypass channel based on the request address of the Evict request when the request type indicates that the cache consistency request is an Evict request, and to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel. The bypass control module is used to detect whether the bypass queue in the POCQ bypass channel meets the receiving conditions when there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel. The directory update module is used to allocate the Evict request to the bypass queue of the POCQ bypass channel when the bypass queue meets the receiving conditions, and to arbitrate the Snoop Filter update requests from the POCQ main channel and the POCQ bypass channel through the Snoop Filter access arbitrator, and update the directory status of the corresponding cache line in the Snoop Filter directory based on the Snoop Filter update request selected by the arbitrator. The response generation module is used to generate a Comp response corresponding to the Evict request after completing the directory status update, and to release the queue item corresponding to the Evict request in the bypass queue after the Comp response is returned.
[0018] This disclosure also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the above-described CHI interconnect Evict request processing method, or any possible implementation of the above-described CHI interconnect Evict request processing method.
[0019] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the above-described Evict request processing method in CHI interconnect, or any possible implementation of the above-described Evict request processing method in CHI interconnect.
[0020] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-described method for processing Evict requests in CHI interconnect, or the steps in any possible implementation of the above-described method for processing Evict requests in CHI interconnect.
[0021] This disclosure provides a method, apparatus, and electronic device for processing eviction requests in a CHI interconnect. By setting up a POCQ bypass channel in the HN-F, and when an eviction request meets conditions such as no address conflict and the bypass queue not being full, the eviction request is moved out of the POCQ main channel for bypass processing, allowing it to complete tracing, Snoop Filter directory updates, and Comp response returns through the bypass queue. This reduces the occupancy of POCQ main channel entries by eviction requests, lowers the probability of POCQ fullness and retry occurrences, shortens the average request latency, and improves system memory access read / write bandwidth and overall interconnect processing efficiency.
[0022] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0024] Figure 1 A flowchart is shown illustrating a method for processing Evict requests in a CHI interconnect according to an embodiment of this disclosure; Figure 2 A flowchart is shown illustrating another method for processing Evict requests in a CHI interconnect provided by an embodiment of this disclosure; Figure 3 A schematic diagram of an Evict request processing apparatus in a CHI interconnect provided by an embodiment of the present disclosure is shown; Figure 4 A schematic diagram of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0026] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0027] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0028] Research has revealed that in existing solutions, even with relatively simple eviction request processing flows, POCQ entries are still allocated. Since POCQ entries are high-cost and depth-limited queue resources, frequent cache replacements lead to a large number of short-lived, low-complexity eviction requests consuming POCQ entries. This reduces the available POCQ resources for requests that truly require memory access or Snoop processing, making it easier for POCQs to become full. When a POCQ is full, HN-F may trigger a retry mechanism, requiring requesting nodes to resend requests, resulting in additional latency and interconnect bandwidth consumption, and reduced system memory access efficiency.
[0029] Based on the above research, this disclosure provides a method, apparatus, and electronic device for processing Evict requests in a CHI interconnect. By setting up a POCQ bypass channel in the HN-F, and when an Evict request meets conditions such as no address conflict and the bypass queue is not full, the Evict request is moved out of the POCQ main channel for bypass processing, allowing it to complete tracing, SnoopFilter directory updates, and Comp response returns through the bypass queue. This reduces the occupancy of POCQ main channel entries by Evict requests, lowers the probability of POCQ fullness and retry occurrences, shortens the average request latency, and improves system memory access read / write bandwidth and overall interconnect processing efficiency.
[0030] To facilitate understanding of this embodiment, a detailed description of the Evict request processing method in CHI interconnect disclosed in this disclosure embodiment will be provided first. The execution entity of the Evict request processing method in CHI interconnect provided in this disclosure embodiment is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the Evict request processing method in CHI interconnect can be implemented by the processor calling computer-readable instructions stored in memory.
[0031] See Figure 1 The diagram shows a flowchart of an Evict request processing method in a CHI interconnect according to an embodiment of this disclosure. The method is applied to a fully coherent home node (HN-F), which is equipped with a POCQ main channel and a POCQ bypass channel for processing Evict requests. The method includes steps S101-S106, wherein: S101, Receive a cache consistency request from the requesting node.
[0032] In practical implementation, the cache consistency management node can be a Fully Coherent Home Node (HN-F) in the CHI interconnect system. The HN-F is located at the Proof-of-Concept (PoC) point in the CHI interconnect used for consistency management and receives cache consistency requests from one or more requesting nodes. These requesting nodes can include CPU cores, cluster caches, upstream private caches, or other nodes capable of initiating consistency access to the HN-F via the CHI interconnect. The cache consistency requests can include read requests, write requests, Snoop-related requests, Evict requests, and other requests requiring consistency management at the PoC point.
[0033] In practical implementation, a requesting node can send a corresponding cache coherence request to HN-F when its private cache experiences cache line replacement, cache access miss, or the need to release cache line space. For example, when the CPU's L1, L2, or L3 cache needs to free up cache space corresponding to a certain cache line, the requesting node can send an Evict request to HN-F according to the CHI coherence protocol. This allows HN-F to be aware that the cache line has been released from the requesting node's side and to subsequently update the tag information and status information corresponding to that cache line in the SnoopFilter directory.
[0034] In some embodiments, the HN-F can receive cache consistency requests from requesting nodes via a request receiving interface in the CHI interconnect. This request receiving interface can communicate with the RN-F, RN-I, or other request broker nodes on the requesting node side. The cache consistency request issued by the requesting node may carry a request type field, a request address field, a request source identifier field, a transaction identifier field, and control fields related to consistency processing.
[0035] The request type field can be used to identify whether the cache consistency request is an eviction request; the request address field can be used to indicate the cache line address corresponding to the request; the request source identifier field can be used to identify the requesting node that initiated the request; and the transaction identifier field can be used to match the original request when the subsequent response is returned.
[0036] In this embodiment, after receiving a cache consistency request, HN-F does not unconditionally allocate all requests to the POCQ main channel. Instead, it first sends the cache consistency request to the request parsing and routing judgment logic. The request parsing and routing judgment logic can be set at the request entry point of HN-F to perform preliminary identification and processing path selection of the request before it enters the POCQ main channel or the POCQ bypass channel.
[0037] In some embodiments, HN-F can also maintain unified address conflict detection information during the request reception phase. This unified address conflict detection information simultaneously covers the address information of incomplete requests in the POCQ main channel and the address information of incomplete eviction requests in the bypass queue of the POCQ bypass channel. Therefore, when selecting processing paths subsequently, HN-F can determine not only whether the current request conflicts with incomplete requests in the POCQ main channel at the same address, but also whether the current request conflicts with incomplete eviction requests in the bypass queue at the same address, thereby preventing the main channel request and bypass channel request from being processed concurrently at the same address, thus disrupting the cache consistency order.
[0038] In some embodiments, the cache consistency management node may be configured with a POCQ main channel and a POCQ bypass channel. The POCQ main channel is used to process cache consistency requests that require sorting, conflict detection, Snoop management, or response collection at the PoC point; the POCQ bypass channel is used to process lightweight transaction eviction requests when preset conditions are met.
[0039] Furthermore, after receiving a cache consistency request from a requesting node, the HN-F can retain the request address, request identifier, and request source information corresponding to the cache consistency request, so as to perform address conflict detection, bypass queue item allocation, and Comp response return in subsequent processing.
[0040] The request address can be used to determine whether the current request involves the same cache line as an incomplete request in the POCQ main channel; the request identifier and request source information can be used to ensure that the response is correctly returned to the corresponding request node after the Comp response is generated.
[0041] In a specific instance, when the CPU is running a Windows or Linux operating system normally, its private cache will frequently undergo cache replacement and send a large number of Evict requests to the CHI interconnect. When the CPU is running a large AI language model, the proportion of Evict requests is similar to that when running the operating system, but the requests sent to the bus are more intensive.
[0042] Therefore, when HN-F receives a cache consistency request from a request node, taking request identification at the request entry point and subsequent path selection as the starting step of the processing flow is beneficial for differentiated processing of frequently occurring Evict requests and avoids them unnecessarily occupying POCQ main channel resources.
[0043] Therefore, by receiving cache consistency requests from requesting nodes and retaining information such as request type, request address, and request source at the request entry point, HN-F can provide a data foundation for subsequent Evict request identification, address conflict detection, bypass queue reception judgment, and Snoop Filter directory updates. This allows for bypass processing of Evict requests that meet the conditions without disrupting the cache consistency processing order.
[0044] S102. Parse the cache consistency request and determine the request type of the cache consistency request.
[0045] In practical implementation, after receiving a cache consistency request from a requesting node, HN-F can parse the cache consistency request using request parsing logic to determine the request type. This request parsing logic can be set on the request entry side of HN-F, located before the POCQ main channel and POCQ bypass channel, enabling HN-F to identify whether a request is eligible for bypass processing before allocating a processing channel for it.
[0046] Specifically, the cache consistency request may include an opcode field indicating the request type. HN-F can parse the opcode field in the cache consistency request and determine whether the cache consistency request is an eviction request based on the opcode field. In this embodiment, determining the request type can serve as a preliminary judgment step for subsequently selecting the POCQ main channel or the POCQ bypass channel.
[0047] In some embodiments, the request type may include at least Evict request types and non-Evict request types. Evict requests are used to indicate that a requesting node releases or evicts a cache line in its cache and notifies HN-F to update the directory status of the corresponding cache line in the Snoop Filter directory. Non-Evict requests may include other requests that need to enter the POCQ main channel for normal consistency processing, such as requests requiring memory access, Snoop access, same-address serialization, or response collection. Therefore, HN-F can distinguish between Evict requests with lower processing complexity and meeting certain conditions from other consistency requests through request type parsing.
[0048] In its implementation, HN-F can extract information such as the request address, request source identifier, and transaction identifier carried in the cache consistency request while parsing the opcode field. The request address is used to subsequently determine whether the Evict request conflicts with an incomplete request in the POCQ main channel. The request source identifier and transaction identifier are used to return the Comp response to the corresponding request node after it is generated, enabling the request node to match the response with the original request.
[0049] In some embodiments, when the parsing result indicates that the cache consistency request is not an Evict request, HN-F can determine that the cache consistency request does not belong to the processing object of the POCQ bypass channel and allow the cache consistency request to enter the POCQ main channel. Simultaneously, HN-F can query the bypass queue of the POCQ bypass channel based on the request address of the cache consistency request to see if there is an incomplete Evict request with the same address. If an incomplete Evict request with the same address exists, the non-Evict request remains blocked in the POCQ main channel until the incomplete Evict request with the same address is completed and releases its corresponding bypass queue entry, after which the subsequent processing flow of the non-Evict request is initiated.
[0050] In some embodiments, when the parsing result indicates that the cache consistency request is an Evict request, HN-F does not immediately allocate the Evict request to the POCQ bypass channel, but instead sends the Evict request to the bypass condition judgment process. The bypass condition judgment process includes at least address conflict detection and bypass queue status detection.
[0051] In other words, the request type being Evict is only one of the necessary conditions for entering the POCQ bypass channel. Only when there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, and the bypass queue meets the receiving conditions, will the Evict request be allowed to enter the POCQ bypass channel.
[0052] As a concrete example, when a cache line replacement occurs in the CPU's private L1, L2, or L3 caches, an Evict request can be sent to HN-F. Upon receiving the request, HN-F identifies it as an Evict request by parsing the opcode field and further extracts the corresponding cache line address. Since an Evict request on the HN-F side typically only requires updating the SnoopFilter directory state and returning a Comp response, without involving memory access or Snoop access data movement, this request can be processed as a lightweight transaction in the subsequent POCQ bypass channel, provided that there are no address conflicts and the bypass queue is not full.
[0053] S103. If the request type indicates that the cache consistency request is an Evict request, based on the request address of the Evict request, perform unified address conflict detection on the incomplete requests in the POCQ main channel and the POCQ bypass channel to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel.
[0054] In practical implementation, after HN-F determines that a request is an Evict request by parsing the cache consistency request, it can further detect whether the Evict request has an address conflict with requests that have not yet been processed in the POCQ main channel or POCQ bypass channel. An address conflict refers to a situation where the cache line address corresponding to the current Evict request is the same as or hits the same cache line as the cache line address corresponding to an incomplete request in the POCQ main channel.
[0055] In this embodiment, although the Evict request is a Dataless request, it typically only requires updating the Snoop Filter directory status and returning a Comp response on the HN-F side. However, if an incomplete request with the same address as the Evict request already exists in the POCQ main channel, there may be a consistency order relationship between the Evict request and the incomplete request. If the Evict request is directly moved out of the POCQ main channel and processed in the bypass channel under such circumstances, the processing order of related requests for the same cache line may be disrupted. Therefore, after determining that the request type is an Evict request, address conflict detection needs to be performed first.
[0056] Specifically, HN-F can extract the request address from the eviction request, which can be the cache line address corresponding to the eviction request. Subsequently, HN-F can match this cache line address with the request addresses corresponding to each incomplete request in the POCQ main channel and the request addresses corresponding to each incomplete eviction request in the bypass queue of the POCQ bypass channel. The incomplete requests can be those that have been allocated POCQ entries but have not yet completed consistency processing, have not yet completed Snoop response collection, have not yet generated a final response, or have not yet released their corresponding POCQ entries.
[0057] In some embodiments, each POCQ entry in the POCQ main channel can record the request address, request status, request type, and completion status of the corresponding request. When performing address conflict detection, HN-F can traverse the currently valid POCQ entries, or compare the request address of the current Evict request with the request addresses recorded in multiple valid POCQ entries in parallel using address comparison logic. If the comparison result indicates that there are incomplete requests with the same cache line address in the POCQ main channel or bypass queue, it is determined that the Evict request has an address conflict; if the comparison result indicates that there are no identical cache line addresses, it is determined that the Evict request does not have an address conflict with incomplete requests in the POCQ main channel.
[0058] Here, during the request reception phase, HN-F implements unified address conflict detection and tracking for both the POCQ main channel and the POCQ bypass channel. Specifically, HN-F can simultaneously query the addresses of incomplete requests in the POCQ main channel and the addresses of incomplete EVIT requests in the bypass queue of the POCQ bypass channel, based on the cache line address carried by the current request. If an incomplete request with the same address as the current request exists in either channel, an address conflict is determined to exist for the current request; if no incomplete requests with the same address exist in either channel, an address conflict is determined to exist for the current request.
[0059] Specifically, when the current request is an Evict request and an incomplete request with the same address is detected in any channel, HN-F will not allow the Evict request to enter the POCQ bypass channel. Instead, it will forcibly allocate the Evict request to the POCQ main channel and remain blocked until the incomplete request with the same address is completed. The subsequent processing flow for the Evict request will only begin after the incomplete request with the same address is completed and the corresponding entry is released.
[0060] Preferably, detecting whether the Evict request conflicts with an incomplete request in the POCQ main channel may include: querying the request address corresponding to the incomplete request in the POCQ main channel based on the cache line address carried by the Evict request; determining that the Evict request conflicts with an incomplete request in the POCQ main channel if the cache line address is the same as the request address corresponding to any incomplete request; and determining that the Evict request does not conflict with an incomplete request in the POCQ main channel if the cache line address is different from the request addresses corresponding to all incomplete requests.
[0061] In some embodiments, if the detection result indicates that the Evict request conflicts with an incomplete request in the POCQ main channel, then the Evict request is considered not to meet the bypass processing condition. In this case, to ensure the correctness of the processing order and cache consistency among requests with the same address, the Evict request can be kept in the POCQ main channel processing flow, allowing it to be sorted and processed according to the POCQ main channel's order preservation rules along with other requests with the same address.
[0062] In other embodiments, if the detection result indicates that the Evict request does not conflict with any incomplete requests in the POCQ main channel, it means that there is no address dependency between the Evict request and the requests being processed in the POCQ main channel. In this case, the Evict request can continue to the subsequent bypass queue status detection process to determine whether the POCQ bypass channel is ready to receive the Evict request.
[0063] In a specific instance, the CPU's private cache sends an Evict request for a specific cache line to HN-F due to cache replacement. HN-F parses the Evict request, extracts the address corresponding to the cache line, and queries the POCQ main channel for currently unreleased POCQ entries. If the request address recorded in a POCQ entry matches the cache line address, it means that a request for that cache line is already waiting to be processed or has not yet been completed in the POCQ main channel. In this case, the Evict request is sent to the POCQ main channel to maintain the consistent order of requests with the same address. If no matching address is found in any valid POCQ entries, it means there is no address conflict between the Evict request and any incomplete requests in the current POCQ main channel, and the request can proceed to the next step of bypass queue reception and judgment.
[0064] In this way, by implementing unified address conflict detection on the POCQ main channel and POCQ bypass channel during the request reception phase, it is possible to prevent the current Evict request from bypassing any incomplete same-address requests in either channel, and also to prevent subsequent non-Evict requests from updating the Snoop Filter catalog in parallel with incomplete same-address Evict requests in the bypass queue. This ensures that same-address requests across the main channel and bypass channel still meet the serialization processing requirements.
[0065] S104. If there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, check whether the bypass queue in the POCQ bypass channel meets the reception conditions.
[0066] In practice, after confirming that there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, HN-F can further check whether the bypass queue in the POCQ bypass channel meets the reception conditions. These reception conditions may include the presence of available queue entries in the bypass queue or that the bypass queue is not currently full. In other words, a request type of Evict request, and the absence of incomplete requests with the same address in both the POCQ main channel and the bypass queue, only indicates that the request meets the prerequisites for entering the bypass channel; before actually allocating it to the POCQ bypass channel, it is necessary to confirm that the bypass queue can track the Evict request.
[0067] In this embodiment, the POCQ bypass channel may include an Evict request queue, i.e., a bypass queue. The bypass queue is used to record and track Evict requests entering the POCQ bypass channel until the corresponding Comp response is returned.
[0068] For example, a POCQ bypass channel is established for the processing of lightweight transactions (EVITs). An EVIT request queue (bypass queue) is inserted on this path to track each EVIT request until the comp response is returned. Therefore, whether the bypass queue has available entries directly determines whether the current EVIT request can enter the POCQ bypass channel for processing.
[0069] Specifically, HN-F can obtain the current occupancy status of the bypass queue and determine whether the bypass queue is full based on the current occupancy status. The current occupancy status can be represented by the write pointer, read pointer, number of valid entries, number of free entries, or full flag of the bypass queue. When the current occupancy status indicates that there are free entries in the bypass queue, it can be determined that the bypass queue is not full and the bypass queue meets the receiving conditions; when the current occupancy status indicates that there are no free entries in the bypass queue, it can be determined that the bypass queue is full and the bypass queue does not meet the receiving conditions.
[0070] Furthermore, detecting whether the bypass queue in the POCQ bypass channel meets the reception conditions may include: obtaining the current occupancy status of the bypass queue; if the current occupancy status indicates that the bypass queue is not full, determining that the bypass queue meets the reception conditions; if the current occupancy status indicates that the bypass queue is full, determining that the bypass queue does not meet the reception conditions.
[0071] In some embodiments, the reception conditions of the bypass queue can also be determined by combining at least one of the following: queue entry validity, response channel availability status, and the reception capability of the SF directory update logic. For example, HN-F can determine that the bypass queue meets the reception conditions when it is not full and the SF directory update logic can receive new Evict requests; alternatively, it can directly determine that the bypass queue meets the reception conditions when it is not full, and then have the bypass queue queue the incoming Evict requests. This configuration enables the bypass channel to reliably handle the lightweight processing flow of Evict requests with a simple structure.
[0072] In some embodiments, when the bypass queue meets the receiving conditions, HN-F can allow the Evict request to enter the POCQ bypass channel and allocate a corresponding queue entry for the Evict request in the bypass queue. This queue entry can be used to record the request address, request source identifier, transaction identifier, and processing status of the Evict request, so as to facilitate subsequent SnoopFilter directory updates, Comp response generation, and queue entry release.
[0073] In other embodiments, when the bypass queue does not meet the receiving conditions, such as when the bypass queue is full, HN-F may not allocate the Evict request to the POCQ bypass channel. In this case, to ensure that the request is not lost due to insufficient bypass queue resources, the Evict request can continue to enter the POCQ main channel according to the original processing method.
[0074] In a specific instance, HN-F receives an Evict request from the CPU's private cache and confirms that the Evict request does not conflict with any currently incomplete requests in the POCQ main channel. Subsequently, HN-F reads the occupancy status of the bypass queue in the POCQ bypass channel. If there are still free entries in the bypass queue, HN-F determines that the bypass queue meets the receiving conditions and allows the Evict request to enter the bypass queue; if all entries in the bypass queue are occupied by other Evict requests that have not yet returned a Comp response, HN-F determines that the bypass queue does not meet the receiving conditions and allows the Evict request to enter the POCQ main channel for processing.
[0075] In this way, by further checking whether the bypass queue meets the receiving conditions after address conflict detection, it is possible to avoid forcibly accepting new Evict requests when the bypass queue is full, thereby ensuring the traceability and reliability of the bypass channel processing flow. At the same time, removing Evict requests that meet the conditions from the POCQ main channel when the bypass queue is not full helps to reduce POCQ entry occupancy and reduce the probability of POCQ full triggering a retry.
[0076] S105. If the bypass queue meets the receiving conditions, the Evict request is allocated to the bypass queue of the POCQ bypass channel, and the Snoop Filter update request from the POCQ main channel and the POCQ bypass channel is arbitrated through the Snoop Filter access arbitrator. Based on the Snoop Filter update request selected by the arbitrator, the directory status of the corresponding cache line in the Snoop Filter directory is updated.
[0077] In practical implementation, if it is determined that the Evict request is of type Evict, that the Evict request does not conflict with any incomplete requests in the POCQ main channel, and that the bypass queue in the POCQ bypass channel meets the receiving conditions, HN-F can allocate the Evict request to the bypass queue of the POCQ bypass channel. The bypass queue can be an Evict request queue set up in the POCQ bypass channel, used to temporarily store, track, and maintain the status of Evict requests entering the bypass channel without occupying the POCQ main channel entry.
[0078] In its implementation, HN-F can allocate an idle queue entry for the current Evict request in the bypass queue. This queue entry can record at least one of the following information for the Evict request: request address, request source identifier, transaction identifier, request status, and response status. Specifically, the request address is used to locate the corresponding cached line directory entry in the Snoop Filter directory; the request source identifier and transaction identifier are used to subsequently generate a Comp response and return it to the corresponding request node; and the request status and response status are used to indicate whether the Evict request has completed directory updates, whether a Comp response has been generated, and whether the Comp response has been returned.
[0079] In some embodiments, after an Evict request is assigned to a bypass queue, HN-F can generate a Snoop Filter update request for the bypass channel based on the Evict request, and arbitrate with the Snoop Filter update request from the POCQ main channel through the Snoop Filter access arbitrator; after the Snoop Filter update request in the bypass channel obtains access permission, HN-F updates the directory status of the corresponding cache line in the Snoop Filter directory based on the Evict request.
[0080] Here, the Snoop Filter directory is used to record the tag information and status information of cached lines in the upstream cache, to assist HN-F in determining whether subsequent requests need to initiate Snoop access and how to maintain cache consistency. For Evict requests, the requesting node has already released or evicted the corresponding cached line, so HN-F needs to update the Snoop Filter directory according to the Evict request, so that the directory status can reflect the fact that the requesting node no longer holds the cached line.
[0081] In some embodiments, since both the POCQ main channel and the POCQ bypass channel may generate update requests to the Snoop Filter directory, HN-F can configure a Snoop Filter access arbitrator. The Snoop Filter access arbitrator receives a first Snoop Filter update request from the POCQ main channel and a second Snoop Filter update request from the POCQ bypass channel, respectively, and arbitrates between the first and second Snoop Filter update requests using a round-robin polling method. The arbitrated Snoop Filter update request is then sent to the Snoop Filter directory to perform a directory state update for the corresponding cache line.
[0082] Because HN-F implements unified address conflict detection for both the POCQ main channel and the POCQ bypass channel during the request reception phase, when an incomplete request with the same address exists in either channel, the current EVIT request will not enter the bypass channel but will instead enter the main POCQ and wait. Therefore, during the Snoop Filter access arbitration phase, two requests with the same address will not simultaneously update the Snoop Filter catalog from both the POCQ main channel and the POCQ bypass channel. Consequently, Snoop Filter update requests from both channels can share Snoop Filter access resources via a round-robin approach without disrupting the serialization semantics of requests with the same address.
[0083] Specifically, HN-F can locate the directory entry corresponding to the cache line address carried in the Evict request within the Snoop Filter directory. Subsequently, HN-F can clear or update the Tag information and status information corresponding to the request node in the directory entry based on the request node indicated by the Evict request and the cache line status.
[0084] Furthermore, updating the directory status of the corresponding cache line in the Snoop Filter directory based on the Evict request can include: determining the address of the cache line to be evicted according to the Evict request; locating the directory entry corresponding to the cache line address in the Snoop Filter directory; and clearing the cache line tag information and status information recorded in the directory entry to indicate that the requesting node has released the corresponding cache line. Through this method, HN-F can complete the consistency directory maintenance required for the Evict request without entering the POCQ main channel.
[0085] It's important to note that this process might involve clearing the row's tag and status information, or it might only require updating the status information, such as changing it from a shared state to a unique state. Originally, two masters might have cached this cacheline in a shared state. After one master evicts this cacheline, only one master caches it, and the status changes to unique.
[0086] In some embodiments, the directory status update may only be applied to the directory record corresponding to the request node that sent the Evict request. For example, when multiple upstream cache holding states are recorded for the same Cache Line in the Snoop Filter directory, HN-F can clear the holding state corresponding to the request source identifier based on the request source identifier in the Evict request; if there are no other upstream cache holders for the Cache Line after clearing, the directory entry corresponding to the Cache Line can be further set to an invalid or idle state.
[0087] In some embodiments, the processing of eviction requests in the bypass queue does not involve data movement operations such as memory access or Snoop access. That is, the POCQ bypass channel mainly handles lightweight directory update processing for eviction requests, without performing access processes that require complex sorting, response collection, or data return.
[0088] In a specific instance, a cache replacement occurs in the CPU's L1, L2, or L3 private cache, and an Evict request for a specific cache line is sent to HN-F. HN-F parses the request, confirms it's an Evict request, and verifies that there are no incomplete requests with the same cache line address in the POCQ main channel, while also confirming that the bypass queue is not full. At this point, HN-F allocates an entry in the bypass queue, using this entry to record the cache line address, request node identifier, and transaction identifier of the Evict request. Subsequently, HN-F accesses the Snoop Filter directory based on the cache line address, finds the corresponding directory entry, and clears the tag and status information corresponding to the request node from that directory entry, thus completing the directory status update required for the Evict request on the HN-F side.
[0089] In some embodiments, there are no address conflicts between the Evict request in the bypass queue and the POCQ main channel, nor between the Evict request and other incomplete requests in the bypass queue. Therefore, the update of the Snoop Filter catalog by the Evict request will not disrupt the processing order of requests with the same address in the POCQ main channel. In other words, the preconditions for entering the bypass queue have eliminated the risk of same address dependency, allowing the Evict request to be safely moved out of the POCQ main channel.
[0090] Therefore, by allocating EVIT requests to the POCQ bypass channel when the bypass queue meets the reception conditions, and completing the Snoop Filter directory update in the bypass channel, short-lifecycle, low-complexity EVIT requests can no longer occupy POCQ main channel entries, thereby reducing the resource pressure on the POCQ main channel. At the same time, since request type judgment, address conflict detection, and bypass queue reception judgment have been completed before bypass processing, the processing efficiency of HN-F for high-frequency EVIT requests can be improved while ensuring cache consistency and correctness.
[0091] S106. After completing the directory status update, generate a Comp response corresponding to the Evict request, and release the queue item corresponding to the Evict request in the bypass queue after the Comp response is returned.
[0092] In practical implementation, after HN-F completes the SnoopFilter directory state update corresponding to the Evict request through the POCQ bypass channel, it can generate a Comp response corresponding to the Evict request. The Comp response is used to indicate that HN-F has completed processing the Evict request and to notify the requesting node that initiated the Evict request that the Evict transaction has been completed on the consistency management node side.
[0093] Specifically, after clearing or updating the tag and status information of the corresponding cache line in the Snoop Filter directory, HN-F can generate a Comp response matching the Evict request based on the request source identifier, transaction identifier, and request status recorded in the bypass queue. The request source identifier is used to determine the return target of the Comp response, the transaction identifier is used to enable the requesting node to associate the received Comp response with the previously issued Evict request, and the request status is used to indicate that the Evict request has completed the directory update and can enter the response return stage.
[0094] In some embodiments, since the Evict request entering the POCQ bypass channel has undergone unified address conflict detection, confirming that there are no incomplete requests with the same address in either the POCQ main channel or the POCQ bypass channel, there is no same address dependency between the Comp response generated by the bypass channel and the Comp responses generated by other requests in the POCQ main channel. In other words, the Comp response of the bypass Evict request does not need to wait for the same address request in the POCQ main channel to complete before returning; it can participate in response channel arbitration together with other Comp responses in the POCQ main channel.
[0095] Furthermore, after generating the Comp response corresponding to the Evict request, the Comp response generated by the POCQ bypass channel and the Comp response generated by the POCQ main channel can be input into the response arbitrator. The response arbitrator arbitrates among the multiple Comp responses in a round-robin manner, and the Comp response selected by arbitration is returned to the corresponding request node via the response channel. The response arbitrator can use a fixed round-robin method to achieve response reuse between the POCQ bypass channel and the POCQ main channel with low complexity, without needing to set up a separate complex response scheduling mechanism for the bypass channel.
[0096] In some embodiments, the response arbitrator can receive Comp responses from the POCQ main channel and Comp responses from the POCQ bypass channel, respectively. When multiple Comp responses are simultaneously in a pending state, the response arbitrator can sequentially select one of the Comp responses according to a preset polling order and send it to the response channel.
[0097] For example, the response arbitrator can perform round-robin arbitration between POCQ main channel responses and POCQ bypass channel responses; it can also perform fixed-order polling among multiple response sources.
[0098] In some embodiments, after the Comp response corresponding to the Evict request is selected by the response arbitrator and returned to the requesting node via the response channel, HN-F can release the queue entry corresponding to the Evict request in the bypass queue. Releasing the queue entry may include clearing at least one of the following information recorded in the queue entry: request address, request source identifier, transaction identifier, request status, and response status, and marking the queue entry as idle so that the bypass queue can receive subsequent new Evict requests.
[0099] In a practical implementation, queue entries in the bypass queue can have multiple processing states. For example, after an Evict request enters the bypass queue, the queue entry can be in an assigned state; when HN-F updates the Snoop Filter directory, the queue entry can be in a directory update state; after the directory state update is completed and a Comp response is generated, the queue entry can be in a response pending state; and after the Comp response is returned through the response channel, the queue entry can switch to an idle state.
[0100] In a specific instance, the CPU's private cache sends an Evict request for a specific cache line to HN-F. After confirming that the Evict request meets the bypass processing conditions, HN-F writes it to an entry in the bypass queue and clears the tag and status information of the corresponding cache line in the Snoop Filter directory based on the Evict request. After completing the directory status update, HN-F generates a Comp response based on the request node identifier and transaction identifier recorded in the entry and sends this Comp response to the response arbitrator. The response arbitrator selects between Comp responses generated by the POCQ main channel and those generated by the bypass channel using a fixed round-robin method. When the Comp response corresponding to the Evict request is selected and returned to the requesting node through the response channel, HN-F releases the entry, making it an idle entry in the bypass queue again.
[0101] In some embodiments, the aforementioned Comp response generation and queue item release processes do not require occupying the POCQ main channel entry, nor do they require performing data migration processes such as memory access or Snoop access. Since the Evict request itself is a lightweight dataless request, its core processing on the HN-F side is updating the Snoop Filter catalog and returning the Comp response. Therefore, restricting its response generation and queue item release to the POCQ bypass channel can effectively reduce the Evict request's occupation of the POCQ main channel.
[0102] It should be noted that the Snoop Filter access arbitrator is used to arbitrate SF update requests from the POCQ main channel and POCQ bypass channel during the directory state update phase; the response arbitrator is used to arbitrate Comp responses from the POCQ main channel and POCQ bypass channel after the directory state update is completed. These two can be configured separately, or they can operate independently in the hardware implementation based on different arbitration logic.
[0103] See Figure 2 The diagram shows a flowchart of another method for processing Evict requests in a CHI interconnect according to an embodiment of this disclosure. The method includes steps S201 to S203, wherein: S201. If an incomplete request with the same address as the Evict request is detected in the POCQ main channel or the POCQ bypass channel, the Evict request is assigned to the POCQ main channel.
[0104] S202. Block the processing of the Evict request until the incomplete request at the same address is completed.
[0105] S203. After the incomplete request at the same address is completed and the corresponding queue item is released, the processing flow of the Evict request in the POCQ main channel is started.
[0106] In its implementation, upon receiving a cache consistency request, HN-F can determine the processing path for that request based on the request type, the unified address conflict detection result, and the bypass queue status. The unified address conflict detection result indicates whether there are any incomplete requests with the same address in the POCQ main channel, and whether there are any incomplete eviction requests with the same address in the bypass queue of the POCQ bypass channel. For requests that do not meet the bypass processing conditions, HN-F still allocates them to the POCQ main channel to continue the original cache consistency processing flow, and preserves the serialization semantics of requests with the same address through the blocking and waiting mechanism in the main channel.
[0107] Specifically, when the request type indicates that the cache consistency request is not an Evict request, HN-F can determine that the request does not belong to the processing object of the POCQ bypass channel and allocate the cache consistency request to the POCQ main channel. Further, HN-F can query the bypass queue of the POCQ bypass channel based on the request address of the non-Evict request to see if there is an incomplete Evict request with the same address. If there is an incomplete Evict request with the same address, the non-Evict request remains blocked in the POCQ main channel until the incomplete Evict request with the same address is completed and releases its corresponding bypass queue entry, after which the subsequent processing flow of the non-Evict request is started. This avoids the Snoop Filter directory update order being reversed between Evict requests in the bypass queue and subsequent non-Evict requests with the same address entering the main POCQ.
[0108] In some embodiments, where the request type indicates that the cache consistency request is an Evict request, but unified address conflict detection determines that there is an incomplete request with the same address as the Evict request in the POCQ main channel or POCQ bypass channel, HN-F can allocate the Evict request to the POCQ main channel and keep it blocked until the incomplete request with the same address is completed. The completion of the incomplete request with the same address may include the corresponding POCQ entry in the POCQ main channel completing processing and being released, or the corresponding bypass queue entry in the POCQ bypass channel completing a Comp response and being released. After the incomplete request with the same address is completed, HN-F then starts the subsequent processing flow of the Evict request in the POCQ main channel.
[0109] It should be noted that after the Evict request is forcibly assigned to the POCQ main channel, if an incomplete request at the same address has not yet been completed, HN-F can keep the Evict request blocked in the POCQ main channel, temporarily halting its Snoop Filter catalog update or subsequent response generation process. Once the incomplete request at the same address is completed and the corresponding POCQ entry or bypass queue item is released, HN-F will then initiate the subsequent processing of the Evict request in the POCQ main channel. Thus, logically, the same-address serialization semantics required by native POCQ are still fully preserved.
[0110] In some embodiments, for non-Evict requests, HN-F still allocates them to the POCQ main channel for processing. If there is an incomplete Evict request with the same address as the non-Evict request in the POCQ bypass channel, the non-Evict request remains blocked in the POCQ main channel until the incomplete Evict request with the same address is completed and releases the bypass queue entry before processing continues. This avoids an inversion of the SF directory update order between incomplete Evict requests in the bypass queue and subsequent non-Evict requests with the same address entering the main POCQ.
[0111] In some embodiments, if the request type indicates that the cache consistency request is an Evict request, and it is determined through unified address conflict detection that there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, but the bypass queue in the POCQ bypass channel does not meet the receiving conditions, HN-F may still allocate the Evict request to the POCQ main channel. The bypass queue not meeting the receiving conditions may include the bypass queue being full, or the bypass queue currently lacking an idle queue item available for tracking new Evict requests.
[0112] As a specific implementation, HN-F can set path selection logic at the request entry point. This path selection logic first determines whether the request is an EVIT request based on the opcode. If it is not an EVIT request, it outputs a main channel selection signal, causing the request to enter the POCQ main channel. Furthermore, it determines whether the request needs to be blocked and wait in the POCQ main channel based on whether there are any incomplete EVIT requests with the same address in the bypass queue. If it is an eviction request, based on the request address of the eviction request, the system simultaneously queries the address information of incomplete requests in the POCQ main channel and the address information of incomplete eviction requests in the bypass queue. If there is an incomplete request with the same address in either channel, a main channel selection signal is output, causing the eviction request to enter the POCQ main channel and wait. If there is no incomplete request with the same address in either channel, the system continues to check if the bypass queue is full. If the bypass queue is not full, a bypass selection signal is output, causing the eviction request to enter the POCQ bypass channel. If the bypass queue is full, a main channel selection signal is output, causing the eviction request to enter the POCQ main channel.
[0113] In a specific instance, the CPU's private cache sends an Evict request to HN-F. HN-F parses the request, identifies it as an Evict request, and extracts the corresponding Cache Line address. If HN-F finds an incomplete request for the same Cache Line in the POCQ main channel, or an Evict request for the same Cache Line that has not yet returned a Comp response in the bypass queue of the POCQ bypass channel, then the Evict request is not allowed to enter the bypass channel. Instead, it is assigned to the POCQ main channel and blocked until the incomplete request at the same address is completed. If HN-F does not find an incomplete request at the same address in any channel, but all entries in the bypass queue are occupied by other Evict requests, then the Evict request also enters the POCQ main channel to avoid the request becoming untrackable or the response failing to return due to a lack of free entries in the bypass queue.
[0114] In another specific instance, when there is an incomplete Evict request for a certain Cache Line in the bypass queue, HN-F receives a non-Evict request for the same Cache Line. Since the non-Evict request is not processed by the bypass channel, it enters the POCQ main channel; however, the non-Evict request remains blocked in the POCQ main channel until the Evict request at the same address completes its SF directory update, returns a Comp response, and releases the bypass queue entry. This prevents a non-Evict request from updating the Snoop Filter directory in the main channel before the bypass Evict request, thus avoiding a consistency ordering error.
[0115] Therefore, by backing up or transferring non-Evict requests, Evict requests with cross-channel address conflicts, and Evict requests with full bypass queues to the POCQ main channel, the POCQ bypass channel can handle only lightweight Evict requests that meet the safe bypass conditions. Simultaneously, by implementing unified address conflict detection for incomplete requests in both the POCQ main and bypass channels, and blocking subsequent requests when incomplete requests with the same address exist, the serialization semantics of the same address required by native POCQ can be logically preserved, avoiding the disruption of cache consistency caused by the parallel processing of requests with the same address by the main and bypass channels. This approach preserves the POCQ main channel's ability to manage complex consistency requests while removing Evict requests without cross-channel address conflicts and acceptable to the bypass queue from the POCQ main channel when conditions permit, thus balancing cache consistency correctness and POCQ entry resource optimization.
[0116] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0117] Based on the same inventive concept, this disclosure also provides a processing device for Evict requests in CHI interconnect, which corresponds to the processing method for Evict requests in CHI interconnect. Since the principle of the device in this disclosure for solving the problem is similar to the above-mentioned processing method for Evict requests in CHI interconnect in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0118] Please see Figure 3 , Figure 3 This is a schematic diagram of an apparatus for processing Evict requests in a CHI interconnect, provided as an embodiment of this disclosure. Figure 3As shown in the embodiments of this disclosure, the Evict request processing device 300 in the CHI interconnect is applied to a fully consistent master node. The fully consistent master node is equipped with a POCQ master channel and a POCQ bypass channel for processing Evict requests, including: The request receiving module 310 is used to receive cache consistency requests from the requesting node.
[0119] The request parsing module 320 is used to parse the cache consistency request and determine the request type of the cache consistency request.
[0120] The conflict detection module 330 is used to perform unified address conflict detection on incomplete requests in the POCQ main channel and the POCQ bypass channel based on the request address of the Evict request when the request type indicates that the cache consistency request is an Evict request, and to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel.
[0121] The bypass control module 340 is used to detect whether the bypass queue in the POCQ bypass channel meets the receiving conditions when there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel.
[0122] The directory update module 350 is used to allocate the Evict request to the bypass queue of the POCQ bypass channel when the bypass queue meets the receiving conditions, and to arbitrate the Snoop Filter update requests from the POCQ main channel and the POCQ bypass channel through the Snoop Filter access arbitrator, and update the directory status of the corresponding cache line in the Snoop Filter directory based on the Snoop Filter update request selected by the arbitrator.
[0123] The response generation module 360 is used to generate a Comp response corresponding to the Evict request after completing the directory status update, and to release the queue item corresponding to the Evict request in the bypass queue after the Comp response is returned.
[0124] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0125] This disclosure provides a method and apparatus for processing eviction requests in a CHI interconnect. By setting up a POCQ bypass channel in the HN-F, and when an eviction request meets conditions such as no address conflict and the bypass queue not being full, the eviction request is moved out of the POCQ main channel for bypass processing, allowing it to complete tracing, Snoop Filter directory updates, and Comp response returns through the bypass queue. This reduces the occupancy of POCQ main channel entries by eviction requests, lowers the probability of POCQ fullness and retry occurrences, shortens the average request latency, and improves system memory access read / write bandwidth and overall interconnect processing efficiency.
[0126] Corresponding to Figure 1 and Figure 2 In the CHI interconnect, an Evict request processing method is provided. This disclosure also provides an electronic device 400, such as... Figure 4 The diagram shown is a structural schematic of an electronic device 400 provided in an embodiment of this disclosure, including: Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including main memory 421 and external memory 422; the main memory 421, also called internal memory, is used to temporarily store the computational data in processor 41, as well as the data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through main memory 421. When the electronic device 400 is running, processor 41 and memory 42 communicate through bus 43, enabling processor 41 to execute... Figure 1 and Figure 2 The steps of the Evict request processing method in the CHI interconnect.
[0127] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the Evict request processing method in the CHI interconnect described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0128] This disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, they can perform the steps of the Evict request processing method in the CHI interconnect described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0129] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0133] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0134] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for processing Evict requests in a CHI interconnect, characterized in that, Applied to a fully consistent master node, the fully consistent master node is configured with a POCQ main channel and a POCQ bypass channel for handling Evict requests, the method includes: Receive cache consistency requests from requesting nodes; Parse the cache consistency request to determine the request type. When the request type indicates that the cache consistency request is an Evict request, based on the request address of the Evict request, a unified address conflict detection is performed on the incomplete requests in the POCQ main channel and the POCQ bypass channel to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel. If there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel, check whether the bypass queue in the POCQ bypass channel meets the receiving conditions. If the bypass queue meets the receiving conditions, the Evict request is allocated to the bypass queue of the POCQ bypass channel, and the Snoop Filter update request from the POCQ main channel and the POCQ bypass channel is arbitrated through the Snoop Filter access arbitrator. Based on the Snoop Filter update request selected by the arbitrator, the directory status of the corresponding cache line in the Snoop Filter directory is updated. After completing the directory status update, a Comp response corresponding to the Evict request is generated, and the queue item corresponding to the Evict request in the bypass queue is released after the Comp response is returned.
2. The method according to claim 1, characterized in that, Based on the request address of the Evict request, unified address conflict detection is performed on incomplete requests in the POCQ main channel and the POCQ bypass channel, including: Obtain the cache line address carried in the Evict request; Query the request addresses corresponding to the requests that are in an incomplete state in the POCQ main channel, and the request addresses corresponding to the Evict requests that are in an incomplete state in the bypass queue of the POCQ bypass channel. If the cache line address is the same as the request address corresponding to any incomplete request in the POCQ main channel or the bypass queue, an address conflict is determined to exist. If the cache line address is different from the request addresses corresponding to each incomplete request in the POCQ main channel and the bypass queue, it is determined that there is no address conflict.
3. The method according to claim 1, characterized in that, Detecting whether the bypass queue in the POCQ bypass channel meets the reception conditions includes: Obtain the current occupancy status of the bypass queue; If the current occupancy status indicates that the bypass queue is not full, it is determined that the bypass queue meets the receiving conditions; If the current occupancy status indicates that the bypass queue is full, it is determined that the bypass queue does not meet the receiving conditions.
4. The method according to claim 1, characterized in that, The method further includes: If an incomplete request with the same address as the Evict request is detected in the POCQ main channel or the POCQ bypass channel, the Evict request will be assigned to the POCQ main channel. The processing of the Evict request is blocked until the incomplete request at the same address is completed; After the incomplete request at the same address is completed and the corresponding queue item is released, the processing flow of the Evict request in the POCQ main channel is initiated.
5. The method according to claim 1, characterized in that, Assigning the Evict request to the bypass queue of the POCQ bypass channel includes: Allocate a queue entry for the Evict request in the bypass queue; The queue entry records at least one of the following information: the request address, request identifier, and response status of the Evict request. The queue item is used to track the Evict request until the Comp response corresponding to the Evict request is returned.
6. The method according to claim 1, characterized in that, Update the directory status of the corresponding cache line in the Snoop Filter directory based on the Evict request, including: The address of the cache line to be evicted is determined based on the Evict request; Locate the directory entry corresponding to the cache line address in the Snoop Filter directory; Clear the cache line tag information and status information recorded in the directory entry, or only update the status information to indicate that the requesting node has released the corresponding cache line.
7. The method according to claim 1, characterized in that, After generating the Comp response corresponding to the Evict request, the method further includes: The Comp response generated by the POCQ bypass channel and the Comp response generated by the POCQ main channel are input into the response arbitrator; The response arbitrator arbitrates among multiple Comp responses in a round-robin manner. The arbitrated Comp response is returned to the corresponding request node via the response channel; The response arbitrator uses a fixed polling method to arbitrate Comp responses from the POCQ bypass channel and the POCQ main channel, so that the Evict request response in the POCQ bypass channel and the request response in the POCQ main channel share the same response channel for return.
8. The method according to claim 1, characterized in that, The arbitrator accesses the Snoop Filter to arbitrate Snoop Filter update requests from the POCQ main channel and the POCQ bypass channel, including: Receive a first Snoop Filter update request from the POCQ main channel and a second Snoop Filter update request from the POCQ bypass channel; The Snoop Filter access arbitrator arbitrates between the first Snoop Filter update request and the second Snoop Filter update request in a round-robin manner. The Snoop Filter update request selected by the arbitration is sent to the Snoop Filter directory to update the directory status of the corresponding cache line.
9. The method according to claim 1, characterized in that, The unified address conflict detection also includes: In the event of receiving a non-Evict request, the system queries the bypass queue of the POCQ bypass channel to see if there is an incomplete Evict request with the same address. If there is an incomplete Evict request at the same address, the non-Evict request is allowed to enter the POCQ main channel and blocked until the incomplete Evict request at the same address is completed; If there are no incomplete Evict requests at the same address, then the non-Evict requests are processed according to the native processing flow of the POCQ main channel.
10. A processing apparatus for Evict requests in a CHI interconnect, characterized in that, An apparatus applied to a fully consistent master node, wherein the fully consistent master node is configured with a POCQ master channel and a POCQ bypass channel for handling eviction requests, the apparatus comprising: The request receiving module is used to receive cache consistency requests from requesting nodes; The request parsing module is used to parse the cache consistency request and determine the request type of the cache consistency request; The conflict detection module is used to perform unified address conflict detection on incomplete requests in the POCQ main channel and the POCQ bypass channel based on the request address of the Evict request when the request type indicates that the cache consistency request is an Evict request, and to determine whether there is an incomplete request with the same address as the Evict request in the POCQ main channel or the POCQ bypass channel. The bypass control module is used to detect whether the bypass queue in the POCQ bypass channel meets the receiving conditions when there are no incomplete requests with the same address as the Evict request in either the POCQ main channel or the POCQ bypass channel. The directory update module is used to allocate the Evict request to the bypass queue of the POCQ bypass channel when the bypass queue meets the receiving conditions, and to arbitrate the Snoop Filter update requests from the POCQ main channel and the POCQ bypass channel through the Snoop Filter access arbitrator, and update the directory status of the corresponding cache line in the Snoop Filter directory based on the Snoop Filter update request selected by the arbitrator. The response generation module is used to generate a Comp response corresponding to the Evict request after completing the directory status update, and to release the queue item corresponding to the Evict request in the bypass queue after the Comp response is returned.
