Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1347710ybn; Wed, 25 Sep 2019 16:50:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqws/xYFU3nQYATVhV+RYRHofbkuwYMCHwqVvw3Fl2CBHKoeaSjkmh1PRid3QdkyHuqR3ScM X-Received: by 2002:a50:d089:: with SMTP id v9mr704698edd.54.1569455450596; Wed, 25 Sep 2019 16:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569455450; cv=none; d=google.com; s=arc-20160816; b=uaUfcjRSqNNaJelFyHIJl5gcahh6aRMFXNgsBdDvTKUL2Omm+4T9uT63mp13FwUtZK pZZ60sGDba9M/EaPsuK6iBMgfhtOBVZm0eXguKVO67F3fSk9ZLP+tRo4+Gt7wY4OH/mY kiR/RzZD8+zs1kmoOWyVN+aZbmTEiw5ei1gqfEINEw+M5J1o/w3vm/iJOQYtC3Y7Z3Xv 9jp1N+cqMwq/kYGX4FcoUXhl0D04TbK3byrkRs7h6DHTPk3C758xlEFCcks/EzSRKzwr jCQ3JVf+BTKdog0Lawa20MxHIcRaRAcSxDSJXE5jkAzNv6EKW4pWkqCGEi2IL6Ng23XJ v3Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=bjxTmVsRM3ZTrqeU+M5kO36hth1m1tfIJ0kJKLlRq3Q=; b=CfVCJQbmYaEk6SnCdBcQU0xICpv3Pc8+Aqum0gRMoZEROkZm2HjOfsRlcvaEsGF0yS 9YLGUohz4hbtR3RsOUMPucUgSaNcqWXK/7i1VqN8ATdfDAMjlYfSFZQfZaDrc0rSgUJi y7se4nvlzrRgvThLmnE0gjRoj2FdYF3lxnC7OTsZK4BygxP0HWMrrwnGu63DuPXrvSwD K7UNXcY1iDDf1m/DI1f2yQelczYzNRFrZbC2oATsndpMyl9QnXye1kVMInJ5YUcmGozp aPVHBo6O+ihBeJc/dS5gcchyoXL1FxjVnO6Sbrit23QhLPIePT0c5fNmkaxxpxlchqoO RvEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si350453edc.153.2019.09.25.16.50.27; Wed, 25 Sep 2019 16:50:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502915AbfIWVCd (ORCPT + 99 others); Mon, 23 Sep 2019 17:02:33 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49370 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502584AbfIWVCc (ORCPT ); Mon, 23 Sep 2019 17:02:32 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8NL0l66006094; Mon, 23 Sep 2019 17:02:04 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v75kf81f9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2019 17:02:04 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8NL0oxS006303; Mon, 23 Sep 2019 17:02:04 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v75kf81e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2019 17:02:04 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8NL0fZ7022838; Mon, 23 Sep 2019 21:02:02 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04wdc.us.ibm.com with ESMTP id 2v5bg6xnbc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2019 21:02:02 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8NL21tO48038320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Sep 2019 21:02:01 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D9D07805F; Mon, 23 Sep 2019 21:02:00 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 568D87805E; Mon, 23 Sep 2019 21:01:56 +0000 (GMT) Received: from leobras.br.ibm.com (unknown [9.18.235.184]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 23 Sep 2019 21:01:56 +0000 (GMT) Message-ID: <907304d0599684b3caa6773197fd40e09191b48e.camel@linux.ibm.com> Subject: Re: [PATCH v2 03/11] mm/gup: Applies counting method to monitor gup_pgd_range From: Leonardo Bras To: John Hubbard , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Linux-MM Cc: Jason Gunthorpe , Thomas Gleixner , Arnd Bergmann , Greg Kroah-Hartman , YueHaibing , Keith Busch , Nicholas Piggin , Mike Rapoport , Mahesh Salgaonkar , Richard Fontana , Paul Mackerras , "Aneesh Kumar K.V" , Ganesh Goudar , Andrew Morton , Ira Weiny , Dan Williams , Allison Randal Date: Mon, 23 Sep 2019 18:01:54 -0300 In-Reply-To: <2e060677-eadf-c32e-d8c5-8e22c8ca118e@nvidia.com> References: <20190920195047.7703-1-leonardo@linux.ibm.com> <20190920195047.7703-4-leonardo@linux.ibm.com> <2e060677-eadf-c32e-d8c5-8e22c8ca118e@nvidia.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-tW3aXB7tmQ0op8qOIhbV" 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-09-23_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-1909230177 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-tW3aXB7tmQ0op8qOIhbV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2019-09-23 at 13:27 -0700, John Hubbard wrote: > I'd also like a second opinion from the "core" -mm maintainers, but it se= ems like > there is now too much code around the gup_pgd_range() call. Especially si= nce there > are two places where it's called--did you forget the other one in=20 > __get_user_pages_fast(), btw?? >=20 Oh, sorry, I missed this one. I will put it on v3. (Also I will make sure to include linux-mm on v3.) > Maybe the irq handling and atomic counting should be moved into start/fin= ish > calls, like this: >=20 > start_gup_fast_walk() > gup_pgd_range() > finish_gup_fast_walk() There are cases where interrupt disable/enable is not done around the lockless pagetable walk. It may come from functions called above on stack, that's why I opted it to be only the atomic operation. --=-tW3aXB7tmQ0op8qOIhbV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEMdeUgIzgjf6YmUyOlQYWtz9SttQFAl2JMsMACgkQlQYWtz9S ttRQ0g//YQQCVV8UsFOhuPWAkbMot1RxhjkbduibAKFnSgd4mYSqLLz6n4ikZW+k qI4EbNxkdtBL5qiqM1PlXubAk8M1ShbBVRk7+cFbCyzPSWWbuzy4MsNJJY9YV8tR QuZEfqhaKyz+SCIz3yWUrVSwQjRkjkAkvRnipBuYa0eRcXtIuKFb2XRU4U085Ocg 3KZFb+z+4QIiVoSSH03p9yFhh/k89S3ToHHEWdhbKpEblqiY64fsexSsoKOggcJ5 R01gGhnaVcKxNNCnGvhA/uMF/Bcl6W3cV4MfwNluypWn6AqzxK3i97GtwHdESqez aNgyMyuCkLoxPsiBk1nh/AbeGL18dgiU+HXrQ5l49UbLAeW18LL/y3GC+UmITQKA F2tSnB8oq9k2lyJtoYj+5++ywSQDiyXxhLrUvgpQScgDV5IoQ5U4q2GgeRcy9CxN 5ehqygvFulOdz099CrjZd2Nwna5GWEOgdeszgvFIzNZX7wHmOp2lbh6QbpgLerUC n/KNTIGN40KTBBm9YFNbMiMW3eBEdyf8hu7tapnO2mll8mWs2g/5+vwt5XDjkwei 09uJNIRCsA68+8hyPC2c1I+U8ris1ZEFtJf4AL3F+yRtgLgcmlD/UI1xFOe5tdOH FUQvh2QN6u0xJfm8Mk+22PVVkadrS6F9BCxai/XpUZtQ73h1p9U= =svcq -----END PGP SIGNATURE----- --=-tW3aXB7tmQ0op8qOIhbV--