If not, then why aren't all the pages loaded into the TLB so that TLB misses never happen.
$\begingroup$ Yes, a TLB is usually very small, yet very fast $\endgroup$– nir shaharJun 15, 2021 at 18:26
$\begingroup$ en.wikipedia.org/wiki/… $\endgroup$– D.W. ♦Jun 15, 2021 at 19:12
The number of entries in the TLB is limited and keep in mind that there are multiple levels of TLBs. So the higher the level, the more entries they typically have. For more detailed information have a look at the following page for Skylake.
Wat you are referring to is a minor page fault; so there is no matching entry for a page in the TLB, but the page is in memory.
You can also have a major page fault, the entry isn't in the TLB + isn't in memory. It needs to be loaded from disk into memory first before and entry can be placed in the TLB.
So even if your TLB would be infinitely large, you still need TLB misses to deal with major page faults.
The TLB is part of the CPU. So once you bought a CPU and put it in your computer, it's limited. Another more expensive CPU might have a larger TLB, which is still limited.
I can buy a computer with 1500 GB of memory. You'd need a bloody big TLB to have no TLB misses whatsoever.