public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Michael Ellerman <mpe@ellerman•id.au>, linuxppc-dev@ozlabs•org
Cc: paulus@samba•org, aneesh.kumar@linux•vnet.ibm.com
Subject: Re: powerpc/mm/book3s/64: Rework page table geometry for lower memory usage
Date: Mon, 15 May 2017 15:06:46 +1000 (AEST)	[thread overview]
Message-ID: <3wR7pt2l3Cz9s8J@ozlabs.org> (raw)
In-Reply-To: <1494317148-18554-1-git-send-email-mpe@ellerman.id.au>

On Tue, 2017-05-09 at 08:05:48 UTC, Michael Ellerman wrote:
> Recently in commit f6eedbba7a26 ("powerpc/mm/hash: Increase VA range to 128TB")
> we increased the virtual address space for user processes to 128TB by default,
> and up to 512TB if user space opts in.
> 
> This obviously required expanding the range of the Linux page tables. For Book3s
> 64-bit using hash and with PAGE_SIZE=64K, we increased the PGD to 2^15 entries.
> This meant we could cover the full address range, while still being able to
> insert a 16G hugepage at the PGD level and a 16M hugepage in the PMD.
> 
> The downside of that geometry is that it uses a lot of memory for the PGD, and
> in particular makes the PGD a 4-page allocation, which means it's much more
> likely to fail under memory pressure.
> 
> Instead we can make the PMD larger, so that a single PUD entry maps 16G,
> allowing the 16G hugepages to sit at that level in the tree. We're then able to
> split the remaining bits between the PUG and PGD. We make the PGD slightly
> larger as that results in lower memory usage for typical programs.
> 
> When THP is enabled the PMD actually doubles in size, to 2^11 entries, or 2^14
> bytes, which is large but still < PAGE_SIZE.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman•id.au>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com>
> Reviewed-by: Balbir Singh <bsingharora@gmail•com>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/ba95b5d0359609b4ec8010f77c40ab

cheers

      parent reply	other threads:[~2017-05-15  5:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09  8:05 [PATCH] powerpc/mm/book3s/64: Rework page table geometry for lower memory usage Michael Ellerman
2017-05-09  8:24 ` Aneesh Kumar K.V
2017-05-09  8:43 ` Balbir Singh
2017-05-15  5:06 ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3wR7pt2l3Cz9s8J@ozlabs.org \
    --to=patch-notifications@ellerman$(echo .)id.au \
    --cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox