User: Password:
|
|
Subscribe / Log in / New account

Huge pages part 5: A deeper look at TLBs and costs

Huge pages part 5: A deeper look at TLBs and costs

Posted Mar 25, 2010 2:44 UTC (Thu) by ken (subscriber, #625)
Parent article: Huge pages part 5: A deeper look at TLBs and costs

guess the cpu

Running calibrator with size 13631488: 7 cycles 4.68 ns
Running calibrator with size 17563648: 7 cycles 4.65 ns matched 1 times
Running calibrator with size 21495808: 7 cycles 4.65 ns matched 2 times
Running calibrator with size 25427968: 7 cycles 4.68 ns matched 3 times

TLB_MISS_LATENCY_TIME=4.68
TLB_MISS_LATENCY_CYCLES=7
TLB_MISSES_COST_ONE_SECOND=228571428

-----------

I'm amazed it only takes 7 cycles. How is TLB really handle on x86 ??? I'm only familiar with PowerPC and there there is an actual exception and software that reloads the TLB and that can't be even close to 7 cycles at least not on the models I have worked with.


(Log in to post comments)

Huge pages part 5: A deeper look at TLBs and costs

Posted Mar 26, 2010 1:38 UTC (Fri) by sync (guest, #39669) [Link]

Atom?
Mine gives 7 cycle too

My old Athlon XP 2000MHz has 5 cycles!

Running calibrator with size 13631488: 5 cycles 2.57 ns
Running calibrator with size 17563648: 5 cycles 2.59 ns matched 1 times
Running calibrator with size 21495808: 5 cycles 2.58 ns matched 2 times
Running calibrator with size 25427968: 5 cycles 2.57 ns matched 3 times

TLB_MISS_LATENCY_TIME=2.57
TLB_MISS_LATENCY_CYCLES=5
TLB_MISSES_COST_ONE_SECOND=400000000

And many thanks to Mel for this wonderful series.

Huge pages part 5: A deeper look at TLBs and costs

Posted Mar 31, 2010 17:31 UTC (Wed) by jzbiciak (subscriber, #5246) [Link]

On Athlons, at least, there's a hardware table walk and a two-level TLB structure. It wouldn't surprise me to find out that the 5 cycle number you report is the average cost of missing the L1 TLB (frequent, fast) and L2 TLB (less frequent, but slower).


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds