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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 9E833C10F14 for ; Thu, 3 Oct 2019 07:44:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5EB5D20815 for ; Thu, 3 Oct 2019 07:44:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="a+SSLmbv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EB5D20815 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DFA596B0005; Thu, 3 Oct 2019 03:44:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DAB5D6B0006; Thu, 3 Oct 2019 03:44:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C9A1B6B0007; Thu, 3 Oct 2019 03:44:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id A76DC6B0005 for ; Thu, 3 Oct 2019 03:44:54 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 3A3A082437D2 for ; Thu, 3 Oct 2019 07:44:54 +0000 (UTC) X-FDA: 76001686908.21.voice61_64d7bf28a0908 X-HE-Tag: voice61_64d7bf28a0908 X-Filterd-Recvd-Size: 5409 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Oct 2019 07:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=okrEeTU30iuBiiXUvz66mxD7x2wqTqMgkLlCZwaayH8=; b=a+SSLmbvcoU7Qs6d0bR0OzAEp Yf6qNcyPwIvT7t+wsLNvueoM4OUeiBSQ0MuphzfD7VK4k7FOo6YcUFwChIezrDW4lhPPVblY7SwXv koEUVymkJspGKJNOVqCjDiZS+s+nPZhw4CbFkEZkZ5PeBtMmPsLxu7fqYHOxbXBpYds5Kp1M5CXCJ tmQjsY+X4yjwhkmH8JpQAz1nn9j1xORG91Q1E3W2NeutL+ytylGbTtbWo5Kch753pA7zsQTcwOOmr 23Tm0xfN3IavCwBdGBbVnyNG0b0EFLBEZLJhDNiiB8LaexB154tdiuSzXENiiJqLK4U/vVt90QR1C KIuweDcHA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFvmt-0001jW-4g; Thu, 03 Oct 2019 07:44:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E24AE301B59; Thu, 3 Oct 2019 09:43:42 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0EB862653E241; Thu, 3 Oct 2019 09:44:32 +0200 (CEST) Date: Thu, 3 Oct 2019 09:44:32 +0200 From: Peter Zijlstra 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 , Christoph Lameter , Logan Gunthorpe , Andrey Ryabinin , Alexey Dobriyan , Souptick Joarder , Mathieu Desnoyers , Ralph Campbell , Jesper Dangaard Brouer , Jann Horn , Davidlohr Bueso , Ingo Molnar , Christian Brauner , Michal Hocko , Elena Reshetova , Roman Gushchin , Andrea Arcangeli , Al Viro , "Dmitry V. Levin" , =?iso-8859-1?B?Suly9G1l?= Glisse , Song Liu , Bartlomiej Zolnierkiewicz , Ira Weiny , "Kirill A. Shutemov" , John Hubbard , Keith Busch Subject: Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks Message-ID: <20191003074432.GO4536@hirez.programming.kicks-ass.net> References: <20191003013325.2614-1-leonardo@linux.ibm.com> <20191003013325.2614-11-leonardo@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003013325.2614-11-leonardo@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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, Oct 02, 2019 at 10:33:24PM -0300, Leonardo Bras wrote: > Adds config option LOCKLESS_PAGE_TABLE_WALK_TRACKING to make possible > enabling tracking lockless pagetable walks directly from kernel config. > > Signed-off-by: Leonardo Bras > --- > mm/Kconfig | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/mm/Kconfig b/mm/Kconfig > index a5dae9a7eb51..00f487a0122f 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -736,4 +736,15 @@ config ARCH_HAS_PTE_SPECIAL > config ARCH_HAS_HUGEPD > bool > > +config LOCKLESS_PAGE_TABLE_WALK_TRACKING > + bool "Track (and optimize) lockless page table walks" > + default n > + > + help > + Maintain a reference count of active lockless page table > + walkers. This adds 4 bytes to struct mm size, and two atomic > + operations to calls such as get_user_pages_fast(). Some > + architectures can optimize lockless page table operations if > + this is enabled. This shouldn't be a user visible option at all. Either the arch needs it and selects it or not.