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 2419AECE58C for ; Tue, 8 Oct 2019 17:43:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ED88F2070B for ; Tue, 8 Oct 2019 17:43:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED88F2070B 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 9BADE8E0005; Tue, 8 Oct 2019 13:43:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 96B2D8E0003; Tue, 8 Oct 2019 13:43:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 881398E0005; Tue, 8 Oct 2019 13:43:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id 675D68E0003 for ; Tue, 8 Oct 2019 13:43:12 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 150F62C94 for ; Tue, 8 Oct 2019 17:43:12 +0000 (UTC) X-FDA: 76021338624.21.talk03_561063d7b5400 X-HE-Tag: talk03_561063d7b5400 X-Filterd-Recvd-Size: 3595 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 17:43:11 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 6438A3EC04; Tue, 8 Oct 2019 17:43:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 60AB53EC00; Tue, 8 Oct 2019 17:43:10 +0000 (UTC) Date: Tue, 8 Oct 2019 17:43:10 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com 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 , Andrea Arcangeli , Ralph Campbell , Arnd Bergmann , Jann Horn , John Hubbard , Jesper Dangaard Brouer , Nicholas Piggin , =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= , Mathieu Desnoyers , kvm-ppc@vger.kernel.org, Thomas Gleixner , Reza Arbab , Allison Randal , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Logan Gunthorpe , Souptick Joarder , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Roman Gushchin , "Kirill A. Shutemov" , Al Viro Subject: Re: [PATCH v5 02/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks In-Reply-To: <6e8877bff034603e75b35599797a39d9bc4840f1.camel@linux.ibm.com> Message-ID: References: <20191003013325.2614-1-leonardo@linux.ibm.com> <20191003013325.2614-3-leonardo@linux.ibm.com> <6e8877bff034603e75b35599797a39d9bc4840f1.camel@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 Tue, 8 Oct 2019, Leonardo Bras wrote: > > 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? > > Sorry, I did not understand that question. > I mean, this is just a refcount and never causes a lock. Locks also use atomic operations like a refcount increment. Both require the cacheline to be in exclusive state. So the impact is very similar.