linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Jia He" <justin.he@arm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Dave Airlie" <airlied@redhat.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	"Thomas Hellstrom" <thellstrom@vmware.com>,
	"Souptick Joarder" <jrdr.linux@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: fix double page fault on arm64 if PTE_AF is cleared
Date: Tue, 10 Sep 2019 10:08:45 +0100	[thread overview]
Message-ID: <20190910090845.GD14442@C02TF0J2HF1T.local> (raw)
In-Reply-To: <20190909212712.GE29434@bombadil.infradead.org>

On Mon, Sep 09, 2019 at 02:27:12PM -0700, Matthew Wilcox wrote:
> On Fri, Sep 06, 2019 at 09:57:47PM +0800, Jia He wrote:
> > +		if (!pte_young(vmf->orig_pte)) {
> > +			entry = pte_mkyoung(vmf->orig_pte);
> > +			if (ptep_set_access_flags(vmf->vma, vmf->address,
> > +				vmf->pte, entry, 0))
> > +				update_mmu_cache(vmf->vma, vmf->address,
> > +						vmf->pte);
> > +		}
> > +
> 
> Oh, btw, why call update_mmu_cache() here?  All you've done is changed
> the 'accessed' bit.  What is any architecture supposed to do in response
> to this?

For arm64 and x86 that's a no-op but an architecture with software TLBs
may preload them to avoid a subsequent fault on access after the pte was
made young.

-- 
Catalin


  reply	other threads:[~2019-09-10  9:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 13:57 [PATCH v2] mm: fix double page fault on arm64 if PTE_AF is cleared Jia He
2019-09-06 14:57 ` Matthew Wilcox
2019-09-10  9:15   ` Catalin Marinas
2019-09-09 21:27 ` Matthew Wilcox
2019-09-10  9:08   ` Catalin Marinas [this message]
2019-09-10  9:29 ` Kirill A. Shutemov

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=20190910090845.GD14442@C02TF0J2HF1T.local \
    --to=catalin.marinas@arm.com \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=jrdr.linux@gmail.com \
    --cc=justin.he@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.org \
    --cc=rcampbell@nvidia.com \
    --cc=thellstrom@vmware.com \
    --cc=willy@infradead.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 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).