A shared cache release method and device based on credit back pressure

By introducing a shared cache release method based on credit backpressure in IB data exchange, the cache release problem caused by many-to-one congestion is solved, and efficient and reliable data transmission and cache sharing are achieved.

CN118101597BActive Publication Date: 2025-01-21WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410346023.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-01-21
Estimated Expiration
2044-03-25

AI Technical Summary

Technical Problem

In IB data exchange, many-to-one congestion leads to simultaneous blockage of the input port, and the traditional cache sharing solution fails to effectively solve the problem of safe release of shared caches based on reliable transmission between upstream and downstream.

Method used

A shared cache release method based on credit backpressure is adopted to ensure reliable transmission and safe release of the cache through the credit reduction mechanism and the two-stage shared space release mechanism.

Benefits of technology

It achieves alleviation of channel congestion in congested conditions, ensures efficient and reliable data transmission, and simplifies the implementation process of cache sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118101597B_ABST
    Figure CN118101597B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for releasing a shared cache based on credit back pressure, the method comprising: when a downstream component receives a shared cache release request from a virtual channel, shrinking the credit value of the shared cache, returning the shrunken credit value to the upstream component that sends data, and starting to calculate the waiting time; determining whether a credit overflow occurs in the upstream component according to the shrunken credit value, and if a credit overflow occurs, stopping data transmission to the downstream component; when the waiting time reaches a predefined time length, if the shared cache is not occupied, releasing the shared cache in the downstream component. The technical solution of the present invention implements a shared cache release mechanism based on credit back pressure, and solves the overflow problem in the process of releasing shared space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of data exchange equipment, and in particular relates to a shared cache release method and device based on credit back pressure. Background Art

[0002] Modern switching scenarios are all based on virtual channel switching. Virtual channels are also called virtual channels. Each virtual channel contains a cache that can cache certain data. Multiple virtual channels share a physical switch port. Virtual channels can carry different services without affecting each other, which can effectively avoid service deadlock, single service congestion or blocking of other services (head of line blocking). The virtual channels in Infiniband Infiniband (IB) switches are as follows: Figure 1 shown.

[0003] Similarly, when exchanging IB data, if there are multiple input ports exchanging data to one output port, many-to-one congestion will occur, causing these input ports to be blocked at the same time. Inside the IB switch, there is also an independent cache in each switching path to exchange different business data (virtual channels). In this case, since the traffic of different businesses may be uneven, the use of independent caches may result in a waste of cache time.

[0004] Allocating a large cache to large traffic can absorb burst congestion traffic as much as possible and alleviate the degree of congestion in the channel, so the shared cache mechanism came into being. However, traditional cache sharing solutions are based on real-time traffic information to allocate and schedule shared caches, and do not solve the problem of safe release of shared caches based on reliable transmission between upstream and downstream. Summary of the invention

[0005] The purpose of the present invention is to provide a shared cache release method and device based on credit back pressure, aiming to propose a credit contraction mechanism coordinated with shared cache dynamic allocation to solve the problem of reliable transmission of shared cache dynamic allocation.

[0006] According to a first aspect of the present invention, a shared cache release method based on credit back pressure is provided, comprising:

[0007] When the downstream component receives the shared cache release request of the virtual channel, it reduces the credit value of the shared cache, returns the reduced credit value to the upstream component that sends the data, and starts calculating the waiting time;

[0008] determining in the upstream component whether a credit overflow occurs according to the reduced credit value, and if a credit overflow occurs, stopping data transmission to the downstream component;

[0009] When the waiting time reaches a predefined time length, if the shared buffer is not occupied, the shared buffer is released in the downstream component.

[0010] Preferably, before the downstream component receives the shared buffer release request of the virtual channel, the method further comprises:

[0011] When a shared buffer allocation request of a virtual channel is received, the credit value of the shared buffer is increased, and the increased credit is returned to the upstream component.

[0012] The determining whether a credit overflow occurs further comprises:

[0013] Determine whether (FCCL-FCTBS) mod 2 is satisfied n <=2 n-1 , where mod refers to the modulo operation and n is the bit width of the variable;

[0014] If not, it is determined that a credit overflow has occurred;

[0015] FCCL is the modulo operation value of the accumulated value of data received by the downstream virtual channel and the modulo addition result of the remaining space of the downstream virtual channel, and FCTBS is the modulo operation value of the accumulated value of the amount of data sent by the upstream virtual channel.

[0016] The determining whether a credit overflow occurs further comprises:

[0017] If credit overflow does not occur, data transmission to the downstream component continues.

[0018] The predefined time length is determined by the round-trip delay value of the link between the upstream and downstream.

[0019] According to a second aspect of the present invention, a shared cache release device based on credit back pressure is provided, comprising:

[0020] A credit scaling unit, configured to reduce the credit value of the shared cache when the downstream component receives a shared cache release request of the virtual channel, return the reduced credit value to the upstream component that sends the data, and start calculating the waiting time;

[0021] A packet sending control unit, configured to determine whether a credit overflow occurs in the upstream component according to the reduced credit value, and if a credit overflow occurs, stop sending data to the downstream component;

[0022] A cache releasing unit is configured to release the shared cache in the downstream component when the waiting time reaches a predefined time length if the shared cache is not occupied.

[0023] Compared with the related art, the technical solution of the present invention has the following advantages:

[0024] Combining shared cache and credit back pressure can not only alleviate congestion, but also achieve efficient and reliable transmission. The overflow problem of credit contraction is solved through the two-stage shared space release mechanism. At the same time, there is no need for excessive interaction between upstream and downstream, which simplifies the implementation of cache sharing and is conducive to the realization of cache sharing under the existing conventional virtual channel communication mechanism based on credit back pressure.

[0025] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures and processes indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 It is a schematic diagram of a virtual channel in an IB switch according to the related art.

[0028] Figure 2 It is a flow chart of a shared cache release method based on credit back pressure according to the present invention.

[0029] Figure 3 It is a schematic diagram of the upstream and downstream structures of cache sharing according to the present invention.

[0030] Figure 4 4 is a flow chart of releasing the shared cache according to the present invention.

[0031] Figure 5 is a shared cache release ladder diagram according to the present invention.

[0032] Figure 6 It is a schematic diagram of the shared space size allocation process according to the present invention.

[0033] Figure 7 Schematic diagram of the shared space occupation process according to the present invention.

[0034] Figure 8 Schematic diagram of the shared space release process according to the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] The credit back pressure mechanism is commonly used in high-performance data exchange. The credit back pressure mechanism of the IB network is that the upstream maintains the data volume of the sent message, and the downstream maintains the data volume of the received message, which is calculated according to the following formula:

[0037] Upstream:

[0038] SEND_ABR=(SEND_ABR+SEND_PKT_LEN)mod 2 n ; ①

[0039] FCTBS=SEND_ABR; ②

[0040] Downstream:

[0041] RCV_ABR= (RCV_ABR+RCV_PKT_LEN) mod2 n ; ③

[0042] FCCL=RCV_ABR+LEFT_SPACE; ④

[0043] (FCCL-FCTBS) mod 2 n <=2 n-1 ⑤

[0044] Among them, SEND_ABR represents the modulo operation value of the cumulative value of the amount of data sent by the upstream virtual channel, FCTBS is the SEND_ABR value defined by IB, RCV_ABR represents the modulo operation value of the cumulative value of the amount of data received by the downstream virtual channel, LEFT_SPACE is the remaining space of the downstream virtual channel, and FCCL is the modulo addition result of the modulo operation value of the cumulative value of the data received by the downstream virtual channel defined by IB and the remaining space of the downstream virtual channel.

[0045] Where mod refers to the modulo operation, LEFT_SPACE is the remaining space of the downstream virtual channel, and n is the bit width of the variable. The upstream calculates the amount of data to be sent, and the downstream feeds back FCCL. The upstream packet control can send data when the above formula is met.

[0046] By adopting the IB credit back pressure algorithm as described above, reliable data transmission can be achieved between upstream and downstream. Based on the above cache sharing of virtual channels and the credit back pressure mechanism of upstream and downstream, the present invention proposes a shared cache release mechanism based on credit back pressure. The key to the credit-based cache sharing mechanism lies in the release of space, because when a certain virtual channel releases the shared space, due to the delay between upstream and downstream, the upstream component gets the release of the shared space at a later time, and there may be a flight packet to continue to occupy the shared space, and at this time the shared space may be occupied by other virtual channels, thus causing space overflow. The present invention divides the release of shared space into two stages: pre-release and actual release. In the pre-release stage, if the upstream component finds credit overflow, it stops sending data. The overflow problem in the shared space release process is solved by the release process of the upstream and downstream stages.

