A shared cache method and apparatus based on unreliable transmission
By dividing the buffer space of the receiving device into shared and private buffers and adopting a bidirectional flow control mechanism, the problem of inconsistent credit between the sending and receiving devices in unreliable transmission networks is solved, and the effect of improving service quality and transmission bandwidth is achieved without increasing hardware resource consumption.
Patent Information
- Application Number
- CN202411148701.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing shared caching and flow control mechanisms do not support unreliable transmission, leading to inconsistent credit maintenance between transceiver devices in unreliable transmission networks, which affects the quality of service and bandwidth of data transmission.
During link initialization, the buffer space of the receiving device is divided into a shared buffer space and a private buffer space, and fed back to the sending device through the network manager. A bidirectional flow control mechanism is used to feed back the flow control credit value and flow control unit value to achieve synchronization between the sending and receiving devices.
Without increasing hardware resource consumption, it solves the problems of insufficient number and space of virtual channels, ensures service quality and transmission bandwidth, is compatible with traditional dedicated storage mechanisms, simplifies credit maintenance logic, and reduces transmission losses caused by flow control messages.
Smart Images

Figure CN118890321B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of network transmission, and particularly relates to a shared buffer method and device based on non-reliable transmission. BACKGROUND
[0002] VC (Virtual Channel) technology is one of the key technologies of high-speed communication network, which is used to realize multiple virtual and isolated logical links on a physical link. Each virtual channel can independently set a buffer space and independently transmit data, and the physical link is shared by time division multiplexing. With the help of VC technology, the quality of service (QoS) between different transmissions in network communication can be effectively guaranteed, and the problem of mutual interference of TC packets with different service levels in the network due to sharing of the physical link can be solved.
[0003] In high-speed communication networks, a flow control mechanism based on credits is usually used to realize the feedback of the remaining buffer space information from the receiving side device to the sending side device and the transmission of data packets (DP) from the sending side device to the receiving side device. Based on credits, efficient transmission of data packets can be realized stably. SUMMARY
[0004] The present application aims to provide a shared buffer method and device based on non-reliable transmission, and aims to solve the problem that the existing shared buffer and flow control mechanism do not support non-reliable transmission.
[0005] According to a first aspect of the present application, a shared buffer method based on non-reliable transmission is provided, comprising:
[0006] In the link initialization process, before the start of data transmission, the buffer space of the receiving side device is divided into a shared buffer space and a private buffer space of each virtual channel based on the total buffer space size of the receiving side device and the number of virtual channels, and the buffer space division information is fed back to the sending side device through a network manager.
[0007] In the non-reliable data transmission process, the flow control credit value of each virtual channel of the receiving side device associated with the shared buffer space remaining amount and the private space remaining amount of the virtual channel is fed back to the sending side device.
[0008] The sending side device calculates the remaining buffer space of the receiving side device based on the flow control credit value of each virtual channel; when the flow control credit value of each virtual channel and the size of the data packet to be transmitted satisfy a preset condition, the sending side device initiates transmission of the data packet from the sending side device to the receiving side device; when the sending side device initiates transmission of the data packet, the size of the data packet is counted into the cumulative flow control unit value of the corresponding virtual channel that has been sent; when the receiving side device receives the data packet, the size of the data packet is counted into the cumulative flow control unit value of the corresponding virtual channel that has been received; the preset condition is that the sum of the private buffer space remaining amount of the virtual channel and the shared buffer sub-space remaining amount of the virtual channel is greater than or equal to the packet length of the data packet to be transmitted, and the sum of the private buffer space remaining amount of the virtual channel and the total shared buffer space remaining amount is greater than or equal to the packet length of the data packet to be transmitted;
[0009] The sending side device feeds back the cumulative flow control unit value of each virtual channel of the sending side device to the receiving side device, so as to update the flow control unit value corresponding to the received data packet of the corresponding virtual channel of the receiving side device, and realize synchronization between the sending side device and the receiving side device under non-reliable transmission;
[0010] The sending side device and the receiving side device are full-duplex transmission networks, and realize bidirectional transmission of data; the method further comprises:
[0011] The sending side device and the receiving side device feed back the flow control credit value and the flow control unit value to each other, and merge the flow control packet containing the flow control credit value and the flow control packet containing the flow control unit value into one flow control packet for transmission.
[0012] In an optional embodiment, the buffer space of the receiving side device is divided into a shared buffer space and a private buffer space of each virtual channel, further comprising:
[0013] Each virtual channel is allocated a private buffer space, and each private buffer space is used only for storing data packets of the corresponding virtual channel;
[0014] The shared buffer space is allocated, and can be used for storing data packets of all virtual channels, and the size of the shared buffer space is equal to the total buffer space minus the sum of the private buffer spaces of the virtual channels;
[0015] Each virtual channel is allocated a shared buffer sub-space, and the size of the shared buffer sub-space is an upper limit of the total shared buffer space that can be used by the virtual channel.
[0016] In an optional embodiment, the flow control credit value is fed back to the sending side device, further comprising:
[0017] The receiving side device feeds back flow control credit values containing the remaining value information of the buffer space of each virtual channel of the receiving side device to the sending side device, the flow control credit value being the sum of the flow control unit value corresponding to the cumulative received data packet of each virtual channel since the link initialization and the current remaining amount of the buffer space of the virtual channel; the current remaining amount of the buffer space of the virtual channel being the sum of the remaining amount of the private buffer space and the remaining amount of the shared buffer sub-space of the virtual channel.
[0018] In an optional embodiment, the calculating the remaining buffer space of the receiving side device further comprises:
[0019] The sending side device uses the credit value of each virtual channel fed back by the receiving side device to subtract the flow control unit value corresponding to the cumulative sent data packet of the virtual channel, to obtain the remaining amount of the buffer space of the virtual channel; calculates the remaining amount of the private buffer space and the remaining amount of the shared buffer sub-space of the virtual channel; uses the size of the shared buffer sub-space of the virtual channel to subtract the remaining amount of the shared buffer sub-space of the virtual channel, to obtain the used amount of the shared buffer sub-space of the virtual channel; uses the total size of the shared buffer space to subtract the sum of the used amount of the shared buffer sub-space of all virtual channels, to obtain the remaining amount of the total shared buffer space.
[0020] In an optional embodiment, the updating the flow control unit value corresponding to the received data packet of each virtual channel of the receiving side device further comprises:
[0021] The sending side device feeds back the flow control unit value corresponding to the cumulative sent data packet of each virtual channel since the link initialization to the receiving side device through the sending side flow control packet, to synchronize and correct the flow control unit value corresponding to the cumulative received data packet of the virtual channel of the receiving side device since the link initialization.
[0022] According to a second aspect of the present application, a shared buffer device based on non-reliable transmission is provided, comprising:
[0023] A buffer space division unit is configured to divide the buffer space of the receiving side device into a shared buffer space and a private buffer space of each virtual channel based on the total buffer space size of the receiving side device and the number of virtual channels before the data transmission starts in the link initialization process, and feed back the buffer space division information to the sending side device through a network manager.
[0024] The flow control credit feedback unit is configured to feed back, in a non-reliable data transmission process, flow control credit values of each virtual channel of the receiving side device associated with a shared cache space remaining amount and a virtual channel private space remaining amount to a sending side device; when the receiving side device receives a data packet, the size of the data packet is counted into a cumulative received flow control unit value of the corresponding virtual channel; the flow control credit value is a sum of the cumulative received flow control unit value of the data packet corresponding to each virtual channel of the receiving side device since link initialization and a current remaining value of the cache space of the virtual channel;
[0025] The packet transmission unit is configured to calculate, by the sending side device, a remaining cache space of the receiving side device based on the flow control credit values of each virtual channel; initiate data packet transmission from the sending side device to the receiving side device when the flow control credit value of each virtual channel and the size of the data packet to be transmitted meet a preset condition; count, by the sending side device, the size of the data packet into a cumulative sent flow control unit value of the corresponding virtual channel when the sending side device initiates the data packet transmission; the preset condition is that a sum of the private cache space remaining amount of the virtual channel and the shared cache sub-space remaining amount of the virtual channel is greater than or equal to the packet length of the data packet to be transmitted, and a sum of the private cache space remaining amount of the virtual channel and the total shared cache space remaining amount is greater than or equal to the packet length of the data packet to be transmitted;
[0026] The transceiver side synchronization unit is configured to feed back, to the receiving side device, the cumulative sent flow control unit value of the data packet corresponding to each virtual channel of the sending side device, so as to update the received data packet corresponding flow control unit value of each virtual channel of the receiving side device, and realize synchronization between the sending side device and the receiving side device in the non-reliable transmission.
[0027] The sending side device and the receiving side device are full-duplex transmission networks, and realize bidirectional data transmission; the apparatus is further configured to:
[0028] The sending side device and the receiving side device feed back the flow control credit value and the flow control unit value to each other, and merge a flow control packet containing the flow control credit value and a flow control packet containing the flow control unit value into one flow control packet for transmission.
[0029] Compared with the related art, the technical solution of the present application has the following advantages:
[0030] The private cache space can guarantee the traffic isolation between virtual channels and the basic bandwidth of the virtual channel, the shared space increases the total amount of available storage space of the virtual channel, and avoids the same virtual channel from occupying a large amount of shared space and affecting the data transmission of other virtual channels. By setting the size of the shared space, the traditional exclusive storage mechanism is compatible with each other. The credit synchronization between the upstream and downstream transceiver side devices is realized by using the TBS / CL bidirectional flow control mechanism. The flow control mechanism is robust and is not affected by the loss of data packets and flow control packets, and fully supports non-reliable transmission. The scheme of the application has simple hardware implementation, combines private and shared credits, simplifies the credit maintenance logic, and does not need to distinguish the actual use of shared or private credits in the cache division, packet storage and credit maintenance in the transceiver side device, which reduces the transmission bandwidth loss caused by the flow control packet.
[0031] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by the structure and process as indicated in the specification and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the embodiment or related art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without any creative labor.
[0033] Figure 1 is a schematic diagram of a credit-based unidirectional flow control mechanism according to the related art.
[0034] Figure 2 is a flowchart of a shared cache method based on non-reliable transmission according to an exemplary embodiment of the present application.
[0035] Figure 3 is a schematic diagram of a traditional exclusive cache and a shared cache scheme according to the present application.
[0036] Figure 4 is a schematic diagram of a non-reliable transmission shared storage flow control mechanism according to an exemplary embodiment of the present application.
[0037] Figure 5 is a schematic diagram of a remaining space calculation process according to an exemplary embodiment of the present application.
[0038] Figure 6 is a schematic diagram of a remaining space calculation process of a receiving side virtual channel according to an exemplary embodiment of the present application. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0040] like Figure 1 As shown, the main process of a typical credit-based network message transmission mechanism is as follows:
[0041] In step 1, during initialization, the receiving device feeds back credit information regarding the initial buffer space size via Flow Control Messages (FCPs). After initialization, in step 2, the sending device, based on the credit information, determines if the message transmission conditions are met, arbitrates the data packets to be sent on each virtual channel, initiates message transmission, and deducts the corresponding credit value for each data packet; the deducted credit value is the number of Flow Control Units (FCBs) corresponding to the length of the transmitted data packet. In step 3, the receiving device receives the data packet sent by the sending device and stores the packet in the corresponding virtual channel buffer space. In step 4, when the receiving device transmits a packet from the virtual channel buffer space to its downstream module, it adds a credit value and feeds back the newly added credit information from its buffer space to the sending device via FCP; the added credit value is the number of Flow Control Units (FCBs) corresponding to the data packet transmitted to the downstream module.
[0042] The size of the virtual channel buffer is one of the important factors affecting network transmission bandwidth. To ensure high-speed transmission bandwidth, the size of each virtual channel buffer needs to cover the round-trip time (RTT) of the message, so that the receiving device has fed back the newly added credits to the sending device before the sending device exhausts the previous credits; otherwise, there will be data transmission stoppage and bandwidth reduction due to untimely credit feedback. The message RTT is the sum of the time taken in steps 2 to 4 above for the DP to be transmitted from the sending device to the receiving device, the receiving device to transmit the message to the downstream module, and the FCP feedback of the newly added credits from the receiving device to the sending device.
[0043] With the rapid development of switching networks, network transmission bandwidth is increasing, the number of switching nodes is growing, and the transmission cables between nodes are becoming longer, resulting in a greater demand for virtual channel space to cover the packet RTT. However, given limitations in physical implementation or manufacturing costs, the virtual channel space cannot be increased indefinitely. Therefore, when the size of each virtual channel's buffer space is insufficient to cover the packet RTT, a decrease in packet transmission bandwidth will occur. Conversely, sacrificing the number of virtual channels to maintain the storage space size of each virtual channel would compromise service quality and hinder efficient congestion control between virtual channels.
[0044] In recent years, high-speed switching protocols such as PCIe 6.0 have developed shared storage solutions to address the limited storage space of virtual channels. In addition to providing dedicated private cache spaces for each virtual channel, a special shared cache area is set up for all virtual channels to share, while providing corresponding private and shared credit flow control mechanisms. However, this shared cache and flow control mechanism only applies to reliable transmissions that support point-to-point retry. The aforementioned retry mechanism ensures the correctness of data packet content and also strictly guarantees complete consistency in the credit maintenance of the sending and receiving devices in the following three aspects:
[0045] 1) Deduction of private and shared credits during data packet transmission by the sending device;
[0046] 2) The use of private and shared buffer space when storing data packets on the receiving side device;
[0047] 3) When a message is removed from the buffer space of the receiving device, a new shared / private credit feedback is generated.
[0048] exist Figure 1 In the virtual channel buffer sharing scenario based on point-to-point reliable transmission, similar to PCIe 6.0, a one-way flow control mechanism is used: the receiving device sends flow control messages unidirectionally to the sending device, and feeds back its own virtual channel private and shared credits (CAs) to the sending device. However, in networks like InfiniBand, where point-to-point transmission is unreliable, data packets may be passively lost during transmission, or actively discarded by the receiving device after failing verification. Inconsistencies arise in credit maintenance, such as the sending device's private shared credit deduction and the receiving device's feedback of newly added private shared credits. Therefore, the traditional shared buffer and flow control mechanism based on point-to-point reliable transmission is no longer applicable.
[0049] Based on the above analysis, this application proposes a shared buffering method and apparatus for unreliable transmission, designing a virtual channel shared buffering scheme and flow control mechanism for point-to-point unreliable transmission networks. In situations where message loss and inconsistencies exist in sender-receiver credit maintenance in point-to-point unreliable transmission, a bidirectional flow control mechanism supporting sender-receiver credit synchronization and deviation correction is adopted. In unreliable transmission networks with large round-trip time (RTT), this reduces physical implementation risks and chip manufacturing costs, effectively ensuring the number of virtual channels and the size of virtual channel storage space, thereby guaranteeing service quality and transmission bandwidth.
[0050] See Figure 2 The flowchart illustrates, for example, the shared caching method based on unreliable transmission provided in this application includes:
[0051] Step 201: During the link initialization process, based on the total buffer space size and the number of virtual channels, the buffer space is divided into a shared buffer space and a private buffer space for each virtual channel, and the buffer space division information is fed back to the sending side device.
[0052] like Figure 3 In the traditional dedicated solution shown in (a), the storage logic of each virtual channel is independent, and data transmission between virtual channels is completely independent without mutual interference. However, after compromising on physical feasibility and chip manufacturing costs, the buffer space of a single virtual channel cannot cover the round-trip time (RTT) of a message, resulting in bandwidth reduction. Moreover, the virtual channel spaces are strictly independent, leading to low utilization of idle virtual channel storage space. Therefore, this application divides the total virtual channel buffer space into a private buffer space and a shared space, as shown in (a). Figure 3 As shown in (b).
[0053] The relevant parameters for cache space allocation are shown in Table 1:
[0054] Table 1
[0055]
[0056] The shared buffer space allocation is completed during link initialization and is determined by the receiving device based on the total buffer space size and the number of enabled virtual channels in the physical link.
[0057] The total size represents the total buffer space size on the receiving side.
[0058] dedicated_size[n] represents the private cache space size allocated for virtual channel VC n, which is used to realize the mutual isolation of storage space between virtual channels, to ensure the quality of service between virtual channels, to avoid mutual blocking between virtual channels, and to effectively ensure the minimum bandwidth of each virtual channel. In the preferred embodiment, the private cache space size of each virtual channel is not less than the maximum data packet length MTU in the network, which ensures that each virtual channel can transmit data packets without being affected by other virtual channels when the shared space is exhausted.
[0059] shared_limit[n] represents the shared cache sub-space size, which is the upper limit value of the shared cache space that virtual channel VC n can occupy, to avoid a virtual channel exhausting all the shared cache space, which would prevent other virtual channels from using the shared cache space; and to better ensure the quality of service between virtual channels and to ensure the transmission bandwidth.
[0060] global_shared_size represents the total shared cache space size.
[0061] By way of example, the following constraints are set for the above parameter configuration:
[0062] 1) The total shared cache space size = the total storage space size - the sum of the private cache space sizes of each virtual channel:
[0063] global_shared_size = total_size - ∑dedicated_size[n];
[0064] 2) The shared cache sub-space size of virtual channel VC n cannot exceed the total shared cache space size:
[0065] shared_limit[n] ≤ global_shared_size.
[0066] 3) The sum of the shared cache sub-space sizes of each virtual channel can exceed the total shared space size. In the case of limited total storage space in physical implementation, each virtual channel can have more available shared space.
[0067] In an optional embodiment, when the above total shared cache space size is set to 0, it is a traditional completely dedicated storage scheme; in this scheme, the related transceiver side hardware design and credit maintenance do not need to be modified, i.e., this scheme is compatible with the traditional virtual channel dedicated storage scheme.
[0068] In another optional embodiment, when the shared cache sub-space upper limit value of virtual channel VC n is set to the total shared cache space, it means that there is no limit to the use of shared space by this virtual channel, which can meet different shared limit scenarios.
[0069] Exemplarily, as described above, the parameter of the receiving side buffer space division is informed to the sending side device before the data transmission starts in the link initialization stage.
[0070] In an optional embodiment, the receiving side device sends a special defined packet containing the buffer space division parameter of the receiving side to the sending side device, and the feedback of the buffer space division parameter is completed.
[0071] In yet another optional embodiment, the buffer space division information can be fed back to the sending side device by a network manager. After obtaining the buffer space division parameter of the receiving side device, the network manager configures the sending side device. The network manager refers to a management entity for realizing the functions of device discovery, initialization, configuration and topology monitoring in the network.
[0072] Step 202: In the non-reliable data transmission process, the flow control credit value of each virtual channel of the receiving side associated with the remaining shared buffer space and the remaining private buffer space of the virtual channel is fed back to the sending side device.
[0073] Exemplarily, as described above, the receiving side device uses the flow control packet FCP to feed back the flow control credit value (CL) reflecting the remaining buffer space information of each virtual channel of the receiving side to the sending side device when the data packet is transmitted from the buffer space of the receiving side to the downstream module, i.e. the credit is increased. In yet another optional embodiment, the receiving side device periodically sends the flow control packet FCP to feed back the flow control credit value (CL) reflecting the remaining buffer space information of each virtual channel of the receiving side to the sending side device.
[0074] Step 203: The sending side device calculates the remaining buffer space of the receiving side based on the flow control credit value of each virtual channel. When the flow control credit value of the virtual channel and the size of the data packet to be transmitted satisfy a preset condition, the sending side device initiates the data packet transmission from the sending side device to the receiving side device. When the sending side device initiates the data packet transmission, the size of the data packet is counted into the cumulative sent flow control unit value of the corresponding virtual channel. When the receiving side device receives the data packet, the size of the data packet is counted into the cumulative received flow control unit value of the corresponding virtual channel.
[0075] The application adopts the credit-based flow control mechanism. The sending side device calculates the remaining private space size FSDedicated[n] and the remaining shared space FS Shared[n] of each virtual channel of the receiving side and the total shared space remaining value FS Global Shared based on the credit value (CL) of each virtual channel fed back by the downstream receiving side device. When it is determined that the buffer space of the virtual channel of the receiving side device is sufficient, the data packet transmission of the corresponding virtual channel is initiated. Specifically, whether the following two conditions are satisfied is determined:
[0076] 1) the sum of the private cache space remaining of the virtual channel VC n FSDedicated[n] and the shared sub-space remaining of the virtual channel VC n FS Shared[n] is greater than or equal to the packet length of the data packet DP[n] to be transmitted: (FSDedicated[n] + FS Shared[n]) ≥ DP[n].packet length;
[0077] 2) the sum of the private cache space remaining of the virtual channel VC n FSDedicated[n] and the total shared cache space remaining FSGlobal_Shared is greater than or equal to the packet length of the data packet DP[n] to be transmitted: (FSDedicated[n] + FS Global_Shared) ≥ DP[n].packet length.
[0078] Unlike in PCIE 6.0, a data packet can only consume private or shared credits; based on the above packet transmission conditions, in the technical solution, a data packet can initiate packet transmission by consuming private cache space and shared cache sub-space credits when the private space remaining is less than the data packet length, ensuring full utilization of cache space and ensuring data transmission bandwidth.
[0079] Step 204: feeding back the flow control unit value corresponding to the cumulative transmitted data packet of the sending side device to the receiving side device to update the flow control unit value corresponding to the received data packet of each virtual channel of the receiving side device, realizing synchronization between the sending side device and the receiving side device under non-reliable transmission.
[0080] As shown in Figure 4 illustratively, for the case of inconsistent credits between the sending side device and the receiving side device due to transmission loss and active discarding in a non-reliable transmission network, the present application adopts a bidirectional CL / TBS flow control scheme:
[0081] First, as described in step 202, the receiving side device uses the receiving side flow control packet FCP0 to feed back the flow control credit value CL containing the cache space remaining value information of each virtual channel of the receiving side device to the sending side device; the flow control credit value CL is the sum of the flow control unit value ABR corresponding to the cumulative received data packet of each virtual channel of the receiving side device since link initialization and the current remaining value FS of the cache space of the virtual channel.
[0082] Then, as described above, the sending side device uses the sending side flow control message FCP1 to feed back the flow control unit value (TBS) corresponding to the cumulative sent data messages of each virtual channel after the self-link initialization to the receiving side device, for synchronizing and correcting the flow control unit value ABR corresponding to the cumulative received data messages of the corresponding virtual channel after the self-link initialization of the receiving side.
[0083] With the mechanism of bidirectional flow control TBS updating ABR, when there is message loss in the non-reliable transmission link, the sending side TBS supports correcting the receiving side ABR, and credit synchronization in the non-reliable transmission scenario is realized.
[0084] It should be noted that, for the sake of understanding, the sending side and the receiving side device are defined by way of example only. In an actual full-duplex transmission network, data is transmitted bidirectionally between upstream and downstream devices. Therefore, the receiving side device sends the flow control message FCP0 containing the CL information to the sending side, and the sending side device sends the flow control message FCP1 containing the TBS information to the receiving side. Similarly, the flow control messages FCP0 and FCP1 are defined by way of example only. In a full-duplex network, upstream and downstream devices feedback CL / TBS to each other.
[0085] In a further preferred embodiment, FCP0 and FCP1 in a full-duplex network are combined into one flow control message containing TC / TBS information for transmission, so as to save the transmission bandwidth occupied by flow control message transmission.
[0086] The maintenance of parameters such as TBS, ABR, FS, CL, etc. in the transceiving side device does not need to distinguish between private and shared storage spaces for messages, and the hardware implementation is simple. Each virtual channel uses only one CL parameter and one flow control message to complete the feedback of private and shared credits. Compared with the PCIE 6.0 scheme which uses two different flow control messages to feedback private and shared credits respectively, the present application combines the feedback of private and shared credits, thereby reducing the data transmission bandwidth loss caused by flow control messages.
[0087] The parameters maintained by the receiving side device are summarized in Table 2.
[0088] Table 2
[0089]
[0090]
[0091] As described above, the parameters of the receiving side that need to be calculated by the sending side device before initiating message transmission include: the remaining private buffer space of the virtual channel VC n FSDedicated[n], the remaining shared sub-space of the virtual channel VC n FS Shared[n], and the total global shared space remaining FS Global Shared.
[0092] The sending side device obtains the buffer space related partition parameters of the receiving side (including the virtual channel VCn private buffer space size, the upper limit of the virtual channel VCn shareable space, and the total shared space size) in step 202, and on this basis, the key parameter calculation in the message transmission condition can be realized.
[0093] Exemplarily, after receiving the FCP1 message of the receiving side and obtaining the credit CL value, the above parameter calculation method and process are as shown in FIG. 6. Figure 6 First, the sum FS[n] of the remaining private buffer space and the remaining shared sub-space of the virtual channel VCn is calculated. Then, the remaining private buffer space FS Dedicated[n] and the remaining shared sub-space FS Shared[n] of the virtual channel VCn are calculated respectively. The shared sub-space value Shared Used[n] used by the virtual channel VCn is calculated, and then the sum is calculated to obtain the total shared buffer space value Total Shared Used used by all virtual channels. Finally, the total shared buffer space remaining value FSGlobal Shared is calculated. The parameters maintained by the sending side device are shown in Table 3.
[0094] Table 3
[0095]
[0096]
[0097]
[0098] It can be seen that the shared buffer method based on non-reliable transmission proposed in the present application has the following advantages compared with the related art:
[0099] Under the premise of not increasing the consumption of hardware resources, the number and space of virtual channels are effectively solved, and the quality of service and transmission bandwidth are guaranteed. The private buffer space can guarantee the traffic isolation between virtual channels and the basic bandwidth of the virtual channel, the shared space increases the total amount of available storage space of the virtual channel, and avoids the influence of a large amount of shared space occupied by the same virtual channel on the data transmission of other virtual channels. Through the setting of the shared space size, the traditional exclusive storage mechanism is compatible. The TBS / CL bidirectional flow control mechanism is adopted to realize the synchronization of upstream and downstream credits, and the flow control mechanism is robust and is not affected by the loss of data messages and flow control messages, and fully supports non-reliable transmission. The scheme of the present application is simple in hardware implementation, combines private and shared credits, simplifies the credit maintenance logic, and does not need to distinguish between the actual use of shared or private credits in the buffer partition, message storage, and credit maintenance in the receiving and sending side devices, thereby reducing the transmission bandwidth loss caused by flow control messages.
[0100] Correspondingly, the application provides a shared cache device based on non-reliable transmission in a second aspect, comprising:
[0101] a cache space division unit, configured to divide a cache space of a receiving side device into a shared cache space and private cache spaces of respective virtual channels based on a total cache space size of the receiving side device and a number of virtual channels in a link initialization process, and feed back cache space division information to a sending side device;
[0102] a flow control credit feedback unit, configured to feed back flow control credit values of respective virtual channels of the receiving side device associated with a remaining amount of the shared cache space and a remaining amount of the private cache spaces of the virtual channels to the sending side device in a non-reliable data transmission process; and when the receiving side device receives the data packet, count a size of the data packet into the accumulated received flow control unit value of the corresponding virtual channel;
[0103] a packet transmission unit, configured to calculate a remaining cache space of the receiving side device based on the flow control credit values of the respective virtual channels of the sending side device; initiate transmission of the data packet from the sending side device to the receiving side device when the flow control credit values of the respective virtual channels and the size of the data packet to be transmitted meet a preset condition; and when the sending side device initiates the transmission of the data packet, count the size of the data packet into the accumulated sent flow control unit value of the corresponding virtual channel;
[0104] a transceiver side synchronization unit, configured to feed back the flow control unit value corresponding to the accumulated sent data packet of each virtual channel of the sending side device to the receiving side device, so as to update the flow control unit value corresponding to the received data packet of each virtual channel of the receiving side device, and realize synchronization between the sending side device and the receiving side device in the non-reliable transmission.
[0105] The above device can be realized by the shared cache method based on non-reliable transmission provided by the embodiments of the first aspect, and the specific implementation manner can be referred to the description in the embodiments of the first aspect, which will not be described here.
[0106] Although the technical solution provides a shared cache method suitable for non-reliable transmission with a synchronization mechanism between the sending side device and the receiving side device, the technical solution is still applicable to reliable transmission. Reliable transmission can be understood as a specific case where there is no deviation between the data packet sent by the sending side in the non-reliable transmission and the data packet received by the receiving side. Accordingly, when the technical solution is applied to reliable transmission, it can also realize synchronization and deviation correction when there is an abnormal deviation between the accumulated sent flow control unit value of the sending side device and the accumulated received flow control unit value of the receiving side device, and improve the robustness of the flow control mechanism in reliable transmission.
[0107] It can be understood that the structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily think of combinations and adjustments of the structural features of the above multiple embodiments according to the use needs, and the concept of the present application should not be limited to the specific details of the above examples.
[0108] Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood that those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements 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 application.
Claims
1. A method for shared caching based on unreliable transport, the method comprising: The method comprises the following steps: In the link initialization process, the buffer space of the receiving side device is divided into shared buffer space and private buffer space of each virtual channel based on the total buffer space size and the number of virtual channels of the receiving side device before the data transmission starts, and the buffer space division information is fed back to the sending side device through the network manager; In the non-reliable data transmission process, the flow control credit value of each virtual channel of the receiving side device associated with the shared buffer space remaining amount and the virtual channel private space remaining amount is fed back to the sending side device; The sending side device calculates the remaining buffer space of the receiving side device based on the flow control credit value of each virtual channel; when the flow control credit value of each virtual channel and the size of the data packet to be transmitted meet the preset condition, the data packet transmission from the sending side device to the receiving side device is initiated; when the sending side device initiates the data packet transmission, the size of the data packet is counted into the cumulative sent flow control unit value of the corresponding virtual channel; When the receiving side device receives the data packet, the size of the data packet is counted into the cumulative received flow control unit value of the corresponding virtual channel; the preset condition is that the sum of the private buffer space remaining amount of the virtual channel and the shared buffer sub-space remaining amount of the virtual channel is greater than or equal to the packet length of the data packet to be transmitted, and the sum of the private buffer space remaining amount of the virtual channel and the total shared buffer space remaining amount is greater than or equal to the packet length of the data packet to be transmitted; The cumulative sent flow control unit value of each virtual channel of the sending side device corresponding to the data packet is fed back to the receiving side device to update the cumulative received flow control unit value of the corresponding virtual channel of the receiving side device, so as to realize the synchronization between the sending side device and the receiving side device in the non-reliable transmission; The sending side device and the receiving side device form a full-duplex transmission network to realize bidirectional data transmission; the method further comprises: The sending side device and the receiving side device feed back the flow control credit value and the flow control unit value to each other, and merge the flow control packet containing the flow control credit value and the flow control packet containing the flow control unit value into one flow control packet for transmission.
2. The non-reliable transmission based shared cache method of claim 1, wherein, The buffer space of the receiving side device is further divided into shared buffer space and private buffer space of each virtual channel, which comprises the following steps: Each virtual channel is allocated a private buffer space, and each private buffer space is used only for storing data packets of the corresponding virtual channel; The shared buffer space is allocated, which can be used for storing data packets of all virtual channels, and the size of the shared buffer space is equal to the total buffer space minus the sum of the private buffer spaces of all virtual channels; Each virtual channel is allocated a shared buffer sub-space, and the size of the shared buffer sub-space is the upper limit of the total shared buffer space that can be used by the virtual channel.
3. The non-reliable transport based shared cache method of claim 1, wherein, The flow control credit value is further fed back to the sending side device, which comprises the following steps: The receiving side flow control message of the receiving side device is used to feed back flow control credit values containing the residual value information of the buffer space of each virtual channel of the receiving side device to the sending side device, the flow control credit value is the sum of the flow control unit value corresponding to the cumulative received data message of each virtual channel of the receiving side device since the link initialization and the current residual amount of the buffer space of the virtual channel; the current residual amount of the buffer space of the virtual channel is the sum of the residual amount of the private space buffer and the residual amount of the shared buffer sub-space of the virtual channel.
4. The non-reliable transmission based shared cache method of claim 1, wherein, The residual buffer space of the receiving side device is further calculated, and the method further comprises: When the sending side device receives the flow control credit value of each virtual channel fed back by the receiving side device, the residual amount of the buffer space of the virtual channel is obtained by subtracting the flow control unit value corresponding to the cumulative sent data message of the virtual channel from the flow control credit value; the residual amount of the private buffer space of the virtual channel and the residual amount of the shared buffer sub-space of the virtual channel are calculated; the used amount of the shared buffer sub-space of the virtual channel is obtained by subtracting the residual amount of the shared buffer sub-space of the virtual channel from the size of the shared buffer sub-space of the virtual channel; and the residual amount of the total shared buffer space is obtained by subtracting the sum of the used amounts of the shared buffer sub-spaces of all virtual channels from the size of the total shared buffer space.
5. The non-reliable transport based shared cache method of claim 1, wherein, The flow control unit value corresponding to the cumulative received data message of each virtual channel of the receiving side device is further updated, and the method further comprises: The flow control unit value corresponding to the cumulative sent data message of each virtual channel since the link initialization is fed back to the receiving side device through the sending side flow control message of the sending side device, so as to synchronize and correct the flow control unit value corresponding to the cumulative received data message of the virtual channel of the receiving side device since the link initialization.
6. A shared cache apparatus based on non-reliable transmission, characterized in that, The method further comprises: a buffer space division unit, configured to divide the buffer space of the receiving side device into a shared buffer space and a private buffer space of each virtual channel based on the total buffer space size of the receiving side device and the number of virtual channels before the data transmission starts in the link initialization process, and feed back the buffer space division information to the sending side device through a network manager; a flow control credit feedback unit, configured to feed back the flow control credit value of each virtual channel of the receiving side device associated with the residual amount of the shared buffer space and the residual amount of the private space of the virtual channel to the sending side device in the non-reliable data transmission process; and configured to count the size of the data message into the cumulative received flow control unit value of the corresponding virtual channel when the data message is received by the receiving side device; the flow control credit value is the sum of the flow control unit value corresponding to the cumulative received data message of each virtual channel of the receiving side device since the link initialization and the current residual value of the buffer space of the virtual channel; The packet transmission unit is configured to calculate the remaining buffer space of the receiving side device based on the flow control credit value of each virtual channel at the sending side device, initiate the data packet transmission from the sending side device to the receiving side device when the flow control credit value of each virtual channel and the size of the data packet to be transmitted meet a preset condition, and count the size of the data packet into the cumulative sent flow control unit value of the corresponding virtual channel when the sending side device initiates the data packet transmission. The preset condition is that the sum of the private buffer space remaining amount of the virtual channel and the shared buffer sub-space remaining amount of the virtual channel is greater than or equal to the packet length of the data packet to be transmitted, and the sum of the private buffer space remaining amount of the virtual channel and the total shared buffer space remaining amount is greater than or equal to the packet length of the data packet to be transmitted. The transceiving side synchronization unit is configured to feed back the flow control unit value corresponding to the cumulative sent data packet of each virtual channel of the sending side device to the receiving side device, update the flow control unit value corresponding to the received data packet of each virtual channel of the receiving side device, and realize the synchronization between the sending side device and the receiving side device under the non-reliable transmission. The sending side device and the receiving side device form a full-duplex transmission network to realize the bidirectional transmission of data. The device is further configured to: The sending side device and the receiving side device feed back the flow control credit value and the flow control unit value to each other, and merge the flow control packet containing the flow control credit value and the flow control packet containing the flow control unit value into one flow control packet for transmission.
7. The non-reliable transport based shared cache apparatus of claim 6, wherein, The buffer space division unit is further configured to: allocate a private buffer space for each virtual channel, and each private buffer space is used only for storing the data packet of the corresponding virtual channel; allocate a shared buffer space, which can be used for storing the data packet of all virtual channels, and the size of the shared buffer space is equal to the total buffer space minus the sum of the private buffer spaces of all virtual channels; allocate a shared buffer sub-space for each virtual channel, and the size of the shared buffer sub-space is the upper limit of the total shared buffer space available to the virtual channel.
8. The non-reliable transport based shared cache apparatus of claim 6, wherein, The flow control credit feedback unit is further configured to: feed back the flow control credit value containing the buffer space remaining value information of each virtual channel of the receiving side device to the sending side device through the receiving side flow control packet of the receiving side device, and the flow control credit value is the sum of the flow control unit value corresponding to the cumulative received data packet of each virtual channel of the receiving side device since the link initialization and the current remaining amount of the buffer space of the virtual channel; the current remaining amount of the buffer space of the virtual channel is the sum of the private space buffer remaining amount and the shared buffer sub-space remaining amount of the virtual channel.
9. The non-reliable transport based shared cache apparatus of claim 6, wherein, The packet transmission unit is further configured to: When the receiving side device feeds back the virtual channel credit value, the virtual channel credit value is subtracted by the flow control unit value corresponding to the accumulated transmitted data packet of the virtual channel to obtain the remaining space of the virtual channel; the private cache space margin of the virtual channel and the remaining amount of the shared cache sub-space of the virtual channel are calculated; the shared cache sub-space size of the virtual channel is subtracted by the remaining amount of the shared cache sub-space of the virtual channel to obtain the used amount of the shared cache sub-space of the virtual channel; the total shared cache space size is subtracted by the sum of the used amounts of all virtual channel shared cache sub-spaces to obtain the remaining amount of the total shared cache space.
10. The non-reliable transport based shared cache apparatus of claim 6, wherein, The transceiving side synchronization unit is further used for: feeding back, to the receiving side device, the flow control unit value corresponding to the accumulated transmitted data packet of each virtual channel after the link is initialized through the sending side flow control packet of the sending side device, so as to synchronize and correct the flow control unit value corresponding to the accumulated received data packet of the virtual channel of the receiving side device after the link is initialized.
Citation Information
Patent Citations
Fluid control method and device based on tokens
CN104780118A