dendibakh / perf-book

The book "Performance Analysis and Tuning on Modern CPU"
https://book.easyperf.net/perf_book
Creative Commons Zero v1.0 Universal
2.12k stars 156 forks source link

Fix confusing/incorrect cache lookup wording in the TLB section. #48

Closed cf-natali closed 5 months ago

cf-natali commented 5 months ago

The current wording seems to imply that caches are virtually indexed and virtually tagged and do not require physical address, hence TLB lookup's result.

However they are most commonly PIPT, and in any case always require the physical address for the tag to avoid aliasing issues. The L1 set can typically be selected from the virtual address only so the TLB lookup is indeed - only partially - overlapped, but L2 and L3 need the physical address prior to the lookup.

dendibakh commented 5 months ago

Thank you, this is an important fix.

dendibakh commented 5 months ago

Just a small cosmetic fix, hope you don't mind. Regarding footnotes... I try not to use too many footnotes, otherwise, it becomes to heavy to read, I guess. People constantly jump back and forth, loosing their thoughts, etc. So, I use footnotes carefully. :)

cf-natali commented 5 months ago

Yep that's fine! To be honest I'm not sure footnotes are the best way to deal with sources, so it makes sense.

Maybe an alternative approach would be to have a "references" section at the end of each chapter or something like that.