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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42DEDC77B7E for ; Tue, 2 May 2023 14:00:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233936AbjEBOAG (ORCPT ); Tue, 2 May 2023 10:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233934AbjEBOAE (ORCPT ); Tue, 2 May 2023 10:00:04 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07258180; Tue, 2 May 2023 07:00:02 -0700 (PDT) Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 342De8Jg012268; Tue, 2 May 2023 13:57:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=HT4J2CFHCJVnEcgJs7IQS5KKzDCpc3al8oNVMkDJMP8=; b=ZHlcpkvEMxYEZIyl85rv+vb/VsLKbj+OAGJOwES3fD9LAWjTE3uD/vARVtVxq1JLHkWj 3d2sNtzDnuWVSNaKaSgc5QUSPSkGdL3JN8RalthpxJ/FhG1aAvA6OdgS64tunMMaYybc 5mXrw7rcYkUn/tczXTXV2o7FmwPzM4JENefbcTPt7SfI8k+Mi5tTiGNVq6uNGM0JhIOh iUudPmFTN/6+IUs5+D8VGlLREK1t7v8/9XL/YsXbUqplx1uIZhKTYsdpQbrhxwIcOY9v ugm8pIpntgnLhXhL0CkCRdUxQMfX2A2iRQorPp2uEIvxaEsKFCsIzLM1JvsLqwEGDt5m eA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qb2gptxe7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 May 2023 13:57:21 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 342DePHG013471; Tue, 2 May 2023 13:57:13 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qb2gptwxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 May 2023 13:57:12 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 342DHdVH026752; Tue, 2 May 2023 13:56:56 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3q8tv93j00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 May 2023 13:56:56 +0000 Received: from smtpav06.wdc07v.mail.ibm.com (smtpav06.wdc07v.mail.ibm.com [10.39.53.233]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 342Dur6p39715206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 May 2023 13:56:53 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD93758062; Tue, 2 May 2023 13:56:52 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4DE4158054; Tue, 2 May 2023 13:56:48 +0000 (GMT) Received: from [9.60.89.243] (unknown [9.60.89.243]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 2 May 2023 13:56:48 +0000 (GMT) Message-ID: <1d4c9258-9423-7411-e722-8f6865b18886@linux.ibm.com> Date: Tue, 2 May 2023 09:56:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v6 3/3] mm/gup: disallow FOLL_LONGTERM GUP-fast writing to file-backed mappings Content-Language: en-US To: Jason Gunthorpe , David Hildenbrand Cc: Christian Borntraeger , Lorenzo Stoakes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Jens Axboe , Matthew Wilcox , Dennis Dalessandro , Leon Romanovsky , Christian Benvenuti , Nelson Escobar , Bernard Metzler , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Bjorn Topel , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Brauner , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Oleg Nesterov , John Hubbard , Jan Kara , "Kirill A . Shutemov" , Pavel Begunkov , Mika Penttila , Dave Chinner , "Theodore Ts'o" , Peter Xu References: <7d56b424-ba79-4b21-b02c-c89705533852@lucifer.local> From: Matthew Rosato In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: RHePs_ok-HHHFFzfwdrT-a5YRt5zdN_o X-Proofpoint-ORIG-GUID: xOWsx5DlvAxgj0nnNjjobcc8ozIeW4QV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-02_08,2023-04-27_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 malwarescore=0 mlxscore=0 bulkscore=0 impostorscore=0 mlxlogscore=815 spamscore=0 phishscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305020115 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 5/2/23 9:50 AM, Jason Gunthorpe wrote: > On Tue, May 02, 2023 at 03:47:43PM +0200, David Hildenbrand wrote: >>> Eventually we want to implement a mechanism where we can dynamically pin in response to RPCIT. >> >> Okay, so IIRC we'll fail starting the domain early, that's good. And if we >> pin all guest memory (instead of small pieces dynamically), there is little >> existing use for file-backed RAM in such zPCI configurations (because memory >> cannot be reclaimed either way if it's all pinned), so likely there are no >> real existing users. > > Right, this is VFIO, the physical HW can't tolerate not having pinned > memory, so something somewhere is always pinning it. I might have mis-explained above. With iommufd nesting, we will pin everything upfront as a starting point. The current usage of vfio type1 iommu for s390 does not pin the entirety of guest memory upfront, it happens as guest RPCITs occur / type1 mappings are made. > > Which, again, makes it weird/wrong that this KVM code is pinning it > again :\ > > Jason