Abstract:
A computer system with the means to identify based on the instruction being decoded that the operand data that this instruction will access by its nature will not have locality of access and should be installed in the cache in such a way that each successive line brought into the data cache that hits the same congruence class should be placed in the same set as to not disturb the locality of the data that resided in the cache prior to the execution of the instruction that accessed the data that will not have locality of access.

Description:
TRADEMARKS 
       [0001]    IBM® is a registered trademark of International Business Machines Corporation, Armonk, N.Y., U.S.A. Other names used herein may be registered trademarks, trademarks or product names of International Business Machines Corporation or other companies. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    This invention relates to a method to stop the pollution of a local data cache by data that will not have locality, and particularly to when operand data that is in common interchange formats are translated into a format that a given computer system can operate on it natively. 
         [0004]    2. Description of Background 
         [0005]    Before our invention when data that was in a common interchange format such as some of the Unicode representations that are often used in XML or Java must first be translated into other formats that the system can operate on natively and then converted back to that common interchange format for storage or to send to another application for use. These data blocks are processed by the execution unit in the microprocessor. The data is thus brought in as operand data into the local data cache. Since the size of these data blocks in the common interchange formats are often much larger than the size of entire local data cache the entire current contents of the local cache is replaced as a result of the operation using normal cache replacement schemes. It is often that in these cases of data translation the programming thread that has the task of translating the data is not the same thread that will operate on the translated data. When the system has many processors in it the thread that translates it and the thread that will use the translated results may in fact not run on the same processor in the system. As a result the entire local data cache has been written with data that no other local thread will use and thus have polluted the local cache with this common interchange format data and lost the data that was in the local cache and that did have locality. 
       SUMMARY OF THE INVENTION 
       [0006]    In existing computer systems with a microprocessor that contains one or more execution units with local cache memory when data is brought into the cache memory to be executed on it gets installed into the local cache memory. There are several possible schemes by which it can be installed, however they all in some way expect that data to be used referenced one or more times right after it is installed. There is a class of application models and data types that require that in order for the execution units to operate on or manipulate the common interchange data it must be first converted to a format that the execution elements can act on. In the programming model that acts on this data the programming thread that converts or manipulates the data is not the same thread that will act on converted data. In a system with many processors these threads may be executed on different processors. 
         [0007]    Our invention is that when certain processor architecture instructions are decoded that are used to perform such conversions are executed that the operand fetch logic can signal to the local cache memory when the request for the data stored in memory is made it can indicate that it is a special type of request. In this case the data can be installed in the local cache that has more than one set with a different use scheme such that when requests are made for many lines of data that would install in the same congruence class in the cache they will be installed over top of each other rather than filling all the congruence classes in the cache with this data. This will preserve the data that exists in those other congruence classes. One such scheme change would be to install the data without modification of the least recently used tag. In this way the least recently used line will be selected for this data and when the next line of this data is fetched that falls in the same congruence class it will also be written into this same position. In this way data that will only be referenced once in the process of conversion of the data will all only fill one congruence class in the local cache with more than one set associativity and not remove other data that will still have locality when the data conversion finishes execution. This further can be used for an instruction that executes for which the data that it references will only ever be used once. This can be done on an operand by operand basis on an instruction by instruction basis. Thus only data that will be referenced once and have no locality beyond that one single reference will not be allowed to pollute all the local cache memory. 
         [0008]    System and computer program products corresponding to the above-summarized methods are also described and claimed herein. 
         [0009]    Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention. For a better understanding of the invention with advantages and features, refer to the description and to the drawings. 
       TECHNICAL EFFECTS 
       [0010]    As a result of the summarized invention, technically we have achieved a solution which allows execution of instructions that reference data operands that exceed the size of the local cache without polluting all of the local cache with data that has no locality. 
     
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which: 
           [0012]      FIG. 1  illustrates an example of program data located in the main memory address map. 
           [0013]      FIG. 2  illustrates an example of some of the design blocks in a computer system. 
           [0014]      FIG. 3  illustrates an example of some of the design blocks in a microprocessor. 
           [0015]      FIG. 4  illustrates an example of some of the design blocks in the data cache unit. 
           [0016]      FIG. 5  illustrates an example of some of the design blocks in the instruction unit. 
       
    
    
       [0017]    The detailed description explains the preferred embodiments of the invention, together with advantages and features, by way of example with reference to the drawings. 
       DETAILED DESCRIPTION OF THE INVENTION 
       [0018]    In the current computing environment it is very common for the data to be kept in a data format that is portable between different software and different hardware platforms. It is often kept in some industry standard format. This format is not the format that the machine is designed to operate on natively. In  FIG. 1  we sec the main memory map,  100 , for a computer system. The data that arrives in the common interchange format it gets assigned a location in storage,  110 . Before any actions or alterations can be made to the data it must first be converted to the local machine data format which gets another location in storage,  120 . The application code that will act on or alter the data will first have to convert from the common interchange format to the local machine format. When that application is multithreaded and you have a computer system with multiple processors it is not know which thread will execute on which microprocessor in the system. It is often that one thread will convert from the common interchange format to local machine format. Other threads will act on or alter the data, and yet a different thread will convert the local machine format back to the common interchange format before it can be sent to any other system or application for action. It is also often that the size of these data operands in both the common interchange format and the local machine format is very large in comparison to the local cache sizes in the microprocessors. 
         [0019]    In a multiprocessor computer system,  200 , there is a main memory,  210 , where the data in both the common interchange format and the local machine format will reside. These data objects will be brought into and out of the local cache on each microprocessor,  230 ,  240 , and  250 . In our system there is a layer of shared cache,  220 . It is often the case that more than one thread or processor may wish to access this operand data, and thus a benefit if the data is held in the common cache structure. 
         [0020]    In the microprocessor,  300 , there are many components. In particular there is a data cache,  310 , an instruction unit,  320 , and execution unit(s),  330 . When the instruction unit decodes instructions it makes operand requests,  350 , to the data cache. These operand requests,  350 , have attribute information,  351 , that data the data cache,  300 , about the request type and other information about the request. It also forwards information on to the execution unit(s),  330 , on the instruction execution information link,  352 . When the operand was a fetch request data flows from the data cache,  310 , to the execution unit(s),  330 , via the data fetch bus,  353 . When the operand request was a store the execution unit(s),  330 , sends the updated data on the store data bus,  354 . 
         [0021]    Inside the data cache,  400 , there are multiple elements. In this case the data cache has a set associativity of M where M is greater than 1. In this cache there are data arrays,  410 ,  411 , and  412  where the data for each set is stored. There are directory arrays,  420 ,  421 , and  422  that indicate what data is present in the arrays. In order to determine a line replacement target for when new data is brought into the cache there MRU (most recently used)/LRU (least recently used) bits for each set,  430 ,  431 , and  432 , that are kept for each set and that are updated based on access patterns and original installation values. 
         [0022]    Inside the Instruction unit,  500 , there are several blocks. There is the instruction decode unit,  510 , which determines the characteristics of the instruction that is decoded and send those characteristics,  540 , to the instruction queue,  520 , and the operand fetch logic,  530 . The instruction queue,  520 , will forward information about the instruction to execute to the execution units(s),  330 . The operand fetch logic,  530 , will use this information to send operand requests,  350 , and request attributes,  351 , to the data cache, 310. 
         [0023]    In our invention the instruction decode unit,  510 , recognizes when the instruction that is about to execute is an instruction from an application thread that is designed to convert the common interchange format to a local machine format or local machine format to common interchange format. It informs the operand fetch logic,  530 , of this fact. When the operand fetch logic,  530 , sends the operand request,  350 , to the data cache,  310 , it will also for this operand set a bit in the attribute information,  351 , that indicates to modify the MRU/LRU information. Then inside the data cache,  400 , the bit that was sent with the operand request,  350 , in the attribute information,  351 , that said to modify the MRU/LRU information will alter how the MRU/LRU bits are set in  430 ,  431 , or  432  when either the common interchange format data or the local machine is first installed in the cache. This is done such that when these very large data operands which are larger than the size of the microprocessor data cache are brought into the data cache they will be installed over and over again into the same set and not into multiple sets. In this way that data that will be converted will installed in the same given set as each line that hits the same congruence class s installed in the data cache. This allows data that will be used when the conversion completes to remain active in the cache. 
         [0024]    The capabilities of the present invention can be implemented in software, firmware, hardware or some combination thereof. 
         [0025]    As one example, one or more aspects of the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has embodied therein, for instance, computer readable application program code for providing and facilitating the capabilities of the present invention. The application code may be an article of manufacture which can be included as a part of a computer system or sold separately. 
         [0026]    The diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified so long as the claimed result is accomplished. All of these variations are considered a part of the claimed invention. 
         [0027]    While the preferred embodiment to the invention has been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.