Re: huge-tlb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 1 Jul 2003, Daniele Bellucci wrote:
> On Mon 30 June 2003 04:28, Rik van Riel wrote:
> > On Mon, 23 Jun 2003, Daniele Bellucci wrote:
> > > Can anyone tellme more about the hugetlb in 2.5.x?
> > > (i've read Documentation/vm/hugetlb.txt )
> >
> > Well, what more do you want to know ?
>
> I can't see why huge pages improves TLB utilization.
> IIRC TLB is used to cache virtual/logical->physical address translation.
> Why huge pages make a better usage of TLB?

On an Intel CPU you often only have a small number of TLB
entries, say 64.  Each of those maps 4 kB of memory.

That means that on such a CPU the TLB can only map 256 kB
of memory, which is LESS than the L2 cache of the CPU...

With hugetlbfs you use 4MB (or 2MB) pages instead, meaning
that each of the (dedicated) large TLB entries maps a few
MB of memory.

If your application uses gobs of memory at once, mapping
memory with huge TLB entries means the CPU can cache the
virtual -> physical mapping of more memory at once, so
the process can run with less TLB misses.

Rik
-- 
Engineers don't grow up, they grow sideways.
http://www.surriel.com/		http://kernelnewbies.org/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux