[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190910090845.GD14442@C02TF0J2HF1T.local>
Date: Tue, 10 Sep 2019 10:08:45 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Jia He <justin.he@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jérôme Glisse <jglisse@...hat.com>,
Ralph Campbell <rcampbell@...dia.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Peter Zijlstra <peterz@...radead.org>,
Dave Airlie <airlied@...hat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Thomas Hellstrom <thellstrom@...are.com>,
Souptick Joarder <jrdr.linux@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: fix double page fault on arm64 if PTE_AF is
cleared
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
Powered by blists - more mailing lists