Feature to populate L1 Cache if not full
Posted: Sun Oct 04, 2020 10:58 am
It would be nice if there is an option so that if there is available space in L1 that it gets filled with the most eligible data from L2 that is not in L1.
When I say most eligible, I mean the data that would be last to be evicted from L2 if it was full. So it is the most recently used data from L2 that is in L2 but not in L1.
This is, in a way, like Superfetch in that it tries to fill all available L1 Cache (the fastest cache) with data that is not in it but likely to be used.
Since it is taking the data from SSD and not hard drive, it should not affect performance at all. You could do it either at the time of L2 gather interval or when idle or at some other appropriate schedule. Maybe at idle would be best.
This way the program gives the user an option for it to proactively to keep L1 populated for fastest performance always.
An alternate implementation or even an entirely new feature on top of that would be in the case where you did a big file copy which evicted all or most content from L1. After L2 gather for that big file that was read, you could then compare L2 to L1 contents and based upon your eviction algorithm, if certain L2 contents have a higher rank than the current L1 content, to then refill L1 with the better ranking data that is on L2. This way if one big file copy evicted all of the L1, that data would go back onto L1.
With these two options, the objective is to have L1, the fastest cache, always having the best ranking data on it and be used to its fullest potential capacity. This will further enhance performance for the user. They are both like a persistent prefetching.
When I say most eligible, I mean the data that would be last to be evicted from L2 if it was full. So it is the most recently used data from L2 that is in L2 but not in L1.
This is, in a way, like Superfetch in that it tries to fill all available L1 Cache (the fastest cache) with data that is not in it but likely to be used.
Since it is taking the data from SSD and not hard drive, it should not affect performance at all. You could do it either at the time of L2 gather interval or when idle or at some other appropriate schedule. Maybe at idle would be best.
This way the program gives the user an option for it to proactively to keep L1 populated for fastest performance always.
An alternate implementation or even an entirely new feature on top of that would be in the case where you did a big file copy which evicted all or most content from L1. After L2 gather for that big file that was read, you could then compare L2 to L1 contents and based upon your eviction algorithm, if certain L2 contents have a higher rank than the current L1 content, to then refill L1 with the better ranking data that is on L2. This way if one big file copy evicted all of the L1, that data would go back onto L1.
With these two options, the objective is to have L1, the fastest cache, always having the best ranking data on it and be used to its fullest potential capacity. This will further enhance performance for the user. They are both like a persistent prefetching.