Control of speculative demand loads
AssigneeInternational Business Machines Corporation
InventorsSatish Kumar Sadasivam, Puneeth A. H. Bhat, Shruti Saxena, Sangram Alapati
Life of this patent
Estimating the term…
Abstract
Aspects of the present disclosure relate to control of speculative demand loads. In some embodiments, the method includes receiving instructions for a branch in a program, detecting the branch load is in the cache, monitoring a number of completed loads for the program, determining a cache pollution ratio of executed loads to completed loads, providing the cache pollution ratio to a branch prediction unit, and altering load instructions for the branch based on the cache pollution ratio.
Claims18
A method comprising:
- receiving program instructions;
- detecting a hard-to-predict (HTP) branches in the program instructions;
- determining that the program instructions contain a load command to bring a load into a system cache;
- detecting that the load is not in the system cache;
- identifying a number of executed loads for the program;
- obtaining a number of completed loads for the program;
- determining a cache pollution ratio based on a ratio between the number of completed loads and the number of executed loads;
- comparing the cache pollution ratio to a first threshold for a first cache in the system cache;
- determining that the cache pollution ratio exceeds the first threshold;
- and
- blocking the load command from loading to the first cache based on the cache pollution ratio exceeding the first threshold.
A computer program product, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to:
- receive program instructions;
- determine that the instructions contain a load command to bring a load into a system cache;
- detect that the load is not in the system cache;
- identify a number of executed loads for the program;
- obtain a number of completed loads for the program;
- determine a cache pollution ratio based on a ratio between the number of completed loads and the number of executed loads;
- comparing the cache pollution ratio to a first threshold for a first cache in the system cache;
- determining that the cache pollution ratio exceeds the first threshold;
- and
- block the load command from loading to the first cache based on the cache pollution ratio exceeding the first threshold.
A system comprising:
- a processor;
- and
- a memory in communication with the processor, the memory containing program instructions that, when executed by the processor, are configured to cause the processor to perform a method, the method comprising:
- receiving the program instructions,
- detecting a hard-to-predict (HTP) branches in the program instructions;
- determining that the program instructions contain a load command to bring a load into a system cache,
- detecting that the load is not in the system cache,
- identifying a number of executed loads for the program instructions,
- obtaining a number of completed loads for the program,
- determining a cache pollution ratio based on a ratio between the number of completed loads and the number of executed loads;
- comparing the cache pollution ratio to a first threshold for a first cache in the system cache;
- determining that the cache pollution ratio exceeds the first threshold;
- and
- blocking the load command from loading to the first cache based on the cache pollution ratio exceeding the first threshold.
Dependencies are inferred from the claim text.