« first day (4853 days earlier)      last day (101 days later) » 

12:09 AM
@JerryCoffin I was referring to the internal caches the chip uses. But yeah. A TLB miss is worse than a cache miss
@LandonZeKepitelOfGreytBritn wat, cache replacement is anything but random... it's explicitly NOT random
 
12:48 AM
@LandonZeKepitelOfGreytBritn true randomness can exist
@LandonZeKepitelOfGreytBritn one mechanism is memory read latency, which is only deterministic if you know the device state down the clock cycle and assume no input. In practice this information is not knowable and effectivley random on each reboot, and used to seed random generators in the kernel, etc.
Additionally you have data dependent computation, etc so effectively the device state is non-deterministic
this is also why static power analysis is so tricky
 
 
2 hours later…
2:31 AM
@Mikhail ...or at least one of the many reasons static power analysis is so tricky.
 
 
4 hours later…
6:17 AM
I looked for mower on a website, it gave me a few mowers followed by 2 sheep ad. Then I searched for a ride on mower, it showed me some ride on mowers, followed by a horse. How considerate!
 
 
2 hours later…
8:16 AM
@Mgetz i strongly disagree. Deciding in which set the data gets put is indeed not random. But then which line in the actual set gets replaced is random
 
Any spring boot developer here?
 
@Mgetz additionally to imo make matters worse. Assume you have an 8 way set associative cache it could very well be that the next 100accesses to that particular set will replace the same line every single time. While another time it will replace a different line every time. In other words the statistical distribution of that “randomness” is absolutely not deterministic
 
 
5 hours later…
1:29 PM
In computing, cache replacement policies (also known as cache replacement algorithms or cache algorithms) are optimizing instructions or algorithms which a computer program or hardware-maintained structure can utilize to manage a cache of information. Caching improves performance by keeping recent or often-used data items in memory locations which are faster, or computationally cheaper to access, than normal memory stores. When the cache is full, the algorithm must choose which items to discard to make room for new data. == Overview == The average memory reference time is...
 
1:50 PM
@Mgetz not sure why you’re linking this. Your link litterally states random replacement policy is a thing:
> Random replacement selects an item and discards it to make space when necessary. This algorithm does not require keeping any access history. It has been used in ARM processors due to its simplicity,
Which confirms what I said
 
2:02 PM
@LandonZeKepitelOfGreytBritn so is BOGO sort, that doesn't mean it's used
ARM used random in very early processors but AFAIK doesn't use it now
 
2:37 PM
@LandonZeKepitelOfGreytBritn and because it is non-deterministic over time it will average out and it is harder to be gamed by malicious access patterns to gain knowledge/create a dos situation
 
3:35 PM
@Mgetz depends on what you mean by “very early” it still does use it for correx a53, a8 and probably many others. Which is not quite “very early”
 
@LandonZeKepitelOfGreytBritn source?
also does anyone actually use those designs as is?
 
@Mgetz their datasheet, which I read myself
 
Apple doesn't, I'm pretty sure Samsung and Qualcomm don't either
yes but ARM doesn't ship silicon
 
@Mgetz that s wrong samsung does
That s the one I know about on top of my head
 
yes but do they ship that core unmodified? My understanding was no
nobody does
ARM is an intellectual property company
the don't ship product
 
3:40 PM
I dont know at the end of the day chips inside samsung smartphones use random replacement (based on litterature I read). And so does the beaglebone black
just to name some on top of my head
Here @Mgetz:
Just ctrl f random
On bbb it is random, not pseudo random
 
that's from 2016 btw, also it's more complicated than that
marking something as eligible for replacement doesn't mean it will be because TLB
 
@Mgetz “more complicated”?
There is no such thing as marking eligible for replacement afaik
 
yes, the branch predictor and other loading behavior will be used by the CPU to prime the cache
Yeah I'm done here
 
@Mgetz We re speaking about cpu cache not tlb cache
 
they are linked, at least in any reasonably performant modern CPU. You don't clear cache lines on a page actively being hit hard. Otherwise you cache thrash
 
3:49 PM
Not trying to prove you wrong here. But where do you get the eligibility part from? Sources?
@Mgetz that contradicts the randomness characteristic of the replacement policy
 
So a random cache policy doesn't mean that the cache just randomly gets a new line from memory
Let's start there
 
I understand your rationale. But that s not how it works I think. Random is random.
Otherwise it s pseudo random at best
 
except it's really not, that would be devastatingly bad when running code on arrays
 
That makes sense. Yet I have not seen anything anywhere proving/stating/showing this. Which is why I believe this (trashing) does occur regardless
 
even in a so called random replacement algorithm there is still context of what is being actively worked on
it may not be extensive, it might be as simple as last access
but you don't evict the last cache line accessed
 
3:54 PM
@Mgetz that s just an lru replacement policy
 
no, it's not
LRU has a list
this is literally just keeping last
FWIW My sneaky suspicion is that even ARM's "Psudo random" isn't as random as you think. A cache line that hasn't been flushed likely won't be victimized as it will be queued for the write buffer
of course ARM will never document that for a LOT of really good reasons
 
Mkay. What you say does make sense. Wont take it for face value but will keep it in the back of my head. Interesting points you made there
 
but victimizing the currently active cache line would be devastatingly stupid. It's also super easy to not happen because it's always at the back of the write buffer list. So you get LRU sort of... without having to have the hard downsides of LRU
 
 
3 hours later…
7:02 PM
 

« first day (4853 days earlier)      last day (101 days later) »