Possibility of L0 cache with faster lookup by trading off some cache-hits, infront of L1.

Suggestions around PrimoCache
Post Reply
gpuuser
Level 1
Level 1
Posts: 2
Joined: Sun Dec 03, 2023 5:16 pm

Possibility of L0 cache with faster lookup by trading off some cache-hits, infront of L1.

Post by gpuuser »

I don't know about exact algorithms behind the L1 cache. But if they don't use direct-mapped or mmap as client of LRU/LFU, maybe it increases performance by serving some of cache-hits directly from OS paging system (by mmap) or simpler indexing/search (simply a direct-mapped cache)?

I guess it could add more complexity for the coherence. But if LRU-LFU part (of L1) is already serving multiple-threads, then I guess its some kind of sharding? If yes, then direct-mapped cache can be sharded too?

Also for read-only caches (useful for gaming, with a lot of textures that are not changed forever), direct-mapped cache would not require any coherence against writes. If size of direct-mapped cache is power of two, then computing the victim tag is as simple as number&(size-1) with zero victim-search latency.

IMHO, this could yield about 10-50% of RAM bandwidth, from a single thread, where a game loading-screen could benefit a lot from. Even if cache misses, it would be backed fast by L1.

---

If direct-mapped cache works, it could benefit like this:

- less metadata per tag --> less RAM overhead per cache size --> smaller cluster size emulation possible?

- less CPU usage due to simple calculation --> good for open-world games that require every cycle of CPU?

- 1 billion lookups per second instead of 50 million per second of LRU, per thread (maybe only benefits those workstations with 8 memory channels?)
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Possibility of L0 cache with faster lookup by trading off some cache-hits, infront of L1.

Post by Support »

Thank you for your suggestion. Windows does not allow "direct-mapped" cache. The only thing we can do is working with Windows' built-in file cache, which should make caching more efficient.
Post Reply