Sub cache line position management
In some implementations, a computer system obtains sub cache line (SCL) access pattern information associated with a set of SCLs of a cache line. The system determines a predicted SCL access pattern based on the SCL access pattern information. The system establishes a physical position mapping of the set of SCLs within the cache line based on the predicted SCL access pattern, and performs a cache transaction in accordance with the physical position mapping. The system optimizes cache performance by dynamically reordering SCL positions based on observed access patterns.
1 . A computer system comprising:
a processor set;
one or more computer-readable storage media; and
program instructions stored on the one or more computer-readable storage media to cause the processor set to perform operations comprising:
obtaining sub cache line (SCL) access pattern information associated with a set of SCLs of a cache line;
determining a predicted SCL access pattern based on the SCL access pattern information;
establishing, based on the predicted SCL access pattern, a physical position mapping of the set of SCLs within the cache line; and
performing a cache transaction in accordance with the physical position mapping.
2 . The computer system of claim 1 , the operations further comprising storing the SCL access pattern information in an SCL table.
3 . The computer system of claim 1 , the operations further comprising storing the SCL access pattern information in a cache directory.
4 . The computer system of claim 1 , the operations further comprising storing the SCL access pattern information in a hardware data structure associated with a shared cache.
5 . The computer system of claim 1 , the operations further comprising storing the SCL access pattern information in a hardware data structure provided by a processor core.
6 . The computer system of claim 1 , the operations further comprising storing the SCL access pattern information in software via a processor core.
7 . The computer system of claim 1 , wherein obtaining the SCL access pattern information comprises:
obtaining a first set of SCL access pattern information associated with a first set of cache lines; and
obtaining a second set of SCL access pattern information associated with a second set of cache lines.
8 . The computer system of claim 1 , wherein determining the predicted SCL access pattern comprises:
determining the predicted SCL access pattern based on at least one of a frequency of SCL access, a prior access source, a current SCL target, prior persistence activity, or a cache management hint.
9 . The computer system of claim 8 , wherein the cache management hint comprises a software directed hint.
10 . The computer system of claim 8 , wherein the cache management hint comprises a firmware directed hint.
11 . The computer system of claim 1 , wherein establishing the physical position mapping of the set of SCLs within the cache line comprises:
reordering a physical position of the set of SCLs within the cache line based on the predicted SCL access pattern.
12 . The computer system of claim 1 , wherein performing the cache transaction comprises:
performing, based on an availability status of fastpath bussing, a data return in accordance with a data return order, wherein the data return order is based on a physical proximity order.
13 . The computer system of claim 1 , wherein performing the cache transaction comprises:
performing, based on an availability status of fastpath bussing, a data return in accordance with a data return order, wherein the data return order is based on a requested order of SCLs.
14 . A method comprising:
obtaining sub cache line (SCL) access pattern information associated with a set of SCLs of a cache line;
reordering, based on the SCL access pattern information, a physical position of at least two SCLs of the set of SCLs within the cache line; and
performing a cache transaction in accordance with a physical position mapping.
15 . The method of claim 14 , further comprising:
determining a predicted SCL access pattern based on the SCL access pattern information, wherein reordering the physical position of the at least two SCLs comprises reordering the physical position of the at least two SCLs based on the predicted SCL access pattern.
16 . The method of claim 15 , wherein determining the predicted SCL access pattern comprises:
determining the predicted SCL access pattern based on at least one of a frequency of SCL access, a prior access source, a current SCL target, prior persistence activity, or a cache management hint.
17 . A computer program product comprising:
one or more computer-readable storage media; and
program instructions stored on the one or more computer-readable storage media to perform operations comprising:
obtaining sub cache line (SCL) access pattern information associated with a set of SCLs of a cache line;
reordering, based on the SCL access pattern information, a physical position of at least two SCLs of the set of SCLs within the cache line; and
performing a cache transaction in accordance with the physical position mapping.
18 . The computer program product of claim 17 , further comprising:
persisting the SCL access pattern information in a main memory.
19 . The computer program product of claim 17 , wherein reordering the physical position of the at least two SCLs comprises:
determining a predicted SCL access pattern based on the SCL access pattern information; and
establishing, based on the predicted SCL access pattern, a physical position mapping of the at least two SCLs within the cache line.
20 . The computer program product of claim 19 , wherein the determining the predicted SCL access pattern comprises:
determining the predicted SCL access pattern based on at least one of a software directed cache management hint or a firmware directed cache management hint.