[0047] See also Figure 2 The shared cache release method based on credit back pressure provided by the present invention includes:

[0048] Step 101: When a downstream component receives a shared buffer release request of a virtual channel, it reduces the credit value of the shared buffer, returns the reduced credit value to the upstream component that sends data, and starts calculating the waiting time.

[0049] like Figure 3 As shown, the mechanism of the present invention includes an upstream component and a downstream component. The downstream component is used for cache space management and credit generation, and the upstream component is used to send data according to the credit value. The specific steps are divided into applying for shared space and releasing shared space.

[0050] The cache of the virtual channel space includes exclusive space and shared space pool. Since the virtual channel mechanism is an independent cache path, but there is only one physical interface, there is no need to divide the independent physical cache from the bandwidth, but the corresponding space size will be allocated to the virtual channel to implement the virtual channel mechanism.

[0051] When applying for shared space, the downstream component applies for shared space based on the occupancy of the exclusive space, and returns the increased credit to the upstream component based on the increased space value.

[0052] When the shared space application is successful, the upstream component sends data according to the increased credit value.

[0053] The shared space release process is as follows Figure 4 and Figure 5 As shown. According to the space occupancy, a virtual channel of the downstream component first shrinks the credit value corresponding to the shared space, and returns the shrunken credit to the upstream component. Specifically, the shared space is shrunk by a shared space unit each time; the shared space unit is statically divided in advance according to the actual cache situation.

[0054] Step 102: In the upstream component, determine whether a credit overflow occurs according to the reduced credit value, and if a credit overflow occurs, stop sending data to the downstream component.

[0055] The upstream component sends data according to the latest credit value. If the latest credit value of the virtual channel does not overflow, it satisfies (FCCL-FCTBS) mod 2. n <=2 n-1 , then continue to send data.

[0056] If credit overflow occurs, (FCCL-FCTBS) mod 2 is not satisfied n <=2 n-1 , indicating that the flight packet will occupy the released shared space, the data transmission is stopped until the new credit packet from the downstream returns and indicates that the credit of the virtual channel has not overflowed. At this time, the credit overflow will not cause data errors, because the shared space is only pre-released and has not been actually released.

[0057] Step 103: When the waiting time reaches a predefined time length, if the shared buffer is not occupied, the shared buffer is released in the downstream component.

[0058] The downstream component starts by sending the shrunk credit value and sets a waiting time, which is determined by the round-trip delay value RTT between the upstream and downstream links. After the timeout ends, if the space to be released is not reoccupied, the shared space is actually released.

[0059] In an optional embodiment, if the shared space is reoccupied, the shared space is reallocated to the virtual channel.

[0060] In a preferred embodiment, the dynamic allocation and release process of the cache is as follows: Figure 6 As shown in Figure 1, the shared space is divided into several units. This unit only represents the size of the shared space that can be occupied by the virtual channel.

[0061] In the process of dynamic cache allocation, the mechanism of occupying exclusive space first and then shared space is adopted. Set the first remaining threshold of progressive occupied space, threshold1, such as Figure 7 When the remaining exclusive space or shared space unit is lower than the first remaining threshold, an application is made to occupy the next shared space unit, which is an extension of the credit.

[0062] In the cache release process, the second remaining threshold threshold2 of the shared space release is set. When the exclusive space is idle for more than the second remaining threshold and lasts for a preset time, its shared space unit is released; when the shared space is idle for more than the second remaining threshold and lasts for a period of time, its next shared space is released, such as Figure 8 shown.

[0063] It can be seen that the shared cache release method based on credit back pressure proposed in the present invention has the following advantages compared with the related art:

[0064] Combining shared cache and credit back pressure can not only alleviate congestion, but also achieve efficient and reliable transmission. The overflow problem of credit contraction is solved through the two-stage shared space release mechanism. At the same time, there is no need for excessive interaction between upstream and downstream, which simplifies the implementation of cache sharing and is conducive to the realization of cache sharing under the existing conventional communication mechanism of virtual channel communication based on credit back pressure.

[0065] Accordingly, the present invention provides a shared cache release device based on credit back pressure in a second aspect, comprising:

[0066] A credit scaling unit, configured to reduce the credit value of the shared cache when the downstream component receives a shared cache release request of the virtual channel, return the reduced credit value to the upstream component that sends the data, and start calculating the waiting time;

[0067] A packet sending control unit, configured to determine whether a credit overflow occurs in the upstream component according to the reduced credit value, and if a credit overflow occurs, stop sending data to the downstream component;

[0068] A cache releasing unit is configured to release the shared cache in the downstream component when the waiting time reaches a predefined time length if the shared cache is not occupied.

[0069] The above-mentioned device can be implemented by the shared cache release method based on credit back pressure provided by the embodiment of the first aspect above. The specific implementation method can be found in the description of the embodiment of the first aspect, which will not be repeated here.

[0070] It is understood that the structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily combine and adjust the structural features of the above embodiments according to the use requirements, and should not limit the concept of the present invention to the specific details of the above examples.

[0071] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A shared cache release method based on credit back pressure, characterized in that: include: When the downstream component receives the shared cache release request of the virtual channel, it reduces the credit value of the shared cache, returns the reduced credit value to the upstream component that sends the data, and starts calculating the waiting time; determining in the upstream component whether a credit overflow occurs according to the reduced credit value, and if a credit overflow occurs, stopping data transmission to the downstream component; When the waiting time reaches a predefined time length, if the shared buffer is not occupied, the shared buffer is released in the downstream component.

2. The shared cache release method based on credit back pressure according to claim 1, characterized in that: Before the downstream component receives the shared buffer release request of the virtual channel, the method further includes: When a shared buffer allocation request of a virtual channel is received, the credit value of the shared buffer is increased, and the increased credit is returned to the upstream component.

3. The shared cache release method based on credit back pressure according to claim 1, characterized in that: The determining whether a credit overflow occurs further comprises: Determine whether (FCCL-FCTBS) mod 2 is satisfied n <=2 n-1 , where mod refers to the modulo operation and n is the bit width of the variable; If not, it is determined that a credit overflow has occurred; FCCL is the modulo operation value of the accumulated value of data received by the downstream virtual channel and the modulo addition result of the remaining space of the downstream virtual channel, and FCTBS is the modulo operation value of the accumulated value of the amount of data sent by the upstream virtual channel.

4. The shared cache release method based on credit back pressure according to claim 3, characterized in that: The determining whether a credit overflow occurs further comprises: If credit overflow does not occur, data transmission to the downstream component continues.

5. The shared cache release method based on credit back pressure according to claim 1, characterized in that: The predefined time length is determined by the round-trip delay value of the link between the upstream and downstream.

6. A shared cache release device based on credit back pressure, characterized in that: include: A credit scaling unit, configured to reduce the credit value of the shared cache when the downstream component receives a shared cache release request of the virtual channel, return the reduced credit value to the upstream component that sends the data, and start calculating the waiting time; A packet sending control unit, configured to determine whether a credit overflow occurs in the upstream component according to the reduced credit value, and if a credit overflow occurs, stop sending data to the downstream component; A cache releasing unit is configured to release the shared cache in the downstream component when the waiting time reaches a predefined time length if the shared cache is not occupied.

7. The shared cache release device based on credit back pressure according to claim 6, characterized in that: The credit scaling unit is further configured to: When a shared buffer allocation request of a virtual channel is received, the credit value of the shared buffer is increased, and the increased credit is returned to the upstream component.

8. The shared cache release device based on credit back pressure according to claim 6, characterized in that: The packet sending control unit is further used to: Determine whether (FCCL-FCTBS) mod 2 is satisfied n <=2 n-1 , where mod refers to the modulo operation and n is the bit width of the variable; If not, it is determined that a credit overflow has occurred; FCCL is the modulo operation value of the accumulated value of data received by the downstream virtual channel and the modulo addition result of the remaining space of the downstream virtual channel, and FCTBS is the modulo operation value of the accumulated value of the amount of data sent by the upstream virtual channel.

9. The shared cache release device based on credit back pressure according to claim 8, characterized in that: The packet sending control unit is further used to: If credit overflow does not occur, data transmission to the downstream component continues.

10. The shared cache release device based on credit back pressure according to claim 6, characterized in that: The predefined time length is determined by the round-trip delay value of the link between the upstream and downstream.

Citation Information

Patent Citations

  • Method and system for flexible credit exchange within high performance fabrics

    US20150180790A1

  • Shared flow control credits

    US20160182391A1