|
|
|
|
|
by TheLoneWolfling
4276 days ago
|
|
On a related note: I wish that more CPUs had an explicit cache. So data has to be explicitly loaded into cache, etc. Modern CPUs are NUMA. Don't treat memory as RAM any more, because that's not true. Biggest problem with this is that not all CPUs have the same amount of cache. But you can get around this by treating the cache as the low area of RAM, with instructions to get the amount of cache available. Especially if cache is also paged. Other issue with this is context switches, but this is conceptually no different than paging RAM to disk when required. |
|
I haven't seen many people actually use these ops, because it's actually pretty hard to do better than the built-in cache allocation policies for most applications, especially if you take into account that your app is going to get swapped out consistently by the operating system task switches.