All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: linux-mm@kvack.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	akpm@linux-foundation.org, hannes@cmpxchg.org
Subject: Re: [PATCH 7/8] mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
Date: Wed, 3 Oct 2012 00:58:03 +0200	[thread overview]
Message-ID: <20121002225803.GT4763@redhat.com> (raw)
In-Reply-To: <20121002.182741.650740858374403508.davem@davemloft.net>

On Tue, Oct 02, 2012 at 06:27:41PM -0400, David Miller wrote:
> 
> Invalidation sequences are handled in various ways on various
> architectures.
> 
> One way, which sparc64 uses, is to let the set_*_at() functions
> accumulate pending flushes into a per-cpu array.  Then the
> flush_tlb_range() et al. calls process the pending TLB flushes.
> 
> In this regime, the __tlb_remove_*tlb_entry() implementations are
> essentially NOPs.
> 
> The canonical PTE zap in mm/memory.c is:
> 
> 			ptent = ptep_get_and_clear_full(mm, addr, pte,
> 							tlb->fullmm);
> 			tlb_remove_tlb_entry(tlb, pte, addr);
> 
> With a subsequent tlb_flush_mmu() if needed.
> 
> Mirror this in the THP PMD zapping using:
> 
> 		orig_pmd = pmdp_get_and_clear(tlb->mm, addr, pmd);
> 		page = pmd_page(orig_pmd);
> 		tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
> 
> And we properly accomodate TLB flush mechanims like the one described
> above.

Thanks for the explanation.

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: linux-mm@kvack.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	akpm@linux-foundation.org, hannes@cmpxchg.org
Subject: Re: [PATCH 7/8] mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
Date: Wed, 3 Oct 2012 00:58:03 +0200	[thread overview]
Message-ID: <20121002225803.GT4763@redhat.com> (raw)
Message-ID: <20121002225803.7eHgBG86jmYCSPo0ZPgdJeKuh9g8c5zq-oDuzb_FNXQ@z> (raw)
In-Reply-To: <20121002.182741.650740858374403508.davem@davemloft.net>

On Tue, Oct 02, 2012 at 06:27:41PM -0400, David Miller wrote:
> 
> Invalidation sequences are handled in various ways on various
> architectures.
> 
> One way, which sparc64 uses, is to let the set_*_at() functions
> accumulate pending flushes into a per-cpu array.  Then the
> flush_tlb_range() et al. calls process the pending TLB flushes.
> 
> In this regime, the __tlb_remove_*tlb_entry() implementations are
> essentially NOPs.
> 
> The canonical PTE zap in mm/memory.c is:
> 
> 			ptent = ptep_get_and_clear_full(mm, addr, pte,
> 							tlb->fullmm);
> 			tlb_remove_tlb_entry(tlb, pte, addr);
> 
> With a subsequent tlb_flush_mmu() if needed.
> 
> Mirror this in the THP PMD zapping using:
> 
> 		orig_pmd = pmdp_get_and_clear(tlb->mm, addr, pmd);
> 		page = pmd_page(orig_pmd);
> 		tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
> 
> And we properly accomodate TLB flush mechanims like the one described
> above.

Thanks for the explanation.

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: linux-mm@kvack.org, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	akpm@linux-foundation.org, hannes@cmpxchg.org
Subject: Re: [PATCH 7/8] mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
Date: Tue, 02 Oct 2012 22:58:03 +0000	[thread overview]
Message-ID: <20121002225803.GT4763@redhat.com> (raw)
In-Reply-To: <20121002.182741.650740858374403508.davem@davemloft.net>

On Tue, Oct 02, 2012 at 06:27:41PM -0400, David Miller wrote:
> 
> Invalidation sequences are handled in various ways on various
> architectures.
> 
> One way, which sparc64 uses, is to let the set_*_at() functions
> accumulate pending flushes into a per-cpu array.  Then the
> flush_tlb_range() et al. calls process the pending TLB flushes.
> 
> In this regime, the __tlb_remove_*tlb_entry() implementations are
> essentially NOPs.
> 
> The canonical PTE zap in mm/memory.c is:
> 
> 			ptent = ptep_get_and_clear_full(mm, addr, pte,
> 							tlb->fullmm);
> 			tlb_remove_tlb_entry(tlb, pte, addr);
> 
> With a subsequent tlb_flush_mmu() if needed.
> 
> Mirror this in the THP PMD zapping using:
> 
> 		orig_pmd = pmdp_get_and_clear(tlb->mm, addr, pmd);
> 		page = pmd_page(orig_pmd);
> 		tlb_remove_pmd_tlb_entry(tlb, pmd, addr);
> 
> And we properly accomodate TLB flush mechanims like the one described
> above.

Thanks for the explanation.

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

  reply	other threads:[~2012-10-02 22:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 22:27 [PATCH 7/8] mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd() David Miller
2012-10-02 22:27 ` David Miller
2012-10-02 22:27 ` David Miller
2012-10-02 22:58 ` Andrea Arcangeli [this message]
2012-10-02 22:58   ` Andrea Arcangeli
2012-10-02 22:58   ` Andrea Arcangeli

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=20121002225803.GT4763@redhat.com \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sparclinux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.