[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <c64d34118542d5c2d31b8f6b7802d2a29dac71ef.camel@linux.ibm.com>
Date: Mon, 23 Sep 2019 17:23:03 -0300
From: Leonardo Bras <leonardo@...ux.ibm.com>
To: John Hubbard <jhubbard@...dia.com>, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, Linux-MM <linux-mm@...ck.org>
Cc: Dan Williams <dan.j.williams@...el.com>,
Arnd Bergmann <arnd@...db.de>, Jason Gunthorpe <jgg@...pe.ca>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
YueHaibing <yuehaibing@...wei.com>,
Nicholas Piggin <npiggin@...il.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Keith Busch <keith.busch@...el.com>,
Richard Fontana <rfontana@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Ganesh Goudar <ganeshgr@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ira Weiny <ira.weiny@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Allison Randal <allison@...utok.net>
Subject: Re: [PATCH v2 11/11] powerpc/mm/book3s64/pgtable: Uses counting
method to skip serializing
On Mon, 2019-09-23 at 12:58 -0700, John Hubbard wrote:
>
> CPU 0 CPU 1
> ------ --------------
> READ(pte) (re-ordered at run time)
> atomic_inc(val) (no run-time memory barrier!)
>
> pmd_clear(pte)
> if (val)
> run_on_all_cpus(): IPI
> local_irq_disable() (also not a mem barrier)
>
> if(pte)
> walk page tables
Let me see if I can understand,
On most patches, it would be:
CPU 0 CPU 1
------ --------------
ptep = __find_linux_pte
(re-ordered at run time)
atomic_inc(val)
pmd_clear(pte)
smp_mb()
if (val)
run_on_all_cpus(): IPI
local_irq_disable()
if(ptep)
pte = *ptep;
Is that what you meant?
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists