Huge pages

Tiago Stürmer Daitx tdaitx at linux.vnet.ibm.com
Mon Jul 22 05:58:34 PDT 2013


On Wed, 2013-07-17 at 14:41 +0200, Volker Simonis wrote:
> Hi Tiago,
> 
> I just wanted to let you know that there's currently a discussion
> going on about an interesting change which may also solve the problem
> we currently have with with -XX:+UseHugeTLBFS on Linux/PPC64:
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-July/thread.html#10117
> (don't get confused by the strange bug name / subject - it's mainly
> about mmap / large pages).

Great!

> While I was evaluating the change I tried to collect all the available
> information about large page support on Linux and that revealed
> several questions:
> 
> - where can the information be found which you send me below (about
> 'memory slices')? Is that documented somewhere? I'm just asking
> because I'd like to collect all the available information in a blog or
> wiki.
> 

Quoting one of our kernel devs:

"We divide the address space in ppc64 into something called slices. The
slices are used to track base page size which is used to hash and
address which will helping in doing the virtual to real address
translation.  Now we divide the address space into 256MB slice till 4GB
and everything else is 1TB slice. That means we can have different page
size at 256MB granulatirity upto 4GB and everything else will be in 1TB
granularity.

I am not sure we have the slice limitation documented anywhere. But THP
doesn't suffer from those."

> - I read that with kernel 3.11 Linux will also support "transparent
> huge pages" on Linux/PPC64
> (http://lkml.indiana.edu/hypermail/linux/kernel/1307.0/01916.html) but
> I wonder how that can work with the 'memory slices' described by you?
> If I understand "transparent huge pages" right (see for example
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/vm/transhuge.txt)
> it works in the way that a separate kernel thread scans the memory for
> consecutive memory mappings and if they are large enough the
> underlying small pages are transparently replaced by huge pages. Now I
> don't understand how this can work if a memory slice only supports one
> page size. Or has this "only one page size per slice" restriction been
> removed in kernel 3.11.

"We added support for multiple page size per segment in 3.11. That means
we now have support for different page size per segment and we use slize
page size as base page size. We use this to implement transparent
hugepage. But hugetlbfs is not yet updated to use MPSS. So allocation
using hugetlbfs continue to have the limitation explained."

Let me know if that answer is helpful.

Regards,
Tiago

-- 
Tiago Stürmer Daitx
tdaitx at linux.vnet.ibm.com
IBM - Linux Technology Center



More information about the ppc-aix-port-dev mailing list