logoalt Hacker News

fulafeltoday at 3:02 PM1 replyview on HN

Fascinating. So what is the DCT swizzling functionality designed for in the hardware originally?


Replies

Retr0idtoday at 3:23 PM

Without any swizzling, certain common access patterns can end up with subpar performance, for example walking the columns of a 2d array with a certain stride - if it ends up directing every access to the same bank on the same channel, the throughput is much lower than if the load was evenly distributed across multiple banks/channels.

Swizzling "randomizes" bank/rank/channel distribution, which makes unlucky access patterns less likely. (Something I'd like to research is microbenchmarking different access patterns to infer the swizzle pattern and defeat physical ASLR)