From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Lameter Subject: Re: [PATCH v5 02/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks Date: Tue, 8 Oct 2019 15:11:14 +0000 (UTC) Message-ID: References: <20191003013325.2614-1-leonardo@linux.ibm.com> <20191003013325.2614-3-leonardo@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20191003013325.2614-3-leonardo@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Leonardo Bras Cc: Song Liu , Michal Hocko , "Peter Zijlstra (Intel)" , "Dmitry V. Levin" , Keith Busch , linux-mm@kvack.org, Paul Mackerras , Christian Brauner , Ira Weiny , Dan Williams , Elena Reshetova , linux-arch@vger.kernel.org, Santosh Sivaraj , Davidlohr Bueso , "Aneesh Kumar K.V" , Bartlomiej Zolnierkiewicz , Mike Rapoport , Jason Gunthorpe , Vlastimil Babka , Mahesh Salgaonkar , Andrey Ryabinin , Alexey Dobriyan , Ingo Molnar List-Id: linux-arch.vger.kernel.org On Wed, 2 Oct 2019, Leonardo Bras wrote: > + > +inline unsigned long __begin_lockless_pgtbl_walk(struct mm_struct *mm, > + bool disable_irq) > +{ > + unsigned long irq_mask = 0; > + > + if (IS_ENABLED(CONFIG_LOCKLESS_PAGE_TABLE_WALK_TRACKING)) > + atomic_inc(&mm->lockless_pgtbl_walkers); > + You are creating contention on a single exclusive cacheline. Doesnt this defeat the whole purpose of the lockless page table walk? Use mmap_sem or so should cause the same performance regression?