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=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 A4B61C10F14 for ; Thu, 3 Oct 2019 02:08:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6686721A4C for ; Thu, 3 Oct 2019 02:08:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="eocGInpz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6686721A4C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EA8776B0005; Wed, 2 Oct 2019 22:08:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E59266B0006; Wed, 2 Oct 2019 22:08:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D470F6B0007; Wed, 2 Oct 2019 22:08:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id AD4926B0005 for ; Wed, 2 Oct 2019 22:08:52 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 4828D181AC9AE for ; Thu, 3 Oct 2019 02:08:52 +0000 (UTC) X-FDA: 76000840104.02.pot43_4d6617d197536 X-HE-Tag: pot43_4d6617d197536 X-Filterd-Recvd-Size: 6228 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Oct 2019 02:08:51 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id x134so827878qkb.0 for ; Wed, 02 Oct 2019 19:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=SGn11J1WymPxTPyFDY35t8vkfI2C1blH6swwm2OCJqo=; b=eocGInpzDnCjqPIdaO7u+z+4TlrZ1J6RJmtSItG2DS6Yoc0NCeWiujNWvJeSgwrkxW DIvpcAhHJ3w1y6e8F48QoH2HRShl/scT79l9eBGvtkuX4NLLqAalykrXmKEAMpQT8l0S wCaIHhvBvZSSLrGDf2hg52+biUjQLYeD3tpm0z3C923w7VBIwfY40u8aJ1azXv0/mW0s Q3fZXopW5utfwbxj5iF1H5tpFlZtcrtrCvLjBcMEkM8C3Zyw1FHpJa3fran1JwitlU+4 rcBE/qe1w2RoCcH3vat2mt4m48WrTCnNfBNzjpsL16GvdiiI4bCRDwXJQoQrYwxxWmKR MvWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=SGn11J1WymPxTPyFDY35t8vkfI2C1blH6swwm2OCJqo=; b=Od1eMmFL6kYzAcKVk4BS5kazX03i2Jk7K/Otqics1WhfPKKAdehwaga8i1kuFOY3Vw ZSl9XuwNKplhQt6hUfZv+kgOuH8RZWwtgHgePdonW35nrxpx/wtEGOeVSLSqxf7deHnf /J1do9KjBBTxotOh0S3pKter2ZCFQ/Wf8qwizz0b8byp8Fd9CvbZe6cq6hZ2KwETQo27 Vle1mvwDxmfXKYE+a16crCz8r8VvRGm32eX5to13UPhMgwdqOctd6AuOCJWpyvmMiSV0 IoXr1RYziAmcpR9nH8X8rPIF+F2NXIPPB7D2r5csJflFULn97JI3/8TZELcMN2qle+cc 6iVA== X-Gm-Message-State: APjAAAUe9ifTBOf/e6Uqf9AcLnW2TvUqsdXR2YKvUj9gKmp39mFvSTRT 075H1cyR3/jF8hXg4oOsBWG/nw== X-Google-Smtp-Source: APXvYqzQ+RrNGGioxVcVSlkjg3Xh7GYjQWiv2PV5YwfNPap/3P8C3G4pkA3QtVZ96s1JOcYi4xeMhg== X-Received: by 2002:a37:f61e:: with SMTP id y30mr2081904qkj.208.1570068531083; Wed, 02 Oct 2019 19:08:51 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id k54sm970947qtf.28.2019.10.02.19.08.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Oct 2019 19:08:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks Date: Wed, 2 Oct 2019 22:08:49 -0400 Message-Id: <88228CE0-81B2-4F2F-8C1D-F3376DB25A16@lca.pw> References: <20191003013325.2614-11-leonardo@linux.ibm.com> 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 , "Peter Zijlstra (Intel)" , Ingo Molnar , Christian Brauner , Michal Hocko , Elena Reshetova , Roman Gushchin , Andrea Arcangeli , Al Viro , "Dmitry V. Levin" , =?utf-8?Q?J=C3=A9r=C3=B4me_Glisse?= , Song Liu , Bartlomiej Zolnierkiewicz , Ira Weiny , "Kirill A. Shutemov" , John Hubbard , Keith Busch In-Reply-To: <20191003013325.2614-11-leonardo@linux.ibm.com> To: Leonardo Bras X-Mailer: iPhone Mail (17A844) 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 Oct 2, 2019, at 9:36 PM, Leonardo Bras wrote: >=20 > Adds config option LOCKLESS_PAGE_TABLE_WALK_TRACKING to make possible > enabling tracking lockless pagetable walks directly from kernel config. Can=E2=80=99t this name and all those new *lockless* function names be short= er? There are many functions name with *_locked, so how about dropping lockl= ess at all, i.e., PAGE_TABLE_WALK_TRACKING blah blah? >=20 > Signed-off-by: Leonardo Bras > --- > mm/Kconfig | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > 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 >=20 > +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. > + > endmenu > --=20 > 2.20.1