News for hackers. Stuff that matters.
Re:The Future of Memory by lmz on Sunday January 21, 2024 @08:28AM (#39078248)
The 7800X3D already has 96MB of L3. Surely that's enough for a lot of programs.
Re:The Future of Memory by spintin on Sunday January 21, 2024 @08:37AM (#39078317)
Yes, but the cost in terms of watt and manufacturing are not scalable.

Also most programs have cache-misses.

Re:The Future of Memory by _a_a_a_ on Sunday January 21, 2024 @09:16AM (#39078600)
Why not have a 'pin-to-cache' functionality then.
Re:The Future of Memory by smolder on Sunday January 21, 2024 @09:29AM (#39078717)
What would it do when you pin more things than your cache can hold? Trigger an interrupt? It basically becomes another memory layer you'd need to manage.
Re:The Future of Memory by _a_a_a_ on Sunday January 21, 2024 @09:53AM (#39078945)
Well duh. How is using SRAM going to be any different when you run out of that?
Re:The Future of Memory by smolder on Sunday January 21, 2024 @10:25AM (#39079248)
I was not here arguing in favor of explicitly tiered memory. The implied answer to your original question, "why not have a pin to cache functionality?" is that it's effectively the same as having another OS managed memory layer, which is bad since it complicates the architecture. I'll take some cache misses over having to manage it explicitly.
Re:The Future of Memory by AnthonyMouse on Sunday January 21, 2024 @02:15PM (#39081838)
Not only that, if you had enough cache to fit everything then there wouldn't be cache misses, and if you didn't, cache misses are pretty unavoidable.

It's like the existing APIs for pining things in memory so they can't get paged out. They have very specific uses and normal programs generally don't use them and shouldn't.

Re:The Future of Memory by kimixa on Sunday January 21, 2024 @03:52PM (#39082919)
Much of the cache "management" can be done with specialist load/store instructions that skip the cache rather than being OS managed like a mapping.
Re:The Future of Memory by Const-me on Sunday January 21, 2024 @10:15PM (#39085758)
The higher levels of the stack, be it hardware or software, need to make sure that never happens.

That’s how GPUs are doing that. Each thread group can use a limited amount of SRAM, programs declare in advance how many bytes they need. Then in runtime the scheduler who dispatches tasks to cores enforces that limit by never dispatching too many thread groups on each core.

Re:The Future of Memory by foobiekr on Sunday January 21, 2024 @05:23PM (#39083702)
They certainly have this. A lot of embedded boot loaders run entirely from cache until they can bring main memory up and check it.