linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: John David Anglin <dave.anglin@bell.net>,
	linux-parisc <linux-parisc@vger.kernel.org>
Cc: Helge Deller <deller@gmx.de>, Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [PATCH] parisc: Update huge TLB page support to use per-pagetable spinlock
Date: Sat, 27 Apr 2019 11:40:01 -0700	[thread overview]
Message-ID: <1556390401.5648.2.camel@HansenPartnership.com> (raw)
In-Reply-To: <c14ef878-b942-af8e-5eea-3e04c80a33dd@bell.net>

On Sat, 2019-04-27 at 14:15 -0400, John David Anglin wrote:
> This patch updates the parisc huge TLB page support to use per-
> pagetable spinlocks.
> 
> This patch requires Mikulas' per-pagetable spinlock patch and the
> revised TLB serialization patch from Helge and myself.  With Mikulas'
> patch, we need to use the per-pagetable spinlock for page table
> updates.  The TLB lock is only used to serialize TLB flushes on
> machines with the Merced bus.
> 
> Signed-off-by: John David Anglin <dave.anglin@bell.net>
> ---
> 
> diff --git a/arch/parisc/mm/hugetlbpage.c
> b/arch/parisc/mm/hugetlbpage.c
> index d77479ae3af2..d578809e55cf 100644
> --- a/arch/parisc/mm/hugetlbpage.c
> +++ b/arch/parisc/mm/hugetlbpage.c
> @@ -139,9 +139,9 @@ void set_huge_pte_at(struct mm_struct *mm,
> unsigned long addr,
>  {
>  	unsigned long flags;
> 
> -	purge_tlb_start(flags);
> +	spin_lock_irqsave(pgd_spinlock((mm)->pgd), flags);
>  	__set_huge_pte_at(mm, addr, ptep, entry);
> -	purge_tlb_end(flags);
> +	spin_unlock_irqrestore(pgd_spinlock((mm)->pgd), flags);

You can't do stuff like this on the problem systems: we can only have
one outstanding purge at once on the inter-cpu bus.  For them,
therefore, we also need a global spinlock.

Pulling the tlb purge lock down to the lowest level, so inside
purge_tlb_entries() might address a lot of the performance issues while
keeping the purges correct on merced class.

James


  reply	other threads:[~2019-04-27 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 18:15 [PATCH] parisc: Update huge TLB page support to use per-pagetable spinlock John David Anglin
2019-04-27 18:40 ` James Bottomley [this message]
2019-04-27 19:49   ` John David Anglin

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=1556390401.5648.2.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=dave.anglin@bell.net \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mpatocka@redhat.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;
as well as URLs for NNTP newsgroup(s).