A method for dynamically selecting a size of a memory access may be provided. The method comprises accessing blocks having a variable number of consecutive cache lines, maintaining a vector with entries of past utilizations for each block size, and adapting said block size before a next access to the blocks.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method for dynamically selecting a size of a memory access at runtime, said method comprising: accessing a plurality of blocks, each block having a variable block size defined by a number of consecutive cache lines in each block; maintaining a vector with entries indicating a number of past block size utilizations for each block size; and adapting a next block size of a next block before a next access to said next block based on the number of past block size utilizations for each block size.
2. The method according to claim 1 , wherein said adapting said next block size is performed by: in response to determining, based on the vector, that a past block size being below a low threshold value has been utilized in a most recent access, decreasing said next block size to a first adapted block size, and in response to determining, based on the vector, that a past block size being greater than a high threshold value has been utilized in the most recent access, increasing said next block size to a second adapted block size.
3. The method according to claim 1 , wherein said adapting said next block size is performed by applying an algorithm to said vector of past block size utilizations for predicting an adapted block size.
4. The method according to claim 1 , wherein said adapting said next block size is performed after an actual memory access by one of a load instruction or a store instruction.
5. The method according to claim 1 , wherein said adapting said next block size is performed during an actual memory access by one of a load instruction or a store instruction.
6. The method according to claim 1 , also comprising using different load instructions for different loaded block sizes.
7. The method according to claim 6 , wherein said different load instructions differ in said size of said loaded block sizes by predefined factors compared to a basic load instruction.
8. The method according to claim 1 , also comprising using different store instructions for different stored block sizes.
9. The method according to claim 8 , wherein said different store instructions differ in said size of said stored block sizes by predefined factors compared to a basic store instruction.
10. The method according to claim 1 , also comprising determining most recent past block size utilization values of said entries of past block size utilizations.
11. The method according to claim 1 , also comprising determining an average block size based on said entries indicating the number of past block size utilizations for each block size in constant time intervals.
12. The method according to claim 3 , wherein said applying said algorithm to said vectors of past block size utilizations comprises applying said algorithm based on one of time-series-based forecasting, linear regression and a neural network.
13. A system for dynamically selecting a size of a memory access at runtime, said system comprising: a memory configured to store instructions; and a processor coupled to the memory and configured to execute the instructions to: access a plurality of blocks, each block having a variable block size defined by a number of consecutive cache lines in each block; maintain a vector with entries indicating a number of past block size utilizations for each block size; and adapt a next block size of a next block before a next access to said next block based on the number of past block size utilizations for each block size.
14. The system according to claim 13 , wherein the processor is also configured for adapting said next block size by: in response to determining, based on the vector, that a past block size being below a low threshold value has been utilized in a most recent access, decreasing said next block size to a first adapted block size, and in response to determining, based on the vector, that a past block size being greater than a high threshold value has been utilized in the most recent access, increasing said next block size to a second adapted block size.
15. The system according to claim 13 , wherein the processor is also configured for adapting said next block size by applying an algorithm to said vector of past block size utilizations for predicting an adapted block size.
16. The system according to claim 13 , wherein said processor is also adapted for using different load instructions for different loaded block sizes, and wherein said processor is also adapted for using different store instructions for different stored block sizes.
17. The system according to claim 16 , wherein said different load instructions differ in said size of said loaded block sizes by predefined factors compared to a basic load instruction.
18. The system according to claim 13 , wherein the processor is further configured to execute the instructions to determine most recent block size utilization values of said entries of past block size utilizations.
19. The system according to claim 13 , wherein the processor is further configured to determine an average block size based on said entries indicating the number of past block size utilizations for each block size in constant time intervals.
20. A computer program product for dynamically selecting a size of a memory access at runtime, 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: access a plurality of blocks, each block having a variable block size defined by a number of consecutive cache lines in each block; maintain a vector with entries indicating a number of past block size utilizations for each block size; and adapt a next block size of a next block before a next access to said next block based on the number of past block size utilizations for each block size.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
October 11, 2017
August 25, 2020
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.