From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EECDDC4360C for ; Tue, 8 Oct 2019 15:11:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 92D86206BB for ; Tue, 8 Oct 2019 15:11:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92D86206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 309E98E0005; Tue, 8 Oct 2019 11:11:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2932B8E0003; Tue, 8 Oct 2019 11:11:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15ACC8E0005; Tue, 8 Oct 2019 11:11:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id E30948E0003 for ; Tue, 8 Oct 2019 11:11:15 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 9A9E462D9 for ; Tue, 8 Oct 2019 15:11:15 +0000 (UTC) X-FDA: 76020955710.24.nut11_4523cbda0215f X-HE-Tag: nut11_4523cbda0215f X-Filterd-Recvd-Size: 3668 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 15:11:14 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 10DCB3EC01; Tue, 8 Oct 2019 15:11:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 0DA463EC00; Tue, 8 Oct 2019 15:11:14 +0000 (UTC) Date: Tue, 8 Oct 2019 15:11:14 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Leonardo Bras cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , "Aneesh Kumar K.V" , Christophe Leroy , Nicholas Piggin , Andrew Morton , Mahesh Salgaonkar , Reza Arbab , Santosh Sivaraj , Balbir Singh , Thomas Gleixner , Greg Kroah-Hartman , Mike Rapoport , Allison Randal , Jason Gunthorpe , Dan Williams , Vlastimil Babka , Logan Gunthorpe , Andrey Ryabinin , Alexey Dobriyan , Souptick Joarder , Mathieu Desnoyers , Ralph Campbell , Jesper Dangaard Brouer , Jann Horn , Davidlohr Bueso , "Peter Zijlstra (Intel)" , Ingo Molnar , Christian Brauner , Michal Hocko , Elena Reshetova , Roman Gushchin , Andrea Arcangeli , Al Viro , "Dmitry V. Levin" , =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= , Song Liu , Bartlomiej Zolnierkiewicz , Ira Weiny , "Kirill A. Shutemov" , John Hubbard , Keith Busch Subject: Re: [PATCH v5 02/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks In-Reply-To: <20191003013325.2614-3-leonardo@linux.ibm.com> Message-ID: References: <20191003013325.2614-1-leonardo@linux.ibm.com> <20191003013325.2614-3-leonardo@linux.ibm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?