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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6BC8EC4360C for ; Tue, 8 Oct 2019 18:03:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1832F21721 for ; Tue, 8 Oct 2019 18:03:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1832F21721 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A94558E0005; Tue, 8 Oct 2019 14:03:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6C1C8E0003; Tue, 8 Oct 2019 14:03:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 935018E0005; Tue, 8 Oct 2019 14:03:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 7319C8E0003 for ; Tue, 8 Oct 2019 14:03:17 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 017A22C79 for ; Tue, 8 Oct 2019 18:03:17 +0000 (UTC) X-FDA: 76021389234.15.beds32_73e982223d045 X-HE-Tag: beds32_73e982223d045 X-Filterd-Recvd-Size: 7824 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 18:03:16 +0000 (UTC) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x98HhfQt026408; Tue, 8 Oct 2019 14:02:42 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vgwdwme50-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Oct 2019 14:02:41 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x98HpX0V045873; Tue, 8 Oct 2019 14:02:41 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vgwdwme3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Oct 2019 14:02:41 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x98Hxa60005052; Tue, 8 Oct 2019 18:02:41 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma01wdc.us.ibm.com with ESMTP id 2vejt6u75q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Oct 2019 18:02:41 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x98I2cTY9109858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Oct 2019 18:02:38 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31E8711206F; Tue, 8 Oct 2019 18:02:38 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 52D72112061; Tue, 8 Oct 2019 18:02:31 +0000 (GMT) Received: from leobras.br.ibm.com (unknown [9.18.235.46]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 8 Oct 2019 18:02:31 +0000 (GMT) Message-ID: Subject: Re: [PATCH v5 02/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks From: Leonardo Bras To: Christopher Lameter 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-1?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 Date: Tue, 08 Oct 2019 15:02:27 -0300 In-Reply-To: References: <20191003013325.2614-1-leonardo@linux.ibm.com> <20191003013325.2614-3-leonardo@linux.ibm.com> <6e8877bff034603e75b35599797a39d9bc4840f1.camel@linux.ibm.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-uR24Id1SoXLfuKZlusT9" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-08_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910080142 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: --=-uR24Id1SoXLfuKZlusT9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-10-08 at 17:43 +0000, Christopher Lameter wrote: > On Tue, 8 Oct 2019, Leonardo Bras wrote: >=20 > > > You are creating contention on a single exclusive cacheline. Doesnt t= his > > > defeat the whole purpose of the lockless page table walk? Use mmap_se= m or > > > so should cause the same performance regression? > >=20 > > Sorry, I did not understand that question. > > I mean, this is just a refcount and never causes a lock. >=20 > Locks also use atomic operations like a refcount increment. Both require > the cacheline to be in exclusive state. So the impact is very similar. Thanks for explaining. :) So you say that the performance impact of using my approach is the same as using locks? (supposing that lock never waits) So, there are 'lockless pagetable walks' only for the sake of better performance?=20 I thought they existed to enable doing pagetable walks in states where locking was not safe. Is that right? Thanks! Leonardo Br=C3=A1s, --=-uR24Id1SoXLfuKZlusT9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEMdeUgIzgjf6YmUyOlQYWtz9SttQFAl2czzMACgkQlQYWtz9S ttTcBw//Q3V1Sh9/H9YgHRAZLNo4J0NXNOfZMB3Wuu6FYM2o1AdA8/+94ofzIS9s b4H3QlO8XePM8lSosVaoR9hxIBJFAg7wcomI1tLbyVA9vxYvf+9HYpMsjcAs991F FNrFFO3KtCH6ahjNVM/nIqrbZnVqtyqBuQZRhdnMnqzB9xxDLxRPAlhsmq8cfhkT jjlvhnebjYX7lbzZ55vzRDeZNQb2Nd0wkeA2Ij/0ab9ii5WiNlYaSoi6BbyPL6m2 SYKorTyqqd/Ci92LzXGK4SkQxjeNK/JFmmtHWpWyuow4/8i1pjuVob+KyKF5QFjL qMFHZGXk2Z/7PAjWz6HuWw2sRC3LTjRdD85zELkDnW8pHy6Tq0gWvmUn5zME0y+4 WNpFrqyLYgjlCXdCwB4WVMxl7OK71seolusrMfszomiAMMjZQBIdHZeep5dViH+9 4ICmwSuG1jLV1bpx3Eoq9rqLbhIN2GNnPLHav2w669z9iANw8A27DtKTUQii/t0L FpBRbvYBBhAp1bmq894bzBK1DWch8ouoqh9b9e2ZbYv+fCav5lyHo7ikAc0lLU/0 lvNltSIBKQaYiDCP231JT6NowJUfeu6fCQsZjs1mMh1AHPlEy5l6/P/SrP4Q0wa8 0DTkCHMyGNrYnfqXFqeAMOvOjtEMMh/Sy01nq7n6w2gQiaUn+Lk= =HxOw -----END PGP SIGNATURE----- --=-uR24Id1SoXLfuKZlusT9--