The translation lookaside buffer (TLB) enables modern CPUs to quickly map virtual memory addresses to physical memory addresses and vice versa. Operations that flush the TLB cause a performance hit until it is repopulated.
Questions tagged [tlb]
289 questions
16
votes
1 answer
Advising Prolog processor to utilize huge-pages
Are there any Prolog implementations which support utilizing huge-pages (2MB/4MB per memory page) instead of the vanilla 4Kb memory pages.
Ideally, I would like to declare to the interpreter/compiler/run-time that it's okay to use X huge-pages for…

repeat
- 18,496
- 4
- 54
- 166
15
votes
3 answers
Can a TLB hit lead to page fault in memory?
In UC Berkley Video lectures on OS by John Kubiatowicz (Prof. Kuby) available on web, he mentioned that TLB hit doesn't mean that corresponding page is in main memory. Page fault can still occur.
Technically TLBs are cache for page table entry and…

Terminal
- 1,969
- 5
- 21
- 37
15
votes
1 answer
How many bits there are in a TLB ASID tag for Intel processors? And how to handle 'ASID overflow'?
According to some operating system textbooks, for faster context switches, people add ASID for each process in the TLB tag field, so we don't need to flush the entire TLB in a context switch.
I have heard that some ARM processors and MIPS processors…

SaltedFishLZ
- 157
- 1
- 9
14
votes
1 answer
how to interpret perf iTLB-loads,iTLB-load-misses
I have a test case to observe perf iTLB-loads,iTLB-load-misses by
perf stat -e dTLB-loads,dTLB-load-misses,iTLB-loads,iTLB-load-misses -p 22479
and get the output :
Performance counter stats for process id '22479':
1,262,817 dTLB-loads…

barfatchen
- 1,630
- 2
- 24
- 48
12
votes
1 answer
Measuring TLB miss handling cost in x86-64
I want to estimate the performance overhead due to TLB misses on a x86-64 (Intel Nehalem) machine running Linux. I wish to get this estimate by using some performance counters. Does anybody has some pointers on what is the best way to estimate…

Arka
- 955
- 2
- 12
- 21
12
votes
1 answer
Multiple hugepage sizes in Linux (x86-64)?
Does the Linux on x86-64 support multiple huge page sizes (e.g., both 2MB and 1GB page sizes beyond the 4KB base page size)? If yes, is there a way to specify that for a given allocation which huge page size to use? In other words, my question is if…

Arka
- 955
- 2
- 12
- 21
9
votes
2 answers
Using 1GB pages degrade performance
I have an application where I need about 850 MB of continuous memory and be accessing it in a random manner. I was suggested to allocate a huge page of 1 GB, so that it would always be in TLB. I've written a demo with sequential/random accesses to…
user13075629
9
votes
3 answers
Purpose of address-spaced identifiers(ASIDs)
I am currently studying Operating Systems by A Silberschatz, P Galvin, G Gagne.
I am studying memory management strategies, and on section where they introduce Translation Look-aside Buffer (TLB).
Some TLBs store address-space identifiers (ASIDs)…

BitsofEthan
- 101
- 1
- 5
9
votes
2 answers
Two TLB-miss per mmap/access/munmap
for (int i = 0; i < 100000; ++i) {
int *page = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
page[0] = 0;
munmap(page, PAGE_SIZE);
}
I expect to get ~100000…

Mohammad Hedayati
- 241
- 1
- 9
9
votes
2 answers
Does QEMU emulate TLB?
I have a very simple question, does QEMU emulate TLB? What happens when a guest linux system executes an "invlpg" instruction as it is for the invalidation of a TLB entry. I am aware that QEMU has softmmu link which is used for translating the guest…

Naman Patel
- 113
- 1
- 7
8
votes
1 answer
ARM11 Translation Lookaside Buffer (TLB) usage?
Is there a decent guide explaining how to use the TLB (Translation Lookaside Buffers) tables on an ARM1176JZF-S core?
Having looked over the technical documentation for the that ARM platform I still have no clue what a TLB is or what it looks like.…

Kristina
- 15,859
- 29
- 111
- 181
8
votes
2 answers
Kernel memory (virtual address entries) in TLB?
Linux is the OS and ARM is the processor referred in this context.
Does the TLB contain both kernel and user space virtual addresses?
Kernel memory starts at 0xc000_0000 and goes to 0xFFFF_FFFF
where the first 3 GB belongs to userspace. Between…

kumar
- 2,530
- 6
- 33
- 57
8
votes
1 answer
Does a hyper-threaded core share MMU and TLB?
To my knowledge, both MMU and TLB are not shared in a hyper-threaded core in Intel x86_64.
However, then, if two threads that don't share the address space are scheduled to the same physical core, how do they run?
I think, in that case, the threads…

Jonggyu Park
- 133
- 8
8
votes
2 answers
Who performs the TLB shootdown?
I read this SO question describing what a TLB shootdown is. I'm trying to understand if this is an operation performed by the kernel or by the processor or both?
My questions are :-
Does a TLB shootdown happen upon context switch? I would assume…

learnlearnlearn
- 946
- 1
- 8
- 16
8
votes
1 answer
Virtually indexed physically tagged cache Synonym
I am not able to entirely grasp the concept of synonyms or aliasing in VIPT caches.
Consider the address split as:-
Here, suppose we have 2 pages with different VA's mapped to same physical address(or frame no).
The pageno part of VA (bits 13-39)…

Zephyr
- 1,521
- 3
- 22
- 42