System and method for compressing a data stream using encoding of frequently occurring data values
Through the link interface unit, data blocks are divided and detected, only mismatch or variable parts are sent, and data is reconstructed using encoded fields, solving the problem of link bandwidth limitation, and achieving efficient data transmission across narrow links and improving bandwidth efficiency .
Patent Information
- Application Number
- CN202210674410.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-10-16
- Filing Date
- 2017-12-08
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2037-12-08
AI Technical Summary
In the prior art, the link bandwidth between individual dies is limited, resulting in limited data transmission frequency and link width, increasing signal count or frequency is high, making it difficult to effectively scale.
The data cache blocks with different sizes are divided through the link interface unit, and the data pattern that frequently occurs is detected, and only mismatched blocks or variable parts of the block are sent, and the data is reconstructed using the encoded fields to reduce the amount of data on the link.
It effectively reduces the amount of data transmission on the link, improves bandwidth efficiency, reduces power consumption, and realizes efficient data transmission across narrow links.
Smart Images

Figure CN115277868B_ABST
Abstract
Description
[0001] This application is a divisional application of the application with application number 201780075300.8, application date December 8, 2017, and invention name “Compressing Frequent Data Values Across Narrow Links”. Background of the Invention
[0002] Related technical description
[0003] Electrical components on separate dies communicate with each other via links between dies. The bandwidth between dies is limited by physical distance, the electrical characteristics of off-chip connections, and the limited availability of pins. The frequency of data transmission on the link and the width of the link (in terms of the number of data bits transferred) define the bandwidth on the link. Increasing the signal count or the link frequency are ways to increase bandwidth, but both involve cost and technical issues that prevent them from being effectively expanded. BRIEF DESCRIPTION OF THE DRAWINGS
[0004] The advantages of the methods and mechanisms described herein may be better understood by referring to the following description in conjunction with the accompanying drawings, in which:
[0005] Figure 1 is a block diagram of one embodiment of a computing system.
[0006] Figure 2 is a block diagram of one embodiment of a link interface unit.
[0007] Figure 3 is a schematic diagram of one embodiment of a technique for compressing cache lines prior to transmission over a communication link.
[0008] Figure 4 is a diagram of another embodiment of a technique for compressing cache lines of data prior to transmission over a link.
[0009] Figure 5 One embodiment of a table indicating encoding fields for compressed data blocks is shown.
[0010] Figure 6 Two examples of coding tables are shown.
[0011] Figure 7 One embodiment of a table with pattern detection schemes implemented for different types of applications is shown.
[0012] Figure 8 is a generalized flow chart illustrating one embodiment of a method for compressing processor-generated data.
[0013] Fig. 9 is a generalized flow chart illustrating another embodiment of a method for compressing processor-generated data.
[0014] Fig.10 is a generalized flow chart illustrating one embodiment of a method for dynamically performing data pattern checking of a data block of a data stream.
[0015] Fig.11 is a generalized flow chart illustrating one embodiment of a method for compressing processor-generated data.
[0016] Fig.12 is a generalized flow chart illustrating another embodiment of a method for compressing processor-generated data. DETAILED DESCRIPTION
[0017] In the following description, numerous specific details are set forth to provide a thorough understanding of the methods and mechanisms presented herein. However, it will be appreciated by those of ordinary skill in the art that various embodiments may be practiced without these specific details. In some cases, well-known structures, components, signals, computer program instructions, and techniques are not shown in detail to avoid obscuring the methods described herein. It should be understood that for clarity of illustration, the elements shown in the figures do not have to be drawn to scale. For example, the size of some elements may be enlarged relative to other elements.
[0018] Various systems, devices, methods, and computer-readable media for compressing frequent data values across narrow links are disclosed. In one embodiment, a system includes at least a processor, a link interface unit, and a communication link. In one embodiment, the link interface unit is configured to receive a data stream for transmission on a communication link, wherein the data stream is generated by a processor. In one embodiment, the data stream includes one or more data cache lines. In one embodiment, the link interface unit divides the cache lines of data using two different methods. The link interface unit divides the cache lines into data blocks of a first size, and then determines whether every other block of the cache line matches any one of one or more patterns. In one embodiment, the first size is 32 bits. In one embodiment, one of the patterns is that all bits are equal to zero. If every other block matches a given pattern in one or more patterns, the link interface unit only sends other blocks through the communication link. This reduces the amount of data sent through the communication link by half. If every other block does not match any one of the one or more patterns, the link interface unit divides the cache lines into data blocks of a second size, and then determines whether every other block of the second size of the cache line matches any one of the one or more patterns. In one embodiment, the second size is 16 bits. If every other block matches a given pattern of the one or more patterns, then the link interface unit sends only the other blocks over the communication link. The link interface unit also sends a coding field over the communication link to indicate which given pattern every other block matches and to indicate the size of the block so that the receiver can reconstruct the original data. If every other block does not match any of the one or more patterns, then the link interface unit sends the entire cache line of data over the communication link.
[0019] In one embodiment, the link interface unit is configured to monitor the data stream to dynamically determine which data patterns frequently occur in the data stream over a first time period. Next, in response to determining that a third data pattern is a frequently occurring data pattern in the data stream over the first time period, the link interface unit determines whether a data block of a first size in the data stream matches the third data pattern, wherein the third data pattern is different from one or more of the first or second data patterns. In one embodiment, a frequently occurring data pattern is a data pattern that occurs more than a threshold number of times in the first time period.
[0020] In one embodiment, based on the type of software application executed by the processor of the system, the system changes the mode detection scheme implemented to compress data. For example, in one embodiment, when compressing data associated with a first software application, the link interface unit implements a first mode detection scheme, and when compressing data associated with a second software application, the link interface unit implements a second mode detection scheme, wherein the second mode detection scheme is different from the first mode detection scheme. In addition, the link interface unit implements any number of other mode detection schemes for other types of software applications.
[0021] Reference now Figure 1 , a block diagram of an embodiment of a computing system 100 is shown. In one embodiment, the system 100 includes a plurality of nodes, wherein Figure 1 Nodes 105 and 110 are shown in FIG. It should be noted that system 100 may include additional nodes having circuits similar to those shown in nodes 105 and 110. Nodes 105 and 110 are coupled together via communication link 155. According to an embodiment, communication link 155 may be a bidirectional or unidirectional link. According to an embodiment, the width of link 155 has different widths (e.g., 16 bits). In one embodiment, node 105 is formed on a first integrated circuit die, and node 110 is formed on a second integrated circuit die, wherein link 155 provides interconnection between the first die and the second die.
[0022] Nodes 105 and 110 represent computing nodes of any number and type. In general, nodes 105 or 110 are defined as equipment or systems with at least one computing / processing element (e.g., processor, processor core, programmable logic device, application specific integrated circuit) and at least one memory device. At least one computing element of a node is configured to execute instructions and / or perform one or more types of calculations (e.g., floating point, integer, memory, I / O) according to an embodiment. The components of each node 105 and 110 are interconnected by one or more communication buses or structures (e.g., switching structures 135 and 140, respectively). In one embodiment, the function of each node 105 and 110 is incorporated into a single integrated circuit. In another embodiment, the function of each node 105 and 110 is incorporated into a chipset on a computer motherboard. In one embodiment, each node 105 and 110 is an independent system in a mobile computer, a desktop computer, a server or other device or system. In another embodiment, each node 105 and 110 is a socket of a multi-socket system 100. In yet another embodiment, each node 105 and 110 is a separate die of the multi-die system 100 .
[0023] In one embodiment, nodes 105 and 110 implement a packet-based interface for communication on link 155. Typically, packets are transmitted on link 155 as one or more bit times. In one embodiment, a given bit time can be referenced to a rising edge or a falling edge of a clock signal. In another embodiment, link 155 does not include a clock signal. Instead, the clock is recovered from detecting a conversion on the data line. In one embodiment, link 155 is narrower than a packet interface. In this embodiment, packets are dispersed over many bit times on link 155.
[0024] In various embodiments, link units 115 and 120 are configured to implement techniques for reducing (i.e., compressing) the amount of data sent over link 155. It should be noted that link units 115 and 120 may also be referred to as link interface units. In one embodiment, a technique for detecting frequently occurring data patterns in data sent over link 155 is implemented. On node 105, link unit 115 is configured to determine whether the processor-generated data to be transmitted over link 155 includes one or more frequently occurring data patterns. In one embodiment, the processor-generated data to be transmitted over link 155 is stored in a buffer of link unit 115 before being transmitted over link 155. Link unit 115 is configured to construct command and data packets for transmission over link 155 using the processor-generated data stored in the buffer. In one embodiment, if a data pattern is detected in the data sent from processor 160 to link unit 115, the data is compressed before being transmitted over link 155. In one embodiment, if the data matches a pattern of alternating fixed portions with variable portions, only the variable portion of the data is transmitted over link 155. For example, in one embodiment, a cache line of data includes multiple data words, and if the upper half of each data word matches a pattern (e.g., all zeros), then only the lower half of each data word is sent on link 155. In this way, the amount of data sent on link 155 is reduced by half, reducing power consumption and improving the efficiency of link 155. In one embodiment, an encoding field is generated in the command packet to indicate the pattern that the fixed portion matches and to indicate the size of the fixed portion. For example, in one embodiment, the size of the fixed portion is 16 bits or 32 bits. In other embodiments, other sizes may be utilized.
[0025] When the link unit 115 or 120 receives a compressed packet sent via the link 155, the link unit is configured to reconstruct the data payload based on the variable portion of the data word in the data packet and the encoding field in the corresponding command packet. When the control logic at the receiver is reconstructing the data payload, if the encoding field indicates that a given data pattern is detected, the control logic generates a fixed portion having the specified data pattern and inserts the fixed portion into the data payload adjacent to the variable portion.
[0026] Node 105 includes at least a processor 160 and a switch fabric 135 coupled to a cache 165. Processor 160 may also include one or more internal caches. Processor 160 represents any number and type of processors (e.g., central processing unit (CPU), graphics processing unit (GPU)) with any number of cores. Each processor core includes one or more execution units, cache memory, scheduler, branch prediction circuitry, etc. In one embodiment, processor 160 is configured to execute the main control software of node 105, such as an operating system. Typically, the software executed by processor 160 during use can control other components of node 105 to implement the desired functions of node 105. Processor 160 may also execute other software, such as an application.
[0027] The switch fabric 135 is coupled to the memory controller (MC) 125 and the link unit 115. The switch fabric 135 is a communication structure that routes messages between the components of the node 105. The memory controller 125 is coupled to the memory 127, which represents any number and type of memory modules or devices. In some embodiments, the memory 127 includes one or more memory devices mounted on a motherboard or other carrier on which the other components of the node 105 are also mounted. In some embodiments, at least a portion of the memory 127 is implemented on the die of the node 105. The memory devices used to implement the memory 127 include (but are not limited to) random access memory (RAM), static RAM (SRAM), dynamic RAM (DRAM), double data rate (DDR) DRAM, DDR2 DRAM, DDR3 DRAM, DDR4 DRAM, etc. Similar to the node 105, the node 110 includes a processor 170, a cache 175, a link unit 120, a switch fabric 140, and a memory controller 130 coupled to the memory 132.
[0028] In various embodiments, computing system 100 may correspond to any of various types of computer systems or computing devices, including but not limited to a personal computer system, a desktop computer, a laptop or notebook computer, a computing node, a supercomputer, a mobile device, a tablet computer, a phone, a smartphone, a mainframe computer system, a handheld computer, a workstation, a network computer, a watch, a wearable device, a consumer device, a server, a file server, an application server, a storage server, a network server, a cloud computing server, or generally any type of computing system or device or a portion thereof. It should be noted that the number of components of computing system 100 may vary from embodiment to embodiment. The number of each component / subcomponent may be more or less than Figure 1 It should also be noted that computing system 100 may include Figure 1 In addition, in other embodiments, the computing system 100 may be configured in a manner different from that shown in FIG. Figure 1 Other ways to construct as shown.
[0029] Reference now Figure 2 , a block diagram of an embodiment of the link interface unit 205 is shown. In one embodiment, the control logic of the link interface unit 205 includes the link units 115 and 120 ( Figure 1 ). In one embodiment, the link interface unit 205 includes a performance monitor 210, a control unit 212, a detection unit 215, a transmission buffer 225, and a reception buffer 230. In other embodiments, the link interface unit 205 may include other components. In various embodiments, the control logic of the link interface unit 205 may be implemented using any suitable combination of software and / or hardware. The link interface unit 205 is coupled to a switch fabric (not shown) and a link 235 connected to one or more other components.
[0030] In one embodiment, performance monitor 210 is configured to monitor frequently occurring data patterns within a data stream being transmitted over link 235. If performance monitor 210 detects a frequently occurring data pattern, then performance monitor 210 sends an indication of the pattern to control unit 212. In one embodiment, control unit 212 is configured to program the pattern 220 that detection unit 215 is searching for. In one embodiment, detection unit 215 is configured to search for pattern 220 in data blocks stored in transmission buffer 225 that are being buffered prior to transmission over link 235. In another embodiment, pattern 220 is predetermined and fixed.
[0031] In one embodiment, the detection unit 215 is configured to detect whether the data in the transmission buffer 225 matches any of the patterns 220. In one embodiment, the patterns 220 include a plurality of data patterns of different sizes. In this embodiment, the detection unit 215 looks at the different sized data blocks in the transmission buffer 225 to determine whether they match the different sized data patterns 220. If the detection unit 215 finds that the fixed portion of the cache line of data matches one of the data patterns 220, then the fixed portion is discarded from the data sent on the link 235, and a coding field is sent indicating that the fixed portion was discarded and indicating which pattern the fixed portion matched. In one embodiment, the control unit 212 is configured to reconstruct the data received via the link 235 and stored in the receive buffer 230. For example, the control unit 212 determines whether the fixed portion of the cache line is discarded and determines which pattern these fixed portions match by retrieving the coding field from the receive buffer 230. The control unit 212 adds these fixed portions back to the data to reconstruct the original data stream.
[0032] Reference now Figure 3 , a schematic diagram of one embodiment of a technique for compressing a cache line 305 prior to transmission over a communication link is shown. A plurality of data words are stored within a cache line 305, wherein each data word is a predetermined number of bits. It should be noted that in some embodiments, the data words in a cache line 305 may be one of a variety of sizes. For example, in one embodiment, the processor has a 64-bit architecture, but is backward compatible with 32-bit software. Therefore, in this embodiment, the processor may handle both 64-bit or 32-bit software. In other embodiments, the processor may support data words of other sizes.
[0033] Cache line 305 includes multiple processor generated data blocks 310A-N, where the number of data blocks per cache line varies from implementation to implementation. Data blocks 310A-N are also referred to as variables or words. When the data of cache line 305 is transferred via a communication link (e.g., Figure 2When the link 235 of the link 235 is sent, the detection unit (e.g., the detection unit 215) determines whether every other data block in the data block 310A-N matches one or more data patterns. The one or more data patterns include frequently used patterns, and the precise data pattern that the detection unit is looking for varies from implementation to implementation. If a pattern is detected in every other data block in the data block 310A-N, the link interface unit only sends the variable block of the data block 310A-N through the communication link. If no pattern is detected in every other data block, the detection unit determines whether the subset 315A-N matches one or more data patterns. If a pattern is detected in each subset 315A-N, the link interface unit only sends the other part of the data block 310A-N.
[0034] Reference now Figure 4 , a block diagram of another embodiment of a technique for compressing cache lines of data prior to transmission over a link is shown. Cache line 405 includes data blocks 440, 445, 450, and 455, which represent any number and size of data blocks. Cache line 405 and optionally one or more cache lines are grouped into data packets that are sent to separate dies or components over a communication link.
[0035] In one embodiment, the data blocks 440, 445, 450, and 455 of the cache line 405 are grouped into data packets 425. Data packets 425 represent data packets of any size, and the size varies depending on the embodiment. Data packets 425 include a header 430 indicating the type of packet and any additional information. In one embodiment, the data blocks of a single cache line 405 are divided into multiple data packets 425. In another embodiment, the data blocks of one or more cache lines are combined into a single data packet 425. For each data block of the cache line 405, the detection unit determines whether the entire data block matches one or more patterns, or whether a subset of the data block matches one or more patterns. In one embodiment, the subset is the upper half of the data block. In other embodiments, the subset can be other parts of the data block.
[0036] In one embodiment, the data pattern includes all 1s or all 0s. For example, for small values stored in data blocks 440, 445, 450, and 455, the upper bits will be all 0s. Or for small negative values stored in data blocks 440, 445, 450, and 455, the upper bits will be all 1s using a sign extension. In one embodiment, if the data pattern is detected for a subset of each data block 440, 445, 450, and 455 of cache line 405, then the subset of data blocks is not included in data packet 425. This will result in a reduction in the amount of data sent over the communication link.
[0037] As shown in data packet 425, it is assumed that each subset 440A, 445A, 450A, and 455A of the data blocks of cache line 405 matches a frequently used pattern, and therefore only the other portions 440B, 445B, 450B, and 455B of the data blocks of cache line 405 are included in data packet 425. In addition, it is assumed that subsets 440A, 445A, 450A, and 455A of the data blocks are the upper half of each data block, and subsets 440B, 445B, 450B, and 455B are the lower half of each data block. In other embodiments, the data blocks may be divided into subsets of other sizes and / or other numbers for the purpose of detecting patterns.
[0038] In one embodiment, coding fields 420 are generated and included in command packet 415 to indicate whether a pattern is detected for each data block of cache line 405, and which pattern is detected. Command packet 415 also includes header 418 that specifies the packet type and additional information. In one embodiment, a first coding field indicates whether a pattern is detected in the entire data block or in a subset of the data block. In one embodiment, a second coding field indicates which of a plurality of patterns is detected. In other embodiments, other numbers and types of coding fields may be included in command packet 415 to encode whether and how the data blocks are compressed in data packet 425.
[0039] Reference now Figure 5 , shows one embodiment of a table 500 indicating encoding fields for a compressed data block. Column 505 is a single-bit field indicating whether a pattern is detected in a cache line, where "1" indicates that a pattern is detected and "0" indicates that a pattern is not detected. Column 510 is a two-bit field indicating which pattern is detected. In other embodiments, column 510 may include other numbers of bits to indicate which pattern is detected, depending on the total number of patterns being searched for. Column 520 specifies the pattern for each encoding in column 510.
[0040] In one embodiment, the encoding "00" is used to indicate that the upper half of each data block of the first size is all 0 bits, the encoding "01" is used to indicate that the upper half of each data block of the first size is all 1 bit, the encoding "10" is used to indicate that the upper half of each data block of the second size is all 0 bits, and the encoding "11" is used to indicate that the upper half of each data block of the second size is all 1 bit. In one embodiment, the first size is 64 bits, and the second size is 32 bits. In other embodiments, the first size and the second size are other bit numbers. If the cache line matches one of these patterns, the upper half of each block of the cache line is not included in the data packet sent by the communication link. When the receiver receives the data packet, the receiver uses the command packet to identify whether a pattern is detected and which pattern is detected, so that the receiver can decompress the data into its initial format. In other embodiments, other encodings can be used to indicate whether a pattern is detected and which pattern is detected. In addition, in other embodiments, other numbers and types of patterns can be searched in the data blocks sent by the communication link.
[0041] In one embodiment, the combination of columns 505 and 510 corresponds to ( Figure 4 4. In this embodiment, the fields in columns 505 and 510 are included in the command packet for each cache line sent in one or more data packets (e.g., data packet 425). The order of these fields in the command packet will match the order of the cache lines in the data packet.
[0042] Reference now Figure 6 , shows two examples of coding tables. Figure 6Table 600 is shown on the left side of to represent the coding scheme used to compress data sent over a communication link in one embodiment. In this embodiment, coding field 605 includes two bits to represent four different cases. If coding field 605 is set to "00", then this indicates that no pattern is detected in the corresponding data block, as shown in column 610 of table 600. If coding field 605 is set to "01", then all bits in the upper half of each data block of the cache line are equal to "0". If coding field 605 is set to "10", then all bits in the upper half of each data block of the cache line are equal to "1". If coding field 605 is set to "11", then all bits in every other data block are equal to "0". It should be noted that the patterns represented by these codes can be rearranged in other embodiments. It should also be noted that patterns other than the patterns shown in table 600 can be used. When any of these patterns is detected in a cache line of data generated by a processor, the portion of the cache line that matches the given pattern is discarded from the data sent over the link. In order for the receiver to know which data has been discarded, the corresponding coding field 605 is sent over the link. In one embodiment, the corresponding coding field 605 is sent in a command packet, where the coding fields are sent in an order corresponding to the order of cache lines in the data packets sent over the link.
[0043] In one embodiment, the three patterns represented by the encodings in table 600 are expected to be patterns that occur frequently in processor-generated data sent over a communication link. Therefore, using the encoding scheme shown in table 600 can result in efficient use of the communication link. In other embodiments, when other patterns occur more frequently than the patterns shown in table 600, the compression scheme can be dynamically adjusted so that when processor-generated data is sent over a communication link, these other patterns can be compressed.
[0044] Figure 6 Table 620 shown on the right represents another encoding scheme used in another embodiment. In this embodiment, the encoding field 625 includes a single bit, which indicates that a pattern is detected if the bit = "1", or that a pattern is not detected if the bit = "0". The actual pattern used to compress the data stream may vary from one embodiment to another. In one embodiment, the pattern is predetermined based on the pattern that is expected to occur most frequently in the data generated by the processor.
[0045] In another embodiment, the data generated by the real-time inspection processor is dynamically determined to be a pattern. In this embodiment, the pattern used for the compressed data stream can change over time. For example, the first pattern is used for compressed data stream in the first time period. Then, the performance monitor determines that the second pattern occurs more frequently than the first pattern in the data stream. Then, the system switches to and uses the second pattern to compress the data stream in the second time period. In order to switch to and use the second pattern, the link interface unit at the first node sends a message to the link interface unit at the second node to notify the second node that the compression scheme is switching to the second pattern for compressed data. Then, the second node updates its control logic so that the data received on the link can be correctly rebuilt.
[0046] Reference now Figure 7 , an embodiment of a table 700 with pattern detection schemes implemented for different types of applications is shown. In one embodiment, the system uses different pattern detection schemes for different types of software applications executed by the system processor. For different application types listed in column 705, different detection schemes are shown in column 710 of table 700. It should be noted that the examples of these application types and their corresponding pattern detection schemes indicate one embodiment. In other embodiments, other pattern detection schemes can be utilized and assigned to different application types. In addition, other application types can also be characterized and assigned corresponding pattern detection schemes.
[0047] In one embodiment, determination is based on analysis of the workload associated with a particular application. For example, a typical workload for a given software application can be analyzed to determine the most likely pattern to be stored in the data generated by the processor, which is transmitted through one or more communication links. The analysis also determines which pattern detection scheme will achieve effective utilization of the communication link. Various pattern detection schemes can be used, which vary based on the number of patterns searched, whether the pattern is predetermined or dynamically determined, and / or if the pattern is predetermined, which patterns are used, etc.
[0048] For example, in one embodiment, the system determines that a network server application will benefit from a dynamic pattern detection scheme. A dynamic pattern detection scheme refers to dynamically determining which pattern(s) to search for within a data stream transmitted over a communication link based on the most frequently occurring patterns within the data stream. The patterns searched for may change over time as dynamic analysis of the data stream detects different frequently occurring patterns in different time periods. In one embodiment, the system also determines that a database application will utilize a fixed pattern detection scheme to search for 4 patterns, the system determines that a virtualization application will utilize a fixed pattern detection scheme to search for 3 patterns, and the system determines that a multimedia application will utilize a fixed pattern detection scheme to search for 1 pattern in blocks of a data stream. A fixed pattern detection scheme refers to a scheme that uses a predetermined pattern when searching for a match within a data stream. For example, according to one embodiment, Figure 5 Table 500 shows four different predetermined patterns that can be searched for in data blocks of a data stream transmitted through one or more communication links. These examples of specific pattern detection schemes for specific applications are only used to illustrate the ability to make pattern detection schemes dedicated to specific applications. In other embodiments, the listed applications can utilize other types of pattern detection schemes in addition to the pattern detection schemes shown in table 700.
[0049] Reference now Figure 8 , shows an embodiment of a method 800 for compressing processor-generated data. For discussion purposes, the steps and Figure 9-12 The steps in the method 800 are shown in order. However, it should be noted that in various embodiments of the described method, one or more of the described elements are performed simultaneously, performed in a different order than shown, or omitted entirely. Other additional elements are also performed as needed. Any of the various systems or devices described herein is configured to implement the method 800.
[0050] The link interface unit receives a data stream generated by the processor for transmission over a communication link (block 805). In one embodiment, the data stream includes one or more cache lines of data from a processor cache or a cache coupled to the processor. Next, the link interface unit determines whether a first-sized data block within the data stream matches one or more first data patterns (block 810). In one embodiment, the boundaries of the first-sized data blocks coincide with the boundaries of data words in the cache lines of the processor-generated data.
[0051] In addition, the link interface unit determines whether the data block of the second size in the data stream matches one or more second data patterns (box 815). In one embodiment, the first size of the data block equals twice the second size of the data block. For example, in one embodiment, the first size is 64 bits, and the second size is 32 bits. In this embodiment, the block of the second size is the upper half of the block of the first size. In other embodiments, other first sizes and second sizes have been implemented.
[0052] The first data pattern and the second data pattern comprise data patterns that frequently occur in the data stream. The data stream may also be referred to as a group of data. In one embodiment, the data stream is a cache line. In one embodiment, the first data pattern and the second data pattern are predetermined. In another embodiment, based on the analysis of one or more data streams, the first data pattern and the second data pattern are dynamically determined. In yet another embodiment, based on the type of software application executed by the system and / or one or more other factors, the first data pattern and the second data pattern are dynamically determined.
[0053] Next, the link interface unit transmits only the data blocks that do not match either the first data pattern or the second data pattern over the communication link (block 820). The link interface unit then transmits a code over the communication link to indicate which blocks were not transmitted and which patterns the untransmitted blocks matched (block 825). After block 825, method 800 ends.
[0054] Reference now Fig. 9 , another embodiment of the method 900 for compressing the data generated by the processor is shown. The system determines whether any one of one or more frequently occurring data patterns is detected in a given data word in a data stream selected for transmission through a communication link (block 905). In one embodiment, the data stream is generated by one or more processors of the system. In one embodiment, a given data word and / or a subset of a given data word are compared with one or more frequently occurring data patterns to determine whether a given data word and / or a subset matches any one of one or more frequently occurring data patterns. Next, in response to determining that a given data word matches a data pattern from one or more frequently occurring data patterns, the system compresses the given data word (block 910). According to the embodiment, any of a variety of compression schemes can be used to compress a given data word. After block 910, method 900 ends.
[0055] Reference now Fig.10, an embodiment of a method 1000 for dynamically implementing a data pattern check of a data block of a data stream is shown. If the data block matches a first data pattern, then the system compresses the data block within the data stream (block 1005). The system monitors the data stream to dynamically determine the data pattern that occurs most frequently within the data stream over a first time period (block 1010). After the first time period, if the data block matches the second data pattern in response to determining that a second data pattern frequently occurs within the data stream over the first time period, then the system compresses the data block within the data stream, wherein the second data pattern is different from the first data pattern (block 1015). After block 1015, method 1000 ends. In one embodiment, if the second data pattern is detected to exceed a threshold number of times over the first time period, then the second data pattern is determined to occur frequently within the data stream. The threshold and duration of the first time period may vary from embodiment to embodiment and may be programmable in various embodiments.
[0056] Reference now Fig.11 , shows one embodiment of a method 1100 for compressing processor-generated data. A link interface unit receives a cache line of data for transmission over a communication link (block 1105). Next, the link interface unit determines whether every other data block of a first size within the cache line matches any one of the one or more patterns (block 1110). If every other data block of a first size within the cache line matches any one of the one or more patterns (conditional block 1115, "yes" branch), then the link interface unit sends only alternating data blocks of the first size of the cache line over the communication link (block 1120). For example, if the cache line includes eight blocks, and the first, third, fifth, and seventh blocks match any one of the one or more patterns (e.g., all bits are equal to "0"), then only the second, fourth, sixth, and eighth blocks of the cache line are sent over the communication link. Therefore, in block 1120, only half of the cache line is sent, and every other data block of the cache line is discarded instead of being sent over the communication link. It should be understood that the discarded blocks are every other blocks that match on one of the data patterns.
[0057] If every other data block of the first size within the cache line does not match any of the one or more patterns (conditional block 1115, "no" branch), the link interface unit determines whether every other data block of the second size within the cache line matches any of the one or more patterns (block 1125). In one embodiment, the second size is equal to half of the first size. If every other data block of the second size within the cache line matches any of the one or more patterns (conditional block 1130, "yes" branch), the link interface unit sends only alternating data blocks of the second size of the cache line over the communication link (block 1135). If every other data block of the second size within the cache line does not match any of the one or more patterns (conditional block 1130, "no" branch), the link interface unit sends the entire cache line over the communication link (block 1140). After blocks 1120, 1135, and 1140, method 1100 ends.
[0058] Reference now Fig.12, another embodiment of a method 1200 for compressing processor-generated data is shown. A link interface unit receives a set of data for transmission on a communication link (block 1205). In one embodiment, the set of data corresponds to a cache line of data from an internal cache of a processor or a cache coupled to a processor. The link interface unit divides the set of data into data blocks of a first size (block 1210). In one embodiment, the first size is 64 bits. Next, the link interface unit determines whether a subset of each data block matches any one of the one or more patterns (block 1215). In one embodiment, the subset is the upper half of the data block. In other embodiments, the subset is the other portion of the data block. If the subset of each data block matches any one of the one or more patterns (conditional block 1220, "yes" branch), the link interface unit sends the other portion of each data block over the communication link without sending the subset of each data block (block 1225). For example, if the subset is the upper half of the data block, the link interface unit only sends the lower half of each data block over the link. In addition, the link interface unit sends an indication of the pattern that matches the subset of each data block through the communication link (box 1230). If the subset of each data block does not match any of the one or more patterns (conditional box 1220, "no" branch), then the link interface unit sends all of each data block through the communication link (box 1235). In addition, the link interface unit sends an indication that the subset of each data block does not match any of the one or more patterns through the communication link (box 1240). Alternatively, if the subset of each data block does not match any of the one or more patterns, then the link interface unit can divide the group of data into data blocks of a second size and perform boxes 1215-1220 again to see if the subset of each data block of the second size matches any of the one or more patterns. After boxes 1230 and 1240, method 1200 ends.
[0059] In various embodiments, the program instructions of the software application are used to implement the previously described methods and / or mechanisms. The program instructions describe the behavior of the hardware in a high-level programming language (such as C). Alternatively, a hardware design language (HDL) such as Verilog is used. The program instructions are stored on a non-transitory computer-readable storage medium. There are many types of storage media available. The storage medium can be accessed by a computing system during use to provide the computing system with program instructions and accompanying data for program execution. The computing system includes at least one or more memories and one or more processors configured to execute the program instructions.
[0060] It should be emphasized that the above embodiments are only non-limiting examples of implementations. After fully understanding the above disclosure, many changes and modifications will become obvious to those skilled in the art. The following claims are intended to be interpreted to cover all such changes and modifications.
Claims
1. A system for compressing a data stream, comprising: Processor (160); Link interface unit; and Communication link (115,205); The link interface unit is configured to: Monitoring the received data stream (1010); Dividing the data stream into data blocks of a first size (1210); Examining the data stream in real time to dynamically determine whether the data block in the data stream includes a first data pattern that occurs more than a threshold number of times within a first time period (905, 1010); In response to determining that a second block of the data blocks in the data stream matches the first data pattern, transmitting the first block of the data blocks in the data stream over the communication link without transmitting the second block of the data blocks in the data stream (910); sending an indication of which of said data blocks have not been sent; and An encoding of the first data pattern is sent (1230).
2. The system according to claim 1 further includes a performance monitor (210) configured to determine that a second data pattern occurs more frequently in the data stream than the first data pattern, and to switch to using the second data pattern to compress the data stream over a second time period.
3. The system according to claim 1, wherein the link interface unit is configured to: A determination is made as to whether every other one of the data blocks matches one or more dynamically determined data patterns (1110).
4. The system of claim 3, wherein the link interface unit is further configured to: in response to determining that every other block in the data blocks matches the one or more dynamically determined data patterns, discard every other block in the data blocks.
5. The system according to claim 1, wherein the link interface unit is further configured to: When compressing data in response to detecting that the system is executing a first type of software application, implementing a first mode detection scheme; and When data is compressed in response to detecting that the system is executing a second type of software application, a second mode detection scheme is implemented, wherein the second mode detection scheme is different from the first mode detection scheme.
6. A method for compressing a data stream, comprising: receiving a data stream for transmission over a communication link; Dividing the data stream into data blocks of a first size (1210); Examining the data stream in real time to dynamically determine whether the data block in the data stream includes a first data pattern that occurs more than a threshold number of times within a first time period (905, 1010); in response to determining that a second block of the data blocks in the data stream matches the first data pattern, transmitting the first block of the data blocks in the data stream over the communication link without transmitting the second block of the data blocks in the data stream; sending an indication of which of said data blocks have not been sent; and An encoding of the first data pattern is sent (1230).
7. The method of claim 6, further comprising determining, via a performance monitor, that a second data pattern occurs more frequently in the data stream than the first data pattern, and switching to compressing the data stream over a second time period using the second data pattern.
8. The method according to claim 6, further comprising: A determination is made as to whether every other one of the data blocks matches the one or more dynamically determined data patterns (1110).
9. The method according to claim 8, further comprising: In response to determining that the every other one of the data blocks matches the one or more dynamically determined data patterns, the every other one of the data blocks is discarded.
10. The method according to claim 6, further comprising: implementing a first mode detection scheme when compressing data in response to detecting that software of the first type is being executed; and When data is compressed in response to detecting that a second type of software is being executed, a second mode detection scheme is implemented, wherein the second mode detection scheme is different from the first mode detection scheme.
11. A link interface unit for compressing a data stream, comprising: one or more buffers; and Control logic; The control logic is configured as follows: receiving a data stream for transmission over a communication link; Dividing data blocks in the data stream into blocks of a first size (1210); Checking the data stream in real time to dynamically determine whether a data block in the data stream includes a first data pattern that occurs more than a threshold number of times within a first time period (905, 1010); In response to determining that a second block of the data blocks in the data stream matches the first data pattern, transmitting the first block of the data blocks in the data stream over the communication link without transmitting the second block of the data blocks in the data stream (910); sending an indication of which of said data blocks have not been sent; and An encoding of the first data pattern is sent (1230).
12. The link interface unit according to claim 11, wherein the link interface unit is further configured to: implementing a first mode detection scheme when compressing data associated with the first type of software application in response to detecting that the first type of software application is executing; and When compressing data associated with a software application of a second type responsive to detecting that the software application is executing, a second mode detection scheme is implemented, wherein the second mode detection scheme is different from the first mode detection scheme.
13. The link interface unit according to claim 11, wherein the link interface unit is configured to: A determination is made as to whether every other one of the data blocks matches the one or more dynamically determined data patterns.
Citation Information
Patent Citations
Messaging to provide data link integrity
CN102763423A
Data compression apparatus and method and memory system comprising data compression apparatus
CN103729307A
Storage apparatus and data processing method for the same
US20110238914A1
System, method and computer program product for data transfer management
US20110289270A1
