public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Chintan Pandya <cpandya@codeaurora.org>
Cc: catalin.marinas@arm.com, mark.rutland@arm.com,
	akpm@linux-foundation.org, toshi.kani@hpe.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v13 3/3] arm64: Implement page table free interfaces
Date: Wed, 6 Jun 2018 16:44:48 +0100	[thread overview]
Message-ID: <20180606154447.GG6631@arm.com> (raw)
In-Reply-To: <1528268481-19299-4-git-send-email-cpandya@codeaurora.org>

On Wed, Jun 06, 2018 at 12:31:21PM +0530, Chintan Pandya wrote:
> arm64 requires break-before-make. Originally, before
> setting up new pmd/pud entry for huge mapping, in few
> cases, the modifying pmd/pud entry was still valid
> and pointing to next level page table as we only
> clear off leaf PTE in unmap leg.
> 
>  a) This was resulting into stale entry in TLBs (as few
>     TLBs also cache intermediate mapping for performance
>     reasons)
>  b) Also, modifying pmd/pud was the only reference to
>     next level page table and it was getting lost without
>     freeing it. So, page leaks were happening.
> 
> Implement pud_free_pmd_page() and pmd_free_pte_page() to
> enforce BBM and also free the leaking page tables.
> 
> Implementation requires,
>  1) Clearing off the current pud/pmd entry
>  2) Invalidation of TLB
>  3) Freeing of the un-used next level page tables
> 
> Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
> ---
>  arch/arm64/mm/mmu.c | 48 ++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 44 insertions(+), 4 deletions(-)

Thanks, I think this looks really good now:

Reviewed-by: Will Deacon <will.deacon@arm.com>

Will

  reply	other threads:[~2018-06-06 15:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06  7:01 [PATCH v13 0/3] Fix issues with huge mapping in ioremap for ARM64 Chintan Pandya
2018-06-06  7:01 ` [PATCH v13 1/3] ioremap: Update pgtable free interfaces with addr Chintan Pandya
2018-06-06 15:44   ` Will Deacon
2018-06-06  7:01 ` [PATCH v13 2/3] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable Chintan Pandya
2018-06-06 15:44   ` Will Deacon
2018-06-06  7:01 ` [PATCH v13 3/3] arm64: Implement page table free interfaces Chintan Pandya
2018-06-06 15:44   ` Will Deacon [this message]
2018-09-20 17:25   ` Catalin Marinas
2018-09-21  9:56     ` Catalin Marinas
2018-06-06 15:45 ` [PATCH v13 0/3] Fix issues with huge mapping in ioremap for ARM64 Will Deacon
2018-06-07  8:03   ` Chintan Pandya
2018-06-12  6:47   ` Chintan Pandya

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=20180606154447.GG6631@arm.com \
    --to=will.deacon@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=cpandya@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=toshi.kani@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